kaabalah 5.1.1 → 5.3.0

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/README.md CHANGED
@@ -20,6 +20,8 @@ Complete documentation here [https://docs.kaabalah.com/](https://docs.kaabalah.c
20
20
  npm install kaabalah
21
21
  ```
22
22
 
23
+ Node.js 18.18+ is required for the bundled CLI and runtime helpers.
24
+
23
25
  ## Support us on Ko-Fi
24
26
 
25
27
  If you find this package useful, you can support it on Ko-Fi too (or just star the repo):
@@ -93,7 +95,9 @@ npx kaabalah help
93
95
  | `numerology:cycles <date> [name]` | Personal cycles (year, month, periods) |
94
96
  | `numerology:challenges <date>` | Challenges from birth date |
95
97
  | `numerology:fibonacci <date>` | Fibonacci cycle for current age |
96
- | `astrology <date> [time]` | Calculate birth chart using Swiss Ephemeris |
98
+ | `astrology <date> [time]` | Calculate birth chart with aspects using Swiss Ephemeris |
99
+ | `astrology:synastry` | Cross-chart aspects between two birth charts (via `--input-json`) |
100
+ | `astrology:composite` | Midpoint composite chart from two birth charts (via `--input-json`) |
97
101
  | `tarot [count]` | Draw tarot cards (default: 3) |
98
102
  | `tarot:card <number>` | Look up a specific card (1-78) |
99
103
  | `ifa <date>` | Calculate Odu from a date |
@@ -114,6 +118,12 @@ kaabalah ifa 1990-01-15
114
118
  kaabalah astrology 1990-01-15 14:30 --lat=40.7128 --lon=-74.006
115
119
  kaabalah astrology 1990-01-15 14:30 --location="New York, USA"
116
120
 
121
+ # Synastry (cross-chart aspects)
122
+ kaabalah astrology:synastry --input-json=- --json < synastry.json
123
+
124
+ # Composite (midpoint chart)
125
+ kaabalah astrology:composite --input-json=- --json < composite.json
126
+
117
127
  # Tree of Life correspondences
118
128
  kaabalah tree:node path:1 --json
119
129
  kaabalah tree:node "tarotArkAnnu:The Magician" --depth=2 --json
@@ -128,7 +138,9 @@ kaabalah tree:node sphere:Kether --type=tarotArkAnnu --json
128
138
  | `--no-json` | Force human-readable output even when piped |
129
139
  | `--compact` | Minified JSON (no indentation) |
130
140
  | `--fields=a.b,c.d` | Filter JSON output to specified dot-paths |
131
- | `--input-json='{"key":"val"}'` | Pass all parameters as a JSON object |
141
+ | `--input-json=-` | Read a JSON object from stdin |
142
+ | `--debug` | Emit debug logs to stderr (same effect as `DEBUG=kaabalah:*`) |
143
+ | `--trace` | Print stack traces for unexpected fatal errors in human-readable mode |
132
144
 
133
145
  ### Schema Introspection
134
146
 
@@ -140,6 +152,19 @@ kaabalah help --json
140
152
  kaabalah help astrology --json
141
153
  ```
142
154
 
155
+ ### Debugging
156
+
157
+ ```bash
158
+ # Emit parser/config/astrology debug logs to stderr
159
+ DEBUG=kaabalah:* kaabalah help --json
160
+
161
+ # Same as above, but from the CLI flag
162
+ kaabalah astrology 1990-01-15 14:30 --lat=40.7128 --lon=-74.006 --debug
163
+
164
+ # Add --trace while reproducing an unexpected fatal error locally
165
+ kaabalah <command> --trace --no-json
166
+ ```
167
+
143
168
  ## Development
144
169
 
145
170
  This project uses TypeScript and WebAssembly for the Swiss Ephemeris calculations.
@@ -118,6 +118,44 @@ type TimeZoneOptions = {
118
118
  treatAsUTC?: boolean;
119
119
  };
120
120
 
121
+ type AspectName = "conjunction" | "duodecile" | "octile" | "sextile" | "square" | "trine" | "trioctile" | "quincunx" | "opposition";
122
+ interface AspectSpec {
123
+ name: AspectName;
124
+ angle: number;
125
+ orb: number;
126
+ }
127
+ declare const DEFAULT_ASPECT_SPECS: AspectSpec[];
128
+ interface AspectEdge {
129
+ planetA: string;
130
+ planetB: string;
131
+ longitudeA: number;
132
+ longitudeB: number;
133
+ aspect: AspectName;
134
+ aspectAngle: number;
135
+ delta: number;
136
+ orb: number;
137
+ }
138
+ declare function getAspectMatch(lonA: number, lonB: number, specs?: AspectSpec[]): {
139
+ spec: AspectSpec;
140
+ orb: number;
141
+ delta: number;
142
+ } | null;
143
+ declare function computeAspects(planets: Record<string, {
144
+ longitude: number;
145
+ }>, specs?: AspectSpec[]): AspectEdge[];
146
+ declare function computeSynastryAspects(planetsA: Record<string, {
147
+ longitude: number;
148
+ }>, planetsB: Record<string, {
149
+ longitude: number;
150
+ }>, specs?: AspectSpec[]): AspectEdge[];
151
+ /** Shorter-arc midpoint of two ecliptic longitudes. */
152
+ declare function shorterArcMidpoint(a: number, b: number): number;
153
+ declare function computeMidpoints(planetsA: Record<string, {
154
+ longitude: number;
155
+ }>, planetsB: Record<string, {
156
+ longitude: number;
157
+ }>): Record<string, number>;
158
+
121
159
  /**
122
160
  * Astrological calculations using Swiss Ephemeris
123
161
  */
@@ -165,6 +203,7 @@ interface BirthChart {
165
203
  polasc?: ZodiacPosition;
166
204
  };
167
205
  };
206
+ aspects: AspectEdge[];
168
207
  }
169
208
  /**
170
209
  * Calculate a birth chart using Swiss Ephemeris
@@ -189,5 +228,30 @@ declare function formatDegreeMinutes(decimalDegrees: number): string;
189
228
  */
190
229
  declare function getZodiacPosition(longitude: number, houseCusps: number[]): ZodiacPosition;
191
230
  declare function findHouseOf(longitude: number, housePositions: number[]): number;
231
+ interface TwoChartOptions {
232
+ chartA: BirthChartOptions;
233
+ chartB: BirthChartOptions;
234
+ aspectSpecs?: AspectSpec[];
235
+ }
236
+ type SynastryChartOptions = TwoChartOptions;
237
+ type CompositeChartOptions = TwoChartOptions;
238
+ interface SynastryChart {
239
+ chartA: BirthChart;
240
+ chartB: BirthChart;
241
+ aspects: AspectEdge[];
242
+ }
243
+ interface CompositeChart {
244
+ chartA: BirthChart;
245
+ chartB: BirthChart;
246
+ compositePlanets: Record<string, {
247
+ name: string;
248
+ longitude: number;
249
+ zodiacPosition: ZodiacPosition;
250
+ }>;
251
+ compositeHouses: ZodiacPosition[];
252
+ aspects: AspectEdge[];
253
+ }
254
+ declare function getSynastryChart(options: SynastryChartOptions): Promise<SynastryChart>;
255
+ declare function getCompositeChart(options: CompositeChartOptions): Promise<CompositeChart>;
192
256
 
