Accept reader-friendly Scattermind build order aliases
This commit is contained in:
@@ -1186,10 +1186,10 @@ function compactCandidateGroup(group = []) {
|
||||
function buildOrderSectionGroup(buildOrder = {}, baseSection = 'buildOrder') {
|
||||
const source = objectFrom(buildOrder);
|
||||
return compactCandidateGroup([
|
||||
{ items: source.doFirst || source.do_first || source.buildFirst || source.buildNow || source.now || source.continueFirst || source.continue_first || source.makeTangible || source.make_tangible || source.startHere || source.start_here, sourceSection: `${baseSection}.doFirst`, defaultLane: 'do-first' },
|
||||
{ items: source.validateNext || source.validate_next || source.validateManually || source.validate_manually || source.testNext || source.testManually || source.test_manually || source.manualProof || source.manual_proof || source.validation || source.evidenceNext || source.evidence_next || source.tryNext || source.try_next || source.learnNext || source.learn_next, sourceSection: `${baseSection}.validateNext`, defaultLane: 'validate-next' },
|
||||
{ items: source.defer || source.deferred || source.later || source.afterProof || source.holdForLater || source.hold_for_later || source.notYet || source.not_yet, sourceSection: `${baseSection}.defer`, defaultLane: 'defer' },
|
||||
{ items: source.park || source.parkingLot || source.parking_lot || source.parked || source.probablyNoise || source.probably_noise || source.noise || source.setAside || source.set_aside || source.outOfScope || source.out_of_scope, sourceSection: `${baseSection}.park`, defaultLane: 'park' },
|
||||
{ items: source.doFirst || source.do_first || source.buildFirst || source.build_first || source.buildNow || source.build_now || source.now || source.continueFirst || source.continue_first || source.makeTangible || source.make_tangible || source.startHere || source.start_here || source.startNow || source.start_now || source.shipFirst || source.ship_first, sourceSection: `${baseSection}.doFirst`, defaultLane: 'do-first' },
|
||||
{ items: source.validateNext || source.validate_next || source.validateManually || source.validate_manually || source.testNext || source.test_next || source.testManually || source.test_manually || source.manualProof || source.manual_proof || source.validation || source.evidenceNext || source.evidence_next || source.tryNext || source.try_next || source.learnNext || source.learn_next || source.proofStep || source.proof_step || source.proofSteps || source.proof_steps, sourceSection: `${baseSection}.validateNext`, defaultLane: 'validate-next' },
|
||||
{ items: source.defer || source.deferred || source.later || source.afterProof || source.after_proof || source.holdForLater || source.hold_for_later || source.notYet || source.not_yet || source.leaveOut || source.leave_out || source.skipForNow || source.skip_for_now || source.doNotBuildYet || source.do_not_build_yet, sourceSection: `${baseSection}.defer`, defaultLane: 'defer' },
|
||||
{ items: source.park || source.parkingLot || source.parking_lot || source.parked || source.probablyNoise || source.probably_noise || source.noise || source.setAside || source.set_aside || source.outOfScope || source.out_of_scope || source.cut || source.distractions, sourceSection: `${baseSection}.park`, defaultLane: 'park' },
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -1202,7 +1202,7 @@ function normalizeCandidateGroup(group = []) {
|
||||
}
|
||||
|
||||
const buildOrderLabelSeparator = '\\s*(?::|,|[-–—])\\s*';
|
||||
const buildOrderLabelPattern = '(build first|build this first|start here|start with|start by|ship first|ship this first|first week|week one|first-week build order|continue first|make tangible first|make tangible|try next|test first|prove first|evidence next|learn next|test manually|validate manually|manual proof|validate next|hold for later|leave out|skip for now|not yet|defer|set aside|out of scope|probably noise|park|do not build yet|don\'t build yet)';
|
||||
const buildOrderLabelPattern = '(build first|build this first|start here|start with|start by|ship first|ship this first|first week|week one|first-week build order|continue first|make tangible first|make tangible|try next|test first|test this first|prove first|prove manually|evidence next|learn next|test manually|test this manually|validate manually|validate this manually|manual proof|validate next|hold for later|leave out|skip for now|not yet|defer|set aside|out of scope|probably noise|park|do not build yet|do not build this yet|don\'t build yet)';
|
||||
const buildOrderLabelRegex = new RegExp(`^${buildOrderLabelPattern}${buildOrderLabelSeparator}`, 'i');
|
||||
|
||||
function normalizeBuildOrderFragment(fragment = '') {
|
||||
@@ -1229,8 +1229,8 @@ function titleFromBuildOrderFragment(value = '') {
|
||||
|
||||
function laneFromBuildOrderLabel(fragment = '') {
|
||||
if (new RegExp(`^(build first|build this first|start here|start with|start by|ship first|ship this first|first week|week one|first-week build order|continue first|make tangible first|make tangible)${buildOrderLabelSeparator}`, 'i').test(fragment)) return 'do-first';
|
||||
if (new RegExp(`^(try next|test first|prove first|evidence next|learn next|test manually|validate manually|manual proof|validate next)${buildOrderLabelSeparator}`, 'i').test(fragment)) return 'validate-next';
|
||||
if (new RegExp(`^(hold for later|leave out|skip for now|not yet|defer|do not build yet|don't build yet)${buildOrderLabelSeparator}`, 'i').test(fragment)) return 'defer';
|
||||
if (new RegExp(`^(try next|test first|test this first|prove first|prove manually|evidence next|learn next|test manually|test this manually|validate manually|validate this manually|manual proof|validate next)${buildOrderLabelSeparator}`, 'i').test(fragment)) return 'validate-next';
|
||||
if (new RegExp(`^(hold for later|leave out|skip for now|not yet|defer|do not build yet|do not build this yet|don't build yet|don't build this yet)${buildOrderLabelSeparator}`, 'i').test(fragment)) return 'defer';
|
||||
if (new RegExp(`^(set aside|out of scope|probably noise|park)${buildOrderLabelSeparator}`, 'i').test(fragment)) return 'park';
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user