avo 3.0.0-beta.2 → 3.1.1
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/Avo.js +20 -14
- package/cli.js +71 -14
- package/package.json +1 -1
package/Avo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by Avo VERSION
|
|
1
|
+
// Generated by Avo VERSION 108.28.0. You should never have to make changes to this file.
|
|
2
2
|
// If you find yourself in the situation where you have to edit the file please contact us at hi@avo.app.
|
|
3
3
|
// If you encounter a git conflict in this file run `avo pull` and it will be resolved automatically.
|
|
4
4
|
/* tslint:disable */
|
|
@@ -275,8 +275,8 @@ function _avo_invoke_payload(body) {
|
|
|
275
275
|
_avo_invoke = function _avo_invoke(env, eventId, hash, messages, origin) {
|
|
276
276
|
try {
|
|
277
277
|
_avo_invoke_payload({
|
|
278
|
-
"ac": "
|
|
279
|
-
"br": "
|
|
278
|
+
"ac": "7Lk2c1ODN76gJr4AFEIk",
|
|
279
|
+
"br": "qsHHWtDYF",
|
|
280
280
|
"en": env,
|
|
281
281
|
"ev": eventId,
|
|
282
282
|
"ha": hash,
|
|
@@ -300,8 +300,8 @@ _avo_invoke = function _avo_invoke(env, eventId, hash, messages, origin) {
|
|
|
300
300
|
_avo_invoke_meta = function _avo_invoke_meta(env, type, messages, origin) {
|
|
301
301
|
try {
|
|
302
302
|
_avo_invoke_payload({
|
|
303
|
-
"ac": "
|
|
304
|
-
"br": "
|
|
303
|
+
"ac": "7Lk2c1ODN76gJr4AFEIk",
|
|
304
|
+
"br": "qsHHWtDYF",
|
|
305
305
|
"en": env,
|
|
306
306
|
"ty": type,
|
|
307
307
|
"sc": "fwtXqAc0fCLy7b7oGW40",
|
|
@@ -447,7 +447,7 @@ export function setAvoLogger(avoLogger) {
|
|
|
447
447
|
* @param properties.email: The user's email
|
|
448
448
|
* @param properties.authenticationMethod: Type of authentication method used by user logging in or signing up
|
|
449
449
|
*
|
|
450
|
-
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/events/54e92613-090c-4f0b-afeb-ed720eff3422}
|
|
450
|
+
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/branches/qsHHWtDYF/events/54e92613-090c-4f0b-afeb-ed720eff3422}
|
|
451
451
|
*/
|
|
452
452
|
export function signedIn(properties) {
|
|
453
453
|
// assert properties
|
|
@@ -502,7 +502,7 @@ export function signedIn(properties) {
|
|
|
502
502
|
* @param properties.signInError: no description
|
|
503
503
|
* @param properties.emailInput: The email address that is put into the email input on the landing page
|
|
504
504
|
*
|
|
505
|
-
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/events/7aa64217-bb89-44f5-9a68-f3bc0255a864}
|
|
505
|
+
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/branches/qsHHWtDYF/events/7aa64217-bb89-44f5-9a68-f3bc0255a864}
|
|
506
506
|
*/
|
|
507
507
|
export function signInFailed(properties) {
|
|
508
508
|
// assert properties
|
|
@@ -562,8 +562,9 @@ export function signInFailed(properties) {
|
|
|
562
562
|
* @param properties.branchName: The name of the branch that this event is related to.
|
|
563
563
|
* @param properties.schemaName: Name of the schema that this event is related to.
|
|
564
564
|
* @param properties.force: Whether the command was called with --force parameter
|
|
565
|
+
* @param properties.forceFeatures: The features overrides provided to the cli pull
|
|
565
566
|
*
|
|
566
|
-
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/events/qqpIQEK11}
|
|
567
|
+
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/branches/qsHHWtDYF/events/qqpIQEK11}
|
|
567
568
|
*/
|
|
568
569
|
export function cliInvoked(properties) {
|
|
569
570
|
// assert properties
|
|
@@ -571,7 +572,7 @@ export function cliInvoked(properties) {
|
|
|
571
572
|
let messages = [];
|
|
572
573
|
// debug console in Avo
|
|
573
574
|
if (!__AVO_NOOP__) {
|
|
574
|
-
_avo_invoke(__AVO_ENV__, "qqpIQEK11", "
|
|
575
|
+
_avo_invoke(__AVO_ENV__, "qqpIQEK11", "f424cee5a989c90c69502a11d76705f3b6bc0d3311322c59f5f42ef13269ab2e", messages.map(m => Object.assign({}, { tag: m.tag, propertyId: m.propertyId, additionalProperties: m.additionalProperties, actualType: m.actualType })), 'event');
|
|
575
576
|
}
|
|
576
577
|
InternalAvoLogger.logEventSent("Cli Invoked", {
|
|
577
578
|
"Cli Action": properties.cliAction,
|
|
@@ -581,6 +582,7 @@ export function cliInvoked(properties) {
|
|
|
581
582
|
"Branch Name": properties.branchName,
|
|
582
583
|
"Schema Name": properties.schemaName,
|
|
583
584
|
"Force": properties.force,
|
|
585
|
+
"Force Features": properties.forceFeatures,
|
|
584
586
|
"Client": sysClient,
|
|
585
587
|
"Version": sysVersion,
|
|
586
588
|
}, {});
|
|
@@ -598,6 +600,9 @@ export function cliInvoked(properties) {
|
|
|
598
600
|
if (properties.force !== undefined && properties.force !== null) {
|
|
599
601
|
eventProperties["Force"] = properties.force;
|
|
600
602
|
}
|
|
603
|
+
if (properties.forceFeatures !== undefined && properties.forceFeatures !== null) {
|
|
604
|
+
eventProperties["Force Features"] = properties.forceFeatures;
|
|
605
|
+
}
|
|
601
606
|
eventProperties["Client"] = sysClient;
|
|
602
607
|
eventProperties["Version"] = sysVersion;
|
|
603
608
|
// @ts-ignore
|
|
@@ -615,9 +620,10 @@ export function cliInvoked(properties) {
|
|
|
615
620
|
"Branch Name": properties.branchName,
|
|
616
621
|
"Schema Name": properties.schemaName,
|
|
617
622
|
"Force": properties.force,
|
|
623
|
+
"Force Features": properties.forceFeatures,
|
|
618
624
|
"Client": sysClient,
|
|
619
625
|
"Version": sysVersion,
|
|
620
|
-
}, "qqpIQEK11", "
|
|
626
|
+
}, "qqpIQEK11", "f424cee5a989c90c69502a11d76705f3b6bc0d3311322c59f5f42ef13269ab2e")
|
|
621
627
|
: Promise.resolve(),
|
|
622
628
|
// destination CustomNodeJS
|
|
623
629
|
CustomNodeJS.logEvent(properties.userId_, "Cli Invoked", Object.assign({}, eventProperties)),
|
|
@@ -635,7 +641,7 @@ export function cliInvoked(properties) {
|
|
|
635
641
|
* @param properties.userId_: User Id is required for server sources.
|
|
636
642
|
* @param properties.cliInvokedByCi: True iff process.env.CI is set.
|
|
637
643
|
*
|
|
638
|
-
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/events/JCwfVYXTS}
|
|
644
|
+
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/branches/qsHHWtDYF/events/JCwfVYXTS}
|
|
639
645
|
*/
|
|
640
646
|
export function cliInstalled(properties) {
|
|
641
647
|
// assert properties
|
|
@@ -689,7 +695,7 @@ export function cliInstalled(properties) {
|
|
|
689
695
|
* @param properties.branchName: The name of the branch that this event is related to.
|
|
690
696
|
* @param properties.schemaName: Name of the schema that this event is related to.
|
|
691
697
|
*
|
|
692
|
-
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/events/Un5dTEMQYy}
|
|
698
|
+
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/branches/qsHHWtDYF/events/Un5dTEMQYy}
|
|
693
699
|
*/
|
|
694
700
|
export function cliConflictResolveAttempted(properties) {
|
|
695
701
|
// assert properties
|
|
@@ -757,7 +763,7 @@ export function cliConflictResolveAttempted(properties) {
|
|
|
757
763
|
* @param properties.branchId: The ID of the branch that this event is related to.
|
|
758
764
|
* @param properties.branchName: The name of the branch that this event is related to.
|
|
759
765
|
*
|
|
760
|
-
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/events/4ZhoijIA2U}
|
|
766
|
+
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/branches/qsHHWtDYF/events/4ZhoijIA2U}
|
|
761
767
|
*/
|
|
762
768
|
export function cliConflictResolveFailed(properties) {
|
|
763
769
|
// assert properties
|
|
@@ -825,7 +831,7 @@ export function cliConflictResolveFailed(properties) {
|
|
|
825
831
|
* @param properties.branchId: The ID of the branch that this event is related to.
|
|
826
832
|
* @param properties.branchName: The name of the branch that this event is related to.
|
|
827
833
|
*
|
|
828
|
-
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/events/yj_554q43i}
|
|
834
|
+
* @see {@link https://www.avo.app/schemas/fwtXqAc0fCLy7b7oGW40/branches/qsHHWtDYF/events/yj_554q43i}
|
|
829
835
|
*/
|
|
830
836
|
export function cliConflictResolveSucceeded(properties) {
|
|
831
837
|
// assert properties
|
package/cli.js
CHANGED
|
@@ -167,10 +167,13 @@ function _request(options) {
|
|
|
167
167
|
}
|
|
168
168
|
return resolve(JSON.parse(response.body));
|
|
169
169
|
})
|
|
170
|
-
.catch((err) =>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
.catch((err) => {
|
|
171
|
+
report.error(`${responseToError(err.response)}\n`);
|
|
172
|
+
reject(new AvoError(`Server Error. ${err.message}`, {
|
|
173
|
+
original: err,
|
|
174
|
+
exit: 2,
|
|
175
|
+
}));
|
|
176
|
+
});
|
|
174
177
|
});
|
|
175
178
|
}
|
|
176
179
|
const _appendQueryData = (urlPath, data) => {
|
|
@@ -740,7 +743,11 @@ function loadAvoJsonOrInit({ argv, skipPullMaster, skipInit }) {
|
|
|
740
743
|
}
|
|
741
744
|
return Promise.resolve(JSON.parse(avoFile));
|
|
742
745
|
})
|
|
743
|
-
.then((json) => Promise.resolve({
|
|
746
|
+
.then((json) => Promise.resolve({
|
|
747
|
+
...json,
|
|
748
|
+
force: argv.f === true,
|
|
749
|
+
forceFeatures: argv.forceFeatures,
|
|
750
|
+
}))
|
|
744
751
|
.then(validateAvoJson)
|
|
745
752
|
.catch((error) => {
|
|
746
753
|
if (error.code === 'ENOENT' && skipInit) {
|
|
@@ -758,7 +765,7 @@ function writeAvoJson(json) {
|
|
|
758
765
|
indent: 2,
|
|
759
766
|
}).then(() => json);
|
|
760
767
|
}
|
|
761
|
-
function codegen(json, { schema, sources: targets, warnings, errors }) {
|
|
768
|
+
function codegen(json, { schema, sources: targets, warnings, success, errors }) {
|
|
762
769
|
const newJson = { ...JSON.parse(JSON.stringify(json)), schema };
|
|
763
770
|
newJson.sources = newJson.sources.map((source) => {
|
|
764
771
|
const target = targets.find(({ id }) => id === source.id);
|
|
@@ -788,6 +795,11 @@ function codegen(json, { schema, sources: targets, warnings, errors }) {
|
|
|
788
795
|
report.warn(warning);
|
|
789
796
|
});
|
|
790
797
|
}
|
|
798
|
+
if (success !== undefined && success !== null && Array.isArray(success)) {
|
|
799
|
+
success.forEach((success) => {
|
|
800
|
+
report.success(success);
|
|
801
|
+
});
|
|
802
|
+
}
|
|
791
803
|
report.success(`Analytics ${targets.length > 1 ? 'wrappers' : 'wrapper'} successfully updated`);
|
|
792
804
|
targets.forEach((target) => {
|
|
793
805
|
const source = newJson.sources.find(({ id }) => id === target.id);
|
|
@@ -924,6 +936,7 @@ function pull(sourceFilter, json) {
|
|
|
924
936
|
path: source.path,
|
|
925
937
|
})),
|
|
926
938
|
force: json.force ?? false,
|
|
939
|
+
forceFeatures: json.forceFeatures,
|
|
927
940
|
},
|
|
928
941
|
}))
|
|
929
942
|
.then((result) => {
|
|
@@ -1254,6 +1267,9 @@ function logout(refreshToken) {
|
|
|
1254
1267
|
conf.delete('tokens');
|
|
1255
1268
|
}
|
|
1256
1269
|
}
|
|
1270
|
+
function parseForceFeaturesParam(forceFeatures) {
|
|
1271
|
+
return forceFeatures?.split(',').map((it) => it.trim());
|
|
1272
|
+
}
|
|
1257
1273
|
yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
1258
1274
|
.usage('$0 command')
|
|
1259
1275
|
.scriptName('avo')
|
|
@@ -1263,12 +1279,6 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1263
1279
|
default: false,
|
|
1264
1280
|
describe: 'make output more verbose',
|
|
1265
1281
|
type: 'boolean',
|
|
1266
|
-
})
|
|
1267
|
-
.option('f', {
|
|
1268
|
-
alias: 'force',
|
|
1269
|
-
describe: 'Proceed with merge when incoming branch is open',
|
|
1270
|
-
default: false,
|
|
1271
|
-
type: 'boolean',
|
|
1272
1282
|
})
|
|
1273
1283
|
.command({
|
|
1274
1284
|
command: 'track-install',
|
|
@@ -1296,6 +1306,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1296
1306
|
cliAction: Avo.CliAction.INIT,
|
|
1297
1307
|
cliInvokedByCi: invokedByCi(),
|
|
1298
1308
|
force: undefined,
|
|
1309
|
+
forceFeatures: undefined,
|
|
1299
1310
|
});
|
|
1300
1311
|
report.info(`Avo is already initialized for workspace ${cyan(json.schema.name)} (${file('avo.json')} exists)`);
|
|
1301
1312
|
return Promise.resolve();
|
|
@@ -1309,6 +1320,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1309
1320
|
cliAction: Avo.CliAction.INIT,
|
|
1310
1321
|
cliInvokedByCi: invokedByCi(),
|
|
1311
1322
|
force: undefined,
|
|
1323
|
+
forceFeatures: undefined,
|
|
1312
1324
|
});
|
|
1313
1325
|
return requireAuth(argv, () => init()
|
|
1314
1326
|
.then(writeAvoJson)
|
|
@@ -1326,6 +1338,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1326
1338
|
cliAction: Avo.CliAction.INIT,
|
|
1327
1339
|
cliInvokedByCi: invokedByCi(),
|
|
1328
1340
|
force: undefined,
|
|
1341
|
+
forceFeatures: undefined,
|
|
1329
1342
|
});
|
|
1330
1343
|
});
|
|
1331
1344
|
},
|
|
@@ -1333,8 +1346,21 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1333
1346
|
.command({
|
|
1334
1347
|
command: 'pull [source]',
|
|
1335
1348
|
desc: 'Pull analytics wrappers from Avo workspace',
|
|
1336
|
-
builder: (yargs) => yargs
|
|
1349
|
+
builder: (yargs) => yargs
|
|
1350
|
+
.option('branch', {
|
|
1337
1351
|
describe: 'Name of Avo branch to pull from',
|
|
1352
|
+
default: 'main',
|
|
1353
|
+
type: 'string',
|
|
1354
|
+
})
|
|
1355
|
+
.option('f', {
|
|
1356
|
+
alias: 'force',
|
|
1357
|
+
describe: 'Proceed ignoring the unsupported features for given source',
|
|
1358
|
+
default: false,
|
|
1359
|
+
type: 'boolean',
|
|
1360
|
+
})
|
|
1361
|
+
.option('forceFeatures', {
|
|
1362
|
+
describe: 'Optional comma separated list of features to force enable',
|
|
1363
|
+
default: undefined,
|
|
1338
1364
|
type: 'string',
|
|
1339
1365
|
}),
|
|
1340
1366
|
handler: (argv) => {
|
|
@@ -1348,7 +1374,8 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1348
1374
|
userId_: installIdOrUserId(),
|
|
1349
1375
|
cliAction: Avo.CliAction.PULL,
|
|
1350
1376
|
cliInvokedByCi: invokedByCi(),
|
|
1351
|
-
force:
|
|
1377
|
+
force: argv.f === true,
|
|
1378
|
+
forceFeatures: parseForceFeaturesParam(argv.forceFeatures),
|
|
1352
1379
|
});
|
|
1353
1380
|
requireAuth(argv, () => {
|
|
1354
1381
|
if (argv.branch && json.branch.name !== argv.branch) {
|
|
@@ -1370,6 +1397,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1370
1397
|
cliAction: Avo.CliAction.PULL,
|
|
1371
1398
|
cliInvokedByCi: invokedByCi(),
|
|
1372
1399
|
force: undefined,
|
|
1400
|
+
forceFeatures: undefined,
|
|
1373
1401
|
});
|
|
1374
1402
|
throw error;
|
|
1375
1403
|
});
|
|
@@ -1390,6 +1418,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1390
1418
|
cliAction: Avo.CliAction.CHECKOUT,
|
|
1391
1419
|
cliInvokedByCi: invokedByCi(),
|
|
1392
1420
|
force: undefined,
|
|
1421
|
+
forceFeatures: undefined,
|
|
1393
1422
|
});
|
|
1394
1423
|
report.info(`Currently on branch '${json.branch.name}'`);
|
|
1395
1424
|
requireAuth(argv, () => checkout(argv.branch, json).then(writeAvoJson));
|
|
@@ -1404,6 +1433,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1404
1433
|
cliAction: Avo.CliAction.CHECKOUT,
|
|
1405
1434
|
cliInvokedByCi: invokedByCi(),
|
|
1406
1435
|
force: undefined,
|
|
1436
|
+
forceFeatures: undefined,
|
|
1407
1437
|
});
|
|
1408
1438
|
throw error;
|
|
1409
1439
|
}),
|
|
@@ -1428,6 +1458,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1428
1458
|
cliAction: Avo.CliAction.SOURCE,
|
|
1429
1459
|
cliInvokedByCi: invokedByCi(),
|
|
1430
1460
|
force: undefined,
|
|
1461
|
+
forceFeatures: undefined,
|
|
1431
1462
|
});
|
|
1432
1463
|
if (!json.sources || !json.sources.length) {
|
|
1433
1464
|
report.info(`No sources defined in ${file('avo.json')}. Run ${cmd('avo source add')} to add sources`);
|
|
@@ -1449,6 +1480,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1449
1480
|
cliAction: Avo.CliAction.SOURCE,
|
|
1450
1481
|
cliInvokedByCi: invokedByCi(),
|
|
1451
1482
|
force: undefined,
|
|
1483
|
+
forceFeatures: undefined,
|
|
1452
1484
|
});
|
|
1453
1485
|
throw error;
|
|
1454
1486
|
});
|
|
@@ -1469,6 +1501,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1469
1501
|
cliAction: Avo.CliAction.SOURCE_ADD,
|
|
1470
1502
|
cliInvokedByCi: invokedByCi(),
|
|
1471
1503
|
force: undefined,
|
|
1504
|
+
forceFeatures: undefined,
|
|
1472
1505
|
});
|
|
1473
1506
|
requireAuth(argv, () => {
|
|
1474
1507
|
selectSource(argv.source, json).then(writeAvoJson);
|
|
@@ -1484,6 +1517,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1484
1517
|
cliAction: Avo.CliAction.SOURCE_ADD,
|
|
1485
1518
|
cliInvokedByCi: invokedByCi(),
|
|
1486
1519
|
force: undefined,
|
|
1520
|
+
forceFeatures: undefined,
|
|
1487
1521
|
});
|
|
1488
1522
|
throw error;
|
|
1489
1523
|
});
|
|
@@ -1505,6 +1539,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1505
1539
|
cliAction: Avo.CliAction.SOURCE_REMOVE,
|
|
1506
1540
|
cliInvokedByCi: invokedByCi(),
|
|
1507
1541
|
force: undefined,
|
|
1542
|
+
forceFeatures: undefined,
|
|
1508
1543
|
});
|
|
1509
1544
|
if (!json.sources || !json.sources.length) {
|
|
1510
1545
|
report.warn(`No sources defined in ${file('avo.json')}. Run ${cmd('avo source add')} to add sources`);
|
|
@@ -1566,6 +1601,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1566
1601
|
cliAction: Avo.CliAction.SOURCE_REMOVE,
|
|
1567
1602
|
cliInvokedByCi: invokedByCi(),
|
|
1568
1603
|
force: undefined,
|
|
1604
|
+
forceFeatures: undefined,
|
|
1569
1605
|
});
|
|
1570
1606
|
throw error;
|
|
1571
1607
|
});
|
|
@@ -1588,6 +1624,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1588
1624
|
cliAction: Avo.CliAction.STATUS,
|
|
1589
1625
|
cliInvokedByCi: invokedByCi(),
|
|
1590
1626
|
force: undefined,
|
|
1627
|
+
forceFeatures: undefined,
|
|
1591
1628
|
});
|
|
1592
1629
|
report.info(`Currently on branch '${json.branch.name}'`);
|
|
1593
1630
|
return getSource(argv, json);
|
|
@@ -1603,6 +1640,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1603
1640
|
cliAction: Avo.CliAction.STATUS,
|
|
1604
1641
|
cliInvokedByCi: invokedByCi(),
|
|
1605
1642
|
force: undefined,
|
|
1643
|
+
forceFeatures: undefined,
|
|
1606
1644
|
});
|
|
1607
1645
|
throw error;
|
|
1608
1646
|
});
|
|
@@ -1612,6 +1650,12 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1612
1650
|
command: 'merge main',
|
|
1613
1651
|
aliases: ['merge master'],
|
|
1614
1652
|
desc: 'Pull the Avo main branch into your current branch',
|
|
1653
|
+
builder: (yargs) => yargs.option('f', {
|
|
1654
|
+
alias: 'force',
|
|
1655
|
+
describe: 'Proceed with merge when incoming branch is open',
|
|
1656
|
+
default: false,
|
|
1657
|
+
type: 'boolean',
|
|
1658
|
+
}),
|
|
1615
1659
|
handler: (argv) => {
|
|
1616
1660
|
loadAvoJsonOrInit({ argv, skipPullMaster: true, skipInit: false })
|
|
1617
1661
|
.then((json) => {
|
|
@@ -1624,6 +1668,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1624
1668
|
cliAction: Avo.CliAction.MERGE,
|
|
1625
1669
|
cliInvokedByCi: invokedByCi(),
|
|
1626
1670
|
force: json.force,
|
|
1671
|
+
forceFeatures: undefined,
|
|
1627
1672
|
});
|
|
1628
1673
|
return requireAuth(argv, () => pullMaster(json).then(writeAvoJson));
|
|
1629
1674
|
})
|
|
@@ -1637,6 +1682,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1637
1682
|
cliAction: Avo.CliAction.MERGE,
|
|
1638
1683
|
cliInvokedByCi: invokedByCi(),
|
|
1639
1684
|
force: undefined,
|
|
1685
|
+
forceFeatures: undefined,
|
|
1640
1686
|
});
|
|
1641
1687
|
throw error;
|
|
1642
1688
|
});
|
|
@@ -1662,6 +1708,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1662
1708
|
cliAction: Avo.CliAction.CONFLICT,
|
|
1663
1709
|
cliInvokedByCi: invokedByCi(),
|
|
1664
1710
|
force: undefined,
|
|
1711
|
+
forceFeatures: undefined,
|
|
1665
1712
|
});
|
|
1666
1713
|
pull(null, json);
|
|
1667
1714
|
}));
|
|
@@ -1677,6 +1724,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1677
1724
|
cliAction: Avo.CliAction.CONFLICT,
|
|
1678
1725
|
cliInvokedByCi: invokedByCi(),
|
|
1679
1726
|
force: undefined,
|
|
1727
|
+
forceFeatures: undefined,
|
|
1680
1728
|
});
|
|
1681
1729
|
return Promise.resolve(json);
|
|
1682
1730
|
})
|
|
@@ -1690,6 +1738,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1690
1738
|
cliAction: Avo.CliAction.CONFLICT,
|
|
1691
1739
|
cliInvokedByCi: invokedByCi(),
|
|
1692
1740
|
force: undefined,
|
|
1741
|
+
forceFeatures: undefined,
|
|
1693
1742
|
});
|
|
1694
1743
|
throw error;
|
|
1695
1744
|
}),
|
|
@@ -1709,6 +1758,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1709
1758
|
cliAction: Avo.CliAction.EDIT,
|
|
1710
1759
|
cliInvokedByCi: invokedByCi(),
|
|
1711
1760
|
force: undefined,
|
|
1761
|
+
forceFeatures: undefined,
|
|
1712
1762
|
});
|
|
1713
1763
|
const { schema } = json;
|
|
1714
1764
|
const schemaUrl = `https://www.avo.app/schemas/${schema.id}`;
|
|
@@ -1725,6 +1775,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1725
1775
|
cliAction: Avo.CliAction.EDIT,
|
|
1726
1776
|
cliInvokedByCi: invokedByCi(),
|
|
1727
1777
|
force: undefined,
|
|
1778
|
+
forceFeatures: undefined,
|
|
1728
1779
|
});
|
|
1729
1780
|
throw error;
|
|
1730
1781
|
});
|
|
@@ -1770,6 +1821,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1770
1821
|
cliAction: Avo.CliAction.LOGIN,
|
|
1771
1822
|
cliInvokedByCi: invokedByCi(),
|
|
1772
1823
|
force: undefined,
|
|
1824
|
+
forceFeatures: undefined,
|
|
1773
1825
|
});
|
|
1774
1826
|
command();
|
|
1775
1827
|
})
|
|
@@ -1783,6 +1835,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1783
1835
|
cliAction: Avo.CliAction.LOGIN,
|
|
1784
1836
|
cliInvokedByCi: invokedByCi(),
|
|
1785
1837
|
force: undefined,
|
|
1838
|
+
forceFeatures: undefined,
|
|
1786
1839
|
});
|
|
1787
1840
|
command();
|
|
1788
1841
|
});
|
|
@@ -1828,6 +1881,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1828
1881
|
cliAction: Avo.CliAction.LOGOUT,
|
|
1829
1882
|
cliInvokedByCi: invokedByCi(),
|
|
1830
1883
|
force: undefined,
|
|
1884
|
+
forceFeatures: undefined,
|
|
1831
1885
|
});
|
|
1832
1886
|
command();
|
|
1833
1887
|
})
|
|
@@ -1841,6 +1895,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1841
1895
|
cliAction: Avo.CliAction.LOGOUT,
|
|
1842
1896
|
cliInvokedByCi: invokedByCi(),
|
|
1843
1897
|
force: undefined,
|
|
1898
|
+
forceFeatures: undefined,
|
|
1844
1899
|
});
|
|
1845
1900
|
command();
|
|
1846
1901
|
});
|
|
@@ -1872,6 +1927,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1872
1927
|
cliAction: Avo.CliAction.WHOAMI,
|
|
1873
1928
|
cliInvokedByCi: invokedByCi(),
|
|
1874
1929
|
force: undefined,
|
|
1930
|
+
forceFeatures: undefined,
|
|
1875
1931
|
});
|
|
1876
1932
|
command();
|
|
1877
1933
|
})
|
|
@@ -1885,6 +1941,7 @@ yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions
|
|
|
1885
1941
|
cliAction: Avo.CliAction.WHOAMI,
|
|
1886
1942
|
cliInvokedByCi: invokedByCi(),
|
|
1887
1943
|
force: undefined,
|
|
1944
|
+
forceFeatures: undefined,
|
|
1888
1945
|
});
|
|
1889
1946
|
command();
|
|
1890
1947
|
});
|