193
- export { type BirthChart, type BirthChartOptions, CalcFlag, HouseSystem, type HydratedNode, type HydratedPlanet, PLANET_AND_NODE_NAMES, Planet, SIGNS, VirtualNodes, type ZodiacPosition, closeSwissEph, findHouseOf, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle };
257
+ export { type AspectEdge, type AspectName, type AspectSpec, type BirthChart, type BirthChartOptions, CalcFlag, type CompositeChart, type CompositeChartOptions, DEFAULT_ASPECT_SPECS, HouseSystem, type HydratedNode, type HydratedPlanet, PLANET_AND_NODE_NAMES, Planet, SIGNS, type SynastryChart, type SynastryChartOptions, type TwoChartOptions, VirtualNodes, type ZodiacPosition, closeSwissEph, computeAspects, computeMidpoints, computeSynastryAspects, findHouseOf, formatDegreeMinutes, getAspectMatch, getBirthChart, getCompositeChart, getSwissEph, getSynastryChart, getZodiacPosition, normalizeAngle, shorterArcMidpoint };
@@ -118,6 +118,44 @@ type TimeZoneOptions = {
118
118
  treatAsUTC?: boolean;
119
119
  };
120
120
 
121
+ type AspectName = "conjunction" | "duodecile" | "octile" | "sextile" | "square" | "trine" | "trioctile" | "quincunx" | "opposition";
122
+ interface AspectSpec {
123
+ name: AspectName;
124
+ angle: number;
125
+ orb: number;
126
+ }
127
+ declare const DEFAULT_ASPECT_SPECS: AspectSpec[];
128
+ interface AspectEdge {
129
+ planetA: string;
130
+ planetB: string;
131
+ longitudeA: number;
132
+ longitudeB: number;
133
+ aspect: AspectName;
134
+ aspectAngle: number;
135
+ delta: number;
136
+ orb: number;
137
+ }
138
+ declare function getAspectMatch(lonA: number, lonB: number, specs?: AspectSpec[]): {
139
+ spec: AspectSpec;
140
+ orb: number;
141
+ delta: number;
142
+ } | null;
143
+ declare function computeAspects(planets: Record<string, {
144
+ longitude: number;
145
+ }>, specs?: AspectSpec[]): AspectEdge[];
146
+ declare function computeSynastryAspects(planetsA: Record<string, {
147
+ longitude: number;
148
+ }>, planetsB: Record<string, {
149
+ longitude: number;
150
+ }>, specs?: AspectSpec[]): AspectEdge[];
151
+ /** Shorter-arc midpoint of two ecliptic longitudes. */
152
+ declare function shorterArcMidpoint(a: number, b: number): number;
153
+ declare function computeMidpoints(planetsA: Record<string, {
154
+ longitude: number;
155
+ }>, planetsB: Record<string, {
156
+ longitude: number;
157
+ }>): Record<string, number>;
158
+
121
159
  /**
122
160
  * Astrological calculations using Swiss Ephemeris
123
161
  */
@@ -165,6 +203,7 @@ interface BirthChart {
165
203
  polasc?: ZodiacPosition;
166
204
  };
167
205
  };
206
+ aspects: AspectEdge[];
168
207
  }
169
208
  /**
170
209
  * Calculate a birth chart using Swiss Ephemeris
@@ -189,5 +228,30 @@ declare function formatDegreeMinutes(decimalDegrees: number): string;
189
228
  */
190
229
  declare function getZodiacPosition(longitude: number, houseCusps: number[]): ZodiacPosition;
191
230
  declare function findHouseOf(longitude: number, housePositions: number[]): number;
231
+ interface TwoChartOptions {
232
+ chartA: BirthChartOptions;
233
+ chartB: BirthChartOptions;
234
+ aspectSpecs?: AspectSpec[];
235
+ }
236
+ type SynastryChartOptions = TwoChartOptions;
237
+ type CompositeChartOptions = TwoChartOptions;
238
+ interface SynastryChart {
239
+ chartA: BirthChart;
240
+ chartB: BirthChart;
241
+ aspects: AspectEdge[];
242
+ }
243
+ interface CompositeChart {
244
+ chartA: BirthChart;
245
+ chartB: BirthChart;
246
+ compositePlanets: Record<string, {
247
+ name: string;
248
+ longitude: number;
249
+ zodiacPosition: ZodiacPosition;
250
+ }>;
251
+ compositeHouses: ZodiacPosition[];
252
+ aspects: AspectEdge[];
253
+ }
254
+ declare function getSynastryChart(options: SynastryChartOptions): Promise<SynastryChart>;
255
+ declare function getCompositeChart(options: CompositeChartOptions): Promise<CompositeChart>;
192
256
 
