kaabalah 5.1.0 → 5.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/dist/{chunk-JBMCNKO4.mjs → chunk-2J6CVLH2.mjs} +5 -4
- package/dist/chunk-2J6CVLH2.mjs.map +1 -0
- package/dist/{chunk-FVEVTAM7.js → chunk-2WENLHIP.js} +4 -4
- package/dist/{chunk-FVEVTAM7.js.map → chunk-2WENLHIP.js.map} +1 -1
- package/dist/{chunk-X2SPWMUA.mjs → chunk-5ID55YUP.mjs} +3 -3
- package/dist/{chunk-X2SPWMUA.mjs.map → chunk-5ID55YUP.mjs.map} +1 -1
- package/dist/{chunk-KUH2YDQ2.js → chunk-T67M2WBD.js} +5 -4
- package/dist/chunk-T67M2WBD.js.map +1 -0
- package/dist/{chunk-KSKAKQTM.mjs → chunk-XSAXO3D2.mjs} +3 -3
- package/dist/{chunk-KSKAKQTM.mjs.map → chunk-XSAXO3D2.mjs.map} +1 -1
- package/dist/{chunk-U77YFJXJ.js → chunk-ZZ3YMT2R.js} +23 -23
- package/dist/{chunk-U77YFJXJ.js.map → chunk-ZZ3YMT2R.js.map} +1 -1
- package/dist/cli.js +94 -35
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +79 -20
- package/dist/cli.mjs.map +1 -1
- package/dist/core/index.js +38 -38
- package/dist/core/index.mjs +1 -1
- package/dist/gematria/index.js +5 -5
- package/dist/gematria/index.mjs +2 -2
- package/dist/index.js +58 -58
- package/dist/index.mjs +3 -3
- package/dist/numerology/index.js +18 -18
- package/dist/numerology/index.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-JBMCNKO4.mjs.map +0 -1
- package/dist/chunk-KUH2YDQ2.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunk3WVZRLPG_js = require('./chunk-3WVZRLPG.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var chunk2WENLHIP_js = require('./chunk-2WENLHIP.js');
|
|
6
|
+
var chunkZZ3YMT2R_js = require('./chunk-ZZ3YMT2R.js');
|
|
7
|
+
var chunkT67M2WBD_js = require('./chunk-T67M2WBD.js');
|
|
8
8
|
var chunkG5BG73Y5_js = require('./chunk-G5BG73Y5.js');
|
|
9
9
|
var chunkFM7WUVZV_js = require('./chunk-FM7WUVZV.js');
|
|
10
10
|
require('dotenv/config');
|
|
@@ -90,10 +90,20 @@ var COMMANDS = [
|
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
name: "tarot:card",
|
|
93
|
-
description: "Look up a specific card
|
|
94
|
-
args: [{ name: "
|
|
93
|
+
description: "Look up a specific card by number or name",
|
|
94
|
+
args: [{ name: "query", type: "string", required: true, description: "Card number (1-78) or name (e.g. 'The Chariot', 'Two of Cups')" }],
|
|
95
95
|
flags: [],
|
|
96
|
-
examples: ["kaabalah tarot:card 7", "kaabalah tarot:card
|
|
96
|
+
examples: ["kaabalah tarot:card 7", 'kaabalah tarot:card "The Chariot" --json', "kaabalah tarot:card chariot --json"]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "tarot:spread",
|
|
100
|
+
description: "Look up multiple tarot cards by name or number",
|
|
101
|
+
args: [{ name: "cards", type: "string", required: true, description: "Card names or numbers, space-separated (quote multi-word names)" }],
|
|
102
|
+
flags: [],
|
|
103
|
+
examples: [
|
|
104
|
+
'kaabalah tarot:spread "Two of Cups" "The Chariot" 7',
|
|
105
|
+
`kaabalah tarot:spread --input-json='{"cards":["Two of Cups","The Chariot","7"]}'`
|
|
106
|
+
]
|
|
97
107
|
},
|
|
98
108
|
{
|
|
99
109
|
name: "ifa",
|
|
@@ -438,7 +448,7 @@ function cmdGematria(text, flags) {
|
|
|
438
448
|
exitWithError("INVALID_ARGUMENT", `Text exceeds maximum length of ${MAX_TEXT_LENGTH} characters.`, flags);
|
|
439
449
|
}
|
|
440
450
|
const sanitized = sanitizeInput(text);
|
|
441
|
-
const result =
|
|
451
|
+
const result = chunkZZ3YMT2R_js.calculateGematria(sanitized, {
|
|
442
452
|
missing: getFlagBool(flags, "missing"),
|
|
443
453
|
percentages: getFlagBool(flags, "percentages")
|
|
444
454
|
});
|
|
@@ -481,7 +491,7 @@ function cmdReverseGematria(target, flags, inputPayload) {
|
|
|
481
491
|
let minLength = inputPayload?.minLength != null ? Number(inputPayload.minLength) : getFlagNumber(flags, "min-length") ?? 2;
|
|
482
492
|
let maxLength = inputPayload?.maxLength != null ? Number(inputPayload.maxLength) : getFlagNumber(flags, "max-length") ?? 6;
|
|
483
493
|
const includeDigraphs = inputPayload?.includeDigraphs != null ? Boolean(inputPayload.includeDigraphs) : getFlagBool(flags, "include-digraphs");
|
|
484
|
-
const result =
|
|
494
|
+
const result = chunkZZ3YMT2R_js.reverseGematria({
|
|
485
495
|
targetSynthesis: targetNum,
|
|
486
496
|
maxResults,
|
|
487
497
|
minLength,
|
|
@@ -504,12 +514,12 @@ Reverse Gematria: target synthesis = ${targetNum}
|
|
|
504
514
|
}
|
|
505
515
|
function cmdNumerology(dateStr, flags) {
|
|
506
516
|
const date = parseDate(dateStr, flags);
|
|
507
|
-
const kaabalistic =
|
|
508
|
-
const straight =
|
|
509
|
-
const challenges =
|
|
510
|
-
const energies =
|
|
511
|
-
const personalYear =
|
|
512
|
-
const fibonacci =
|
|
517
|
+
const kaabalistic = chunk2WENLHIP_js.calculateKaabalisticLifePath(date);
|
|
518
|
+
const straight = chunk2WENLHIP_js.calculateStraightAcrossReductionLifePath(date);
|
|
519
|
+
const challenges = chunk2WENLHIP_js.calculateChallenges(date);
|
|
520
|
+
const energies = chunk2WENLHIP_js.getDateEnergies(date);
|
|
521
|
+
const personalYear = chunk2WENLHIP_js.calculatePersonalYear(date);
|
|
522
|
+
const fibonacci = chunk2WENLHIP_js.calculateFibonacciCycle(date, /* @__PURE__ */ new Date());
|
|
513
523
|
if (isJsonMode(flags)) {
|
|
514
524
|
outputJson({ kaabalistic, straight, challenges, energies, personalYear, fibonacci }, flags);
|
|
515
525
|
return;
|
|
@@ -547,7 +557,7 @@ Numerology Profile: ${dateStr}
|
|
|
547
557
|
}
|
|
548
558
|
function cmdLifePath(dateStr, flags) {
|
|
549
559
|
const date = parseDate(dateStr, flags);
|
|
550
|
-
const result =
|
|
560
|
+
const result = chunk2WENLHIP_js.calculateKaabalisticLifePath(date);
|
|
551
561
|
if (isJsonMode(flags)) {
|
|
552
562
|
outputJson(result, flags);
|
|
553
563
|
return;
|
|
@@ -565,7 +575,7 @@ function cmdCycles(dateStr, firstName, flags) {
|
|
|
565
575
|
const date = parseDate(dateStr, flags);
|
|
566
576
|
const today = /* @__PURE__ */ new Date();
|
|
567
577
|
if (firstName) {
|
|
568
|
-
const result =
|
|
578
|
+
const result = chunk2WENLHIP_js.calculatePersonalCycles(date, today, firstName);
|
|
569
579
|
if (isJsonMode(flags)) {
|
|
570
580
|
outputJson(result, flags);
|
|
571
581
|
return;
|
|
@@ -594,7 +604,7 @@ Personal Cycles: ${dateStr} (${firstName})
|
|
|
594
604
|
console.log(` Month ${m.month}: ${m.value.reducedValue}${active}`);
|
|
595
605
|
}
|
|
596
606
|
} else {
|
|
597
|
-
const result =
|
|
607
|
+
const result = chunk2WENLHIP_js.calculateCycles(date, today);
|
|
598
608
|
if (isJsonMode(flags)) {
|
|
599
609
|
outputJson(result, flags);
|
|
600
610
|
return;
|
|
@@ -630,7 +640,7 @@ Heptad Cycles: ${dateStr}
|
|
|
630
640
|
}
|
|
631
641
|
function cmdChallenges(dateStr, flags) {
|
|
632
642
|
const date = parseDate(dateStr, flags);
|
|
633
|
-
const result =
|
|
643
|
+
const result = chunk2WENLHIP_js.calculateChallenges(date);
|
|
634
644
|
if (isJsonMode(flags)) {
|
|
635
645
|
outputJson(result, flags);
|
|
636
646
|
return;
|
|
@@ -648,7 +658,7 @@ Challenges: ${dateStr}
|
|
|
648
658
|
}
|
|
649
659
|
function cmdFibonacci(dateStr, flags) {
|
|
650
660
|
const date = parseDate(dateStr, flags);
|
|
651
|
-
const result =
|
|
661
|
+
const result = chunk2WENLHIP_js.calculateFibonacciCycle(date, /* @__PURE__ */ new Date());
|
|
652
662
|
if (isJsonMode(flags)) {
|
|
653
663
|
outputJson(result, flags);
|
|
654
664
|
return;
|
|
@@ -690,16 +700,19 @@ Tarot Draw: ${count} card${count > 1 ? "s" : ""}
|
|
|
690
700
|
console.log();
|
|
691
701
|
}
|
|
692
702
|
}
|
|
693
|
-
function
|
|
694
|
-
const num = parseInt(
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
+
function findCardsByQuery(query) {
|
|
704
|
+
const num = parseInt(query, 10);
|
|
705
|
+
if (!isNaN(num)) {
|
|
706
|
+
const card = chunkG5BG73Y5_js.ARKANNUS.find((c) => c.number === num);
|
|
707
|
+
return card ? { cards: [card], exact: true } : { cards: [], exact: false };
|
|
708
|
+
}
|
|
709
|
+
const q = query.toLowerCase();
|
|
710
|
+
const exactMatch = chunkG5BG73Y5_js.ARKANNUS.find((c) => c.tarotCard.toLowerCase() === q);
|
|
711
|
+
if (exactMatch) return { cards: [exactMatch], exact: true };
|
|
712
|
+
const substringMatches = chunkG5BG73Y5_js.ARKANNUS.filter((c) => c.tarotCard.toLowerCase().includes(q));
|
|
713
|
+
return { cards: substringMatches, exact: false };
|
|
714
|
+
}
|
|
715
|
+
function printCard(card) {
|
|
703
716
|
console.log(`
|
|
704
717
|
#${String(card.number).padStart(2, "0")} ${card.tarotCard}`);
|
|
705
718
|
console.log(` Type: ${card.type} | Suit: ${card.suit ?? "major"} | Deck: ${card.deck}`);
|
|
@@ -708,6 +721,44 @@ function cmdTarotCard(numberStr, flags) {
|
|
|
708
721
|
if (card.papusMeaning) console.log(` Papus: ${card.papusMeaning}`);
|
|
709
722
|
console.log();
|
|
710
723
|
}
|
|
724
|
+
function cmdTarotCard(query, flags) {
|
|
725
|
+
const { cards } = findCardsByQuery(query);
|
|
726
|
+
if (cards.length === 0) {
|
|
727
|
+
exitWithError("CARD_NOT_FOUND", `No card found for "${query}". Use a number (1-78) or card name.`, flags);
|
|
728
|
+
}
|
|
729
|
+
if (isJsonMode(flags)) {
|
|
730
|
+
outputJson(cards.length === 1 ? cards[0] : cards, flags);
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
for (const card of cards) {
|
|
734
|
+
printCard(card);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
function cmdTarotSpread(cardQueries, flags) {
|
|
738
|
+
const results = [];
|
|
739
|
+
for (const q of cardQueries) {
|
|
740
|
+
const { cards } = findCardsByQuery(q);
|
|
741
|
+
if (cards.length === 0) {
|
|
742
|
+
results.push({ query: q, error: true, code: "CARD_NOT_FOUND", message: `No card found for "${q}".` });
|
|
743
|
+
} else if (cards.length === 1) {
|
|
744
|
+
results.push(cards[0]);
|
|
745
|
+
} else {
|
|
746
|
+
results.push(...cards);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
if (isJsonMode(flags)) {
|
|
750
|
+
outputJson(results, flags);
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
for (const item of results) {
|
|
754
|
+
if ("error" in item && item.error) {
|
|
755
|
+
console.log(`
|
|
756
|
+
\u2717 "${item.query}": ${item.message}`);
|
|
757
|
+
} else {
|
|
758
|
+
printCard(item);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
711
762
|
function cmdIfa(dateStr, flags) {
|
|
712
763
|
const date = parseDate(dateStr, flags);
|
|
713
764
|
const result = chunk3WVZRLPG_js.calculateOdu(date);
|
|
@@ -728,7 +779,7 @@ Odu: ${dateStr}
|
|
|
728
779
|
console.log();
|
|
729
780
|
}
|
|
730
781
|
function getTree() {
|
|
731
|
-
return
|
|
782
|
+
return chunkT67M2WBD_js.createTree({ system: chunkT67M2WBD_js.SYSTEM, parts: ["westernAstrology", "tarot"] });
|
|
732
783
|
}
|
|
733
784
|
function serializeNode(n) {
|
|
734
785
|
const result = { id: n.id, type: n.type };
|
|
@@ -762,11 +813,11 @@ function cmdTree(flags) {
|
|
|
762
813
|
}
|
|
763
814
|
}
|
|
764
815
|
}
|
|
765
|
-
outputJson({ system:
|
|
816
|
+
outputJson({ system: chunkT67M2WBD_js.SYSTEM, totalNodes: allNodes.length, totalEdges: edges.length, nodes, edges }, flags);
|
|
766
817
|
return;
|
|
767
818
|
}
|
|
768
819
|
console.log(`
|
|
769
|
-
Tree of Life (${
|
|
820
|
+
Tree of Life (${chunkT67M2WBD_js.SYSTEM})
|
|
770
821
|
`);
|
|
771
822
|
console.log(` Total nodes: ${allNodes.length}`);
|
|
772
823
|
const byType = /* @__PURE__ */ new Map();
|
|
@@ -1068,11 +1119,19 @@ async function main() {
|
|
|
1068
1119
|
await cmdTarot(inputPayload?.count ?? args[1], flags);
|
|
1069
1120
|
break;
|
|
1070
1121
|
case "tarot:card":
|
|
1071
|
-
if (!args[1] && inputPayload?.
|
|
1072
|
-
exitWithError("MISSING_ARGUMENT", "Usage: kaabalah tarot:card <
|
|
1122
|
+
if (!args[1] && inputPayload?.query == null) {
|
|
1123
|
+
exitWithError("MISSING_ARGUMENT", "Usage: kaabalah tarot:card <query>", flags);
|
|
1073
1124
|
}
|
|
1074
|
-
cmdTarotCard((inputPayload?.
|
|
1125
|
+
cmdTarotCard((inputPayload?.query != null ? String(inputPayload.query) : void 0) ?? args.slice(1).join(" "), flags);
|
|
1075
1126
|
break;
|
|
1127
|
+
case "tarot:spread": {
|
|
1128
|
+
const cardQueries = Array.isArray(inputPayload?.cards) ? inputPayload.cards.map(String) : args.slice(1);
|
|
1129
|
+
if (cardQueries.length === 0) {
|
|
1130
|
+
exitWithError("MISSING_ARGUMENT", "Usage: kaabalah tarot:spread <card1> [card2] ...", flags);
|
|
1131
|
+
}
|
|
1132
|
+
cmdTarotSpread(cardQueries, flags);
|
|
1133
|
+
break;
|
|
1134
|
+
}
|
|
1076
1135
|
case "ifa":
|
|
1077
1136
|
if (!args[1] && !inputPayload?.date) {
|
|
1078
1137
|
exitWithError("MISSING_ARGUMENT", "Usage: kaabalah ifa <YYYY-MM-DD>", flags);
|