193
- export { type BirthChart, type BirthChartOptions, CalcFlag, HouseSystem, type HydratedNode, type HydratedPlanet, PLANET_AND_NODE_NAMES, Planet, SIGNS, VirtualNodes, type ZodiacPosition, closeSwissEph, findHouseOf, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle };
257
+ export { type AspectEdge, type AspectName, type AspectSpec, type BirthChart, type BirthChartOptions, CalcFlag, type CompositeChart, type CompositeChartOptions, DEFAULT_ASPECT_SPECS, HouseSystem, type HydratedNode, type HydratedPlanet, PLANET_AND_NODE_NAMES, Planet, SIGNS, type SynastryChart, type SynastryChartOptions, type TwoChartOptions, VirtualNodes, type ZodiacPosition, closeSwissEph, computeAspects, computeMidpoints, computeSynastryAspects, findHouseOf, formatDegreeMinutes, getAspectMatch, getBirthChart, getCompositeChart, getSwissEph, getSynastryChart, getZodiacPosition, normalizeAngle, shorterArcMidpoint };
@@ -1,61 +1,93 @@
1
1
  'use strict';
2
2
 
3
- var chunk7AXRFYPX_js = require('../chunk-7AXRFYPX.js');
3
+ var chunkAHUZONHJ_js = require('../chunk-AHUZONHJ.js');
4
4
  require('../chunk-FM7WUVZV.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "CalcFlag", {
9
9
  enumerable: true,
10
- get: function () { return chunk7AXRFYPX_js.CalcFlag; }
10
+ get: function () { return chunkAHUZONHJ_js.CalcFlag; }
11
+ });
12
+ Object.defineProperty(exports, "DEFAULT_ASPECT_SPECS", {
13
+ enumerable: true,
14
+ get: function () { return chunkAHUZONHJ_js.DEFAULT_ASPECT_SPECS; }
11
15
  });
12
16
  Object.defineProperty(exports, "HouseSystem", {
13
17
  enumerable: true,
14
- get: function () { return chunk7AXRFYPX_js.HouseSystem; }
18
+ get: function () { return chunkAHUZONHJ_js.HouseSystem; }
15
19
  });
16
20
  Object.defineProperty(exports, "PLANET_AND_NODE_NAMES", {
17
21
  enumerable: true,
18
- get: function () { return chunk7AXRFYPX_js.PLANET_AND_NODE_NAMES; }
22
+ get: function () { return chunkAHUZONHJ_js.PLANET_AND_NODE_NAMES; }
19
23
  });
20
24
  Object.defineProperty(exports, "Planet", {
21
25
  enumerable: true,
22
- get: function () { return chunk7AXRFYPX_js.Planet; }
26
+ get: function () { return chunkAHUZONHJ_js.Planet; }
23
27
  });
24
28
  Object.defineProperty(exports, "SIGNS", {
25
29
  enumerable: true,
26
- get: function () { return chunk7AXRFYPX_js.SIGNS; }
30
+ get: function () { return chunkAHUZONHJ_js.SIGNS; }
27
31
  });
28
32
  Object.defineProperty(exports, "VirtualNodes", {
29
33
  enumerable: true,
30
- get: function () { return chunk7AXRFYPX_js.VirtualNodes; }
34
+ get: function () { return chunkAHUZONHJ_js.VirtualNodes; }
31
35
  });
32
36
  Object.defineProperty(exports, "closeSwissEph", {
33
37
  enumerable: true,
34
- get: function () { return chunk7AXRFYPX_js.closeSwissEph; }
38
+ get: function () { return chunkAHUZONHJ_js.closeSwissEph; }
39
+ });
40
+ Object.defineProperty(exports, "computeAspects", {
41
+ enumerable: true,
42
+ get: function () { return chunkAHUZONHJ_js.computeAspects; }
43
+ });
44
+ Object.defineProperty(exports, "computeMidpoints", {
45
+ enumerable: true,
46
+ get: function () { return chunkAHUZONHJ_js.computeMidpoints; }
47
+ });
48
+ Object.defineProperty(exports, "computeSynastryAspects", {
49
+ enumerable: true,
50
+ get: function () { return chunkAHUZONHJ_js.computeSynastryAspects; }
35
51
  });
36
52
  Object.defineProperty(exports, "findHouseOf", {
37
53
  enumerable: true,
38
- get: function () { return chunk7AXRFYPX_js.findHouseOf; }
54
+ get: function () { return chunkAHUZONHJ_js.findHouseOf; }
39
55
  });
40
56
  Object.defineProperty(exports, "formatDegreeMinutes", {
41
57
  enumerable: true,
42
- get: function () { return chunk7AXRFYPX_js.formatDegreeMinutes; }
58
+ get: function () { return chunkAHUZONHJ_js.formatDegreeMinutes; }
59
+ });
60
+ Object.defineProperty(exports, "getAspectMatch", {
61
+ enumerable: true,
62
+ get: function () { return chunkAHUZONHJ_js.getAspectMatch; }
43
63
  });
44
64
  Object.defineProperty(exports, "getBirthChart", {
45
65
  enumerable: true,
46
- get: function () { return chunk7AXRFYPX_js.getBirthChart; }
66
+ get: function () { return chunkAHUZONHJ_js.getBirthChart; }
67
+ });
68
+ Object.defineProperty(exports, "getCompositeChart", {
69
+ enumerable: true,
70
+ get: function () { return chunkAHUZONHJ_js.getCompositeChart; }
47
71
  });
48
72
  Object.defineProperty(exports, "getSwissEph", {
49
73
  enumerable: true,
50
- get: function () { return chunk7AXRFYPX_js.getSwissEph; }
74
+ get: function () { return chunkAHUZONHJ_js.getSwissEph; }
75
+ });
76
+ Object.defineProperty(exports, "getSynastryChart", {
77
+ enumerable: true,
78
+ get: function () { return chunkAHUZONHJ_js.getSynastryChart; }
51
79
  });
52
80
  Object.defineProperty(exports, "getZodiacPosition", {
53
81
  enumerable: true,
54
- get: function () { return chunk7AXRFYPX_js.getZodiacPosition; }
82
+ get: function () { return chunkAHUZONHJ_js.getZodiacPosition; }
55
83
  });
56
84
  Object.defineProperty(exports, "normalizeAngle", {
57
85
  enumerable: true,
58
- get: function () { return chunk7AXRFYPX_js.normalizeAngle; }
86
+ get: function () { return chunkAHUZONHJ_js.normalizeAngle; }
87
+ });
88
+ Object.defineProperty(exports, "shorterArcMidpoint", {
89
+ enumerable: true,
90
+ get: function () { return chunkAHUZONHJ_js.shorterArcMidpoint; }
59
91
  });
60
92
  //# sourceMappingURL=index.js.map
61
93
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- export { CalcFlag, HouseSystem, PLANET_AND_NODE_NAMES, Planet, SIGNS, VirtualNodes, closeSwissEph, findHouseOf, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle } from '../chunk-A5ME4PFX.mjs';
1
+ export { CalcFlag, DEFAULT_ASPECT_SPECS, HouseSystem, PLANET_AND_NODE_NAMES, Planet, SIGNS, VirtualNodes, closeSwissEph, computeAspects, computeMidpoints, computeSynastryAspects, findHouseOf, formatDegreeMinutes, getAspectMatch, getBirthChart, getCompositeChart, getSwissEph, getSynastryChart, getZodiacPosition, normalizeAngle, shorterArcMidpoint } from '../chunk-VSTGPXLM.mjs';
2
2
  import '../chunk-WY6NIR2V.mjs';
3
3
  //# sourceMappingURL=index.mjs.map
4
4
  //# sourceMappingURL=index.mjs.map