kaabalah 5.6.0 → 6.1.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 +72 -0
- package/dist/astrology/index.d.mts +16 -1
- package/dist/astrology/index.d.ts +16 -1
- package/dist/astrology/index.js +55 -51
- package/dist/astrology/index.mjs +1 -1
- package/dist/{chunk-HGEWHDIX.js → chunk-3JSPGVX3.js} +176 -10
- package/dist/chunk-3JSPGVX3.js.map +1 -0
- package/dist/{chunk-3SFBJHP2.mjs → chunk-G76K6OVQ.mjs} +3 -3
- package/dist/{chunk-3SFBJHP2.mjs.map → chunk-G76K6OVQ.mjs.map} +1 -1
- package/dist/{chunk-U3JFWP24.mjs → chunk-GJB3CZPN.mjs} +1080 -5
- package/dist/chunk-GJB3CZPN.mjs.map +1 -0
- package/dist/{chunk-3HYK4Q4B.js → chunk-HAMDOCS5.js} +273 -2
- package/dist/chunk-HAMDOCS5.js.map +1 -0
- package/dist/chunk-JL7CWPRG.js +850 -0
- package/dist/chunk-JL7CWPRG.js.map +1 -0
- package/dist/chunk-L6M533N6.mjs +843 -0
- package/dist/chunk-L6M533N6.mjs.map +1 -0
- package/dist/{chunk-4NMXTZX4.mjs → chunk-NBP75BAH.mjs} +3 -3
- package/dist/{chunk-4NMXTZX4.mjs.map → chunk-NBP75BAH.mjs.map} +1 -1
- package/dist/{chunk-OGWTKRJK.js → chunk-NPCXF6RV.js} +1089 -10
- package/dist/chunk-NPCXF6RV.js.map +1 -0
- package/dist/{chunk-EVQ432JA.js → chunk-O3ZBG566.js} +23 -23
- package/dist/{chunk-EVQ432JA.js.map → chunk-O3ZBG566.js.map} +1 -1
- package/dist/{chunk-IHQPXEB7.mjs → chunk-RZBVUDBM.mjs} +273 -2
- package/dist/chunk-RZBVUDBM.mjs.map +1 -0
- package/dist/{chunk-S6BFRUJQ.mjs → chunk-S4EJ3ZY7.mjs} +3 -3
- package/dist/{chunk-S6BFRUJQ.mjs.map → chunk-S4EJ3ZY7.mjs.map} +1 -1
- package/dist/{chunk-XB6PXEKO.js → chunk-TMN4PYVG.js} +9 -9
- package/dist/{chunk-XB6PXEKO.js.map → chunk-TMN4PYVG.js.map} +1 -1
- package/dist/{chunk-T6Y4DLMA.mjs → chunk-TZJU6SRX.mjs} +176 -11
- package/dist/chunk-TZJU6SRX.mjs.map +1 -0
- package/dist/{chunk-XTVGQXCL.js → chunk-Y4PTMABP.js} +4 -4
- package/dist/{chunk-XTVGQXCL.js.map → chunk-Y4PTMABP.js.map} +1 -1
- package/dist/cli.js +1213 -52
- package/dist/cli.js.map +1 -1
- package/dist/{constants-DbFwuCjR.d.mts → constants-C0XjrYIG.d.mts} +2 -0
- package/dist/{constants-DbFwuCjR.d.ts → constants-C0XjrYIG.d.ts} +2 -0
- package/dist/core/index.d.mts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +43 -43
- package/dist/core/index.mjs +2 -2
- package/dist/{correspondence-model-D8c42J4c.d.mts → correspondence-model-BrtIu5tW.d.mts} +1 -1
- package/dist/{correspondence-model-DhmBYoMf.d.ts → correspondence-model-CpFOWeBr.d.ts} +1 -1
- package/dist/gematria/index.d.mts +2 -2
- package/dist/gematria/index.d.ts +2 -2
- package/dist/gematria/index.js +5 -5
- package/dist/gematria/index.mjs +2 -2
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +169 -124
- package/dist/index.mjs +7 -6
- package/dist/numerology/index.js +18 -18
- package/dist/numerology/index.mjs +3 -3
- package/dist/semantic/index.d.mts +83 -0
- package/dist/semantic/index.d.ts +83 -0
- package/dist/semantic/index.js +36 -0
- package/dist/semantic/index.js.map +1 -0
- package/dist/semantic/index.mjs +7 -0
- package/dist/semantic/index.mjs.map +1 -0
- package/dist/tarot/index.d.mts +95 -2
- package/dist/tarot/index.d.ts +95 -2
- package/dist/tarot/index.js +28 -12
- package/dist/tarot/index.mjs +3 -3
- package/package.json +6 -1
- package/dist/chunk-3HYK4Q4B.js.map +0 -1
- package/dist/chunk-HGEWHDIX.js.map +0 -1
- package/dist/chunk-IHQPXEB7.mjs.map +0 -1
- package/dist/chunk-OGWTKRJK.js.map +0 -1
- package/dist/chunk-T6Y4DLMA.mjs.map +0 -1
- package/dist/chunk-U3JFWP24.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@ Complete documentation here [https://docs.kaabalah.com/](https://docs.kaabalah.c
|
|
|
13
13
|
- **Astrology**: Generate birth charts and planetary positions using Swiss Ephemeris
|
|
14
14
|
- **Gematria**: Gematria (text numerology) calculations
|
|
15
15
|
- **Tarot**: Card meanings, spreads, and interpretations
|
|
16
|
+
- **Semantic profiles**: Canonical house and tarot theme metadata for deterministic matching
|
|
16
17
|
|
|
17
18
|
## Installation
|
|
18
19
|
|
|
@@ -52,6 +53,7 @@ console.log(gematriaResult);
|
|
|
52
53
|
import { calculateLifePath } from 'kaabalah/numerology';
|
|
53
54
|
import { getBirthChart } from 'kaabalah/astrology';
|
|
54
55
|
import { calculateGematria } from 'kaabalah/kaabalah';
|
|
56
|
+
import { getHouseThemeProfile } from 'kaabalah/semantic';
|
|
55
57
|
import { getRandomSpread } from 'kaabalah/tarot';
|
|
56
58
|
|
|
57
59
|
// Calculate life path number
|
|
@@ -67,6 +69,7 @@ const birthChart = getBirthChart({
|
|
|
67
69
|
|
|
68
70
|
// Calculate Hebrew gematria
|
|
69
71
|
const gematriaValue = calculateGematria('kaabalah');
|
|
72
|
+
const fourthHouse = getHouseThemeProfile(4);
|
|
70
73
|
|
|
71
74
|
// Get a tarot spread
|
|
72
75
|
const spread = getRandomSpread(3, true);
|
|
@@ -97,6 +100,60 @@ const papusImageUrl = resolveTarotImageUrl(
|
|
|
97
100
|
|
|
98
101
|
The tarot resolver currently supports major-card archetypes only. Use `path:<1-22>` as the canonical persisted key, and treat path slugs, major-card filenames, and major-card numbers as lookup aliases.
|
|
99
102
|
|
|
103
|
+
### Canonical Semantic Profiles
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
import {
|
|
107
|
+
getHouseThemeProfile,
|
|
108
|
+
getTarotThemeProfile,
|
|
109
|
+
listHouseThemeProfiles,
|
|
110
|
+
tokenizeOccultThemeText
|
|
111
|
+
} from "kaabalah/semantic";
|
|
112
|
+
|
|
113
|
+
const dreamTokens = tokenizeOccultThemeText(
|
|
114
|
+
"I dreamed about family, roots, and hidden rooms."
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
const fourthHouse = getHouseThemeProfile(4);
|
|
118
|
+
const tower = getTarotThemeProfile("The House of God");
|
|
119
|
+
const houseProfiles = listHouseThemeProfiles();
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Semantic profiles are deterministic, library-owned metadata layered on top of canonical correspondences. Downstream apps should consume the profile `id`, `houseNumber` or `cardNumber`, `keywords`, `tokens`, and grouped `correspondences`, while keeping scoring, ranking, and UI presentation app-side.
|
|
123
|
+
For houses, `primaryLabel` is the semantic life-area label and `houseLabel` preserves the structural astrological label (`Ascendant`, `Imum Coeli`, `Descendant`, `Medium Coeli`, etc.).
|
|
124
|
+
|
|
125
|
+
### Canonical Tarot Spreads
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import {
|
|
129
|
+
drawTarotSpread,
|
|
130
|
+
getTarotSpread,
|
|
131
|
+
listTarotSpreads,
|
|
132
|
+
validateTarotSpreadSelection
|
|
133
|
+
} from "kaabalah/tarot";
|
|
134
|
+
|
|
135
|
+
const spreads = listTarotSpreads();
|
|
136
|
+
const treeOfLife = getTarotSpread("tree-of-life-reading");
|
|
137
|
+
|
|
138
|
+
const drawn = drawTarotSpread({
|
|
139
|
+
spreadId: "event-reading",
|
|
140
|
+
context: { inquirerGender: "man" },
|
|
141
|
+
includeInverted: true
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
const validation = validateTarotSpreadSelection({
|
|
145
|
+
spreadId: drawn.spread.spreadId,
|
|
146
|
+
context: drawn.context,
|
|
147
|
+
cards: drawn.cards.map((card) => ({
|
|
148
|
+
slotKey: card.slotKey,
|
|
149
|
+
cardNumber: card.cardNumber,
|
|
150
|
+
isInverted: card.isInverted
|
|
151
|
+
}))
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Downstream apps should consume `spreadId`, `slotKey`, and the slot constraint metadata from the library instead of hardcoding spread semantics. Persist the reading state as canonical spread/card data such as `spreadId`, `slotKey`, `cardNumber`, `isInverted`, and app-side notes.
|
|
156
|
+
|
|
100
157
|
## CLI
|
|
101
158
|
|
|
102
159
|
Kaabalah includes a command-line interface for quick calculations without writing code.
|
|
@@ -210,6 +267,21 @@ npm run dev
|
|
|
210
267
|
|
|
211
268
|
The astrological calculations use the Swiss Ephemeris library, compiled to WebAssembly for use in both Node.js and browser environments.
|
|
212
269
|
|
|
270
|
+
For Node apps that need stable runtime asset paths, use the exported helper instead of probing `node_modules/kaabalah` manually:
|
|
271
|
+
|
|
272
|
+
```typescript
|
|
273
|
+
import { getSwissEph, resolveSwissEphRuntimeAssets } from "kaabalah/astrology";
|
|
274
|
+
|
|
275
|
+
const assets = resolveSwissEphRuntimeAssets({
|
|
276
|
+
wasmPathCandidates: ["./vendor/kaabalah/swisseph.node.wasm"],
|
|
277
|
+
ephePathCandidates: ["./vendor/kaabalah/ephe"]
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
await getSwissEph(assets);
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
If no app-specific candidates are provided, the helper falls back to the package-bundled Node assets. In browser environments it stays filesystem-free and returns the bundled browser defaults.
|
|
284
|
+
|
|
213
285
|
## License
|
|
214
286
|
|
|
215
287
|
This project is licensed under the AGPL-3.0 license. See the LICENSE file for details.
|
|
@@ -73,6 +73,21 @@ interface PlanetPosition {
|
|
|
73
73
|
}
|
|
74
74
|
declare const normalizeAngle: (deg: number) => number;
|
|
75
75
|
|
|
76
|
+
type RuntimeAssetSource = "explicit" | "env" | "candidate" | "bundled";
|
|
77
|
+
interface SwissEphRuntimeAssetPaths {
|
|
78
|
+
wasmPath: string;
|
|
79
|
+
ephePath: string;
|
|
80
|
+
wasmPathSource: RuntimeAssetSource;
|
|
81
|
+
ephePathSource: RuntimeAssetSource;
|
|
82
|
+
}
|
|
83
|
+
interface ResolveSwissEphRuntimeAssetsOptions {
|
|
84
|
+
wasmPath?: string;
|
|
85
|
+
ephePath?: string;
|
|
86
|
+
wasmPathCandidates?: string[];
|
|
87
|
+
ephePathCandidates?: string[];
|
|
88
|
+
env?: Record<string, string | undefined>;
|
|
89
|
+
}
|
|
90
|
+
declare function resolveSwissEphRuntimeAssets(options?: ResolveSwissEphRuntimeAssetsOptions): SwissEphRuntimeAssetPaths;
|
|
76
91
|
/**
|
|
77
92
|
* Initializes and returns the Swiss Ephemeris instance.
|
|
78
93
|
* In a browser environment, assets are loaded relative to the script.
|
|
@@ -593,4 +608,4 @@ interface SolarReturnChart {
|
|
|
593
608
|
*/
|
|
594
609
|
declare function getSolarReturnChart(options: SolarReturnOptions): Promise<SolarReturnChart>;
|
|
595
610
|
|
|
596
|
-
export { ASTROCARTOGRAPHY_DEFAULT_PLANETS, type AngleType, type AnnualProfection, type AspectEdge, type AspectName, type AspectPerfection, type AspectSpec, type AstrocartographyHorizonLine, type AstrocartographyHorizonPoint, type AstrocartographyLineProximity, type AstrocartographyMap, type AstrocartographyMapOptions, type AstrocartographyMeridianLine, type AstrocartographyParan, type AstrocartographyQueryOptions, type AstrocartographyQueryResult, type AzaltResult, type BirthChart, type BirthChartOptions, CalcFlag, type CompositeChart, type CompositeChartOptions, DEFAULT_ASPECT_SPECS, DOMICILE_RULERS, type DecanResult, type DodecatemoriaResult, EXALTATIONS, type EssentialDignityResult, type FirdariaMajorPeriod, type FirdariaOptions, type FirdariaPlanet, type FirdariaResult, type FirdariaSubPeriod, HouseSystem, type HydratedNode, type HydratedPlanet, type MonthlyProfection, type MonthlyProfectionsResult, PLANET_AND_NODE_NAMES, Planet, type PlanetEquatorial, RiseTransitFlag, SIGNS, SLOW_PLANETS, type Sign, type SolarReturnChart, type SolarReturnOptions, type SynastryChart, type SynastryChartOptions, type TraditionalPlanet, type TransitAspectEdge, type TransitAspectPoint, type TransitChart, type TransitChartOptions, type TransitPlanet, type TransitRangeOptions, type TransitRangeResult, type TwoChartOptions, VirtualNodes, type ZodiacPosition, closeSwissEph, computeAspects, computeAstrocartographyMap, computeEquatorialPositions, computeGMST, computeHorizonLongitude, computeICLongitude, computeMCLongitude, computeMidpoints, computeSynastryAspects, computeTransitAspects, findHouseOf, findParansAtLatitude, formatDegreeMinutes, geographicAngularDifference, getAnnualProfection, getAspectMatch, getBirthChart, getCompositeChart, getDecan, getDetriment, getDodecatemoria, getDomicileRuler, getEssentialDignity, getExaltation, getFall, getFirdaria, getMonthlyProfections, getOppositeSign, getSolarReturnChart, getSwissEph, getSynastryChart, getTransitChart, getTransitRange, getZodiacPosition, normalizeAngle, queryAstrocartographyLocation, shorterArcMidpoint };
|
|
611
|
+
export { ASTROCARTOGRAPHY_DEFAULT_PLANETS, type AngleType, type AnnualProfection, type AspectEdge, type AspectName, type AspectPerfection, type AspectSpec, type AstrocartographyHorizonLine, type AstrocartographyHorizonPoint, type AstrocartographyLineProximity, type AstrocartographyMap, type AstrocartographyMapOptions, type AstrocartographyMeridianLine, type AstrocartographyParan, type AstrocartographyQueryOptions, type AstrocartographyQueryResult, type AzaltResult, type BirthChart, type BirthChartOptions, CalcFlag, type CompositeChart, type CompositeChartOptions, DEFAULT_ASPECT_SPECS, DOMICILE_RULERS, type DecanResult, type DodecatemoriaResult, EXALTATIONS, type EssentialDignityResult, type FirdariaMajorPeriod, type FirdariaOptions, type FirdariaPlanet, type FirdariaResult, type FirdariaSubPeriod, HouseSystem, type HydratedNode, type HydratedPlanet, type MonthlyProfection, type MonthlyProfectionsResult, PLANET_AND_NODE_NAMES, Planet, type PlanetEquatorial, type ResolveSwissEphRuntimeAssetsOptions, RiseTransitFlag, SIGNS, SLOW_PLANETS, type Sign, type SolarReturnChart, type SolarReturnOptions, type SwissEphRuntimeAssetPaths, type SynastryChart, type SynastryChartOptions, type TraditionalPlanet, type TransitAspectEdge, type TransitAspectPoint, type TransitChart, type TransitChartOptions, type TransitPlanet, type TransitRangeOptions, type TransitRangeResult, type TwoChartOptions, VirtualNodes, type ZodiacPosition, closeSwissEph, computeAspects, computeAstrocartographyMap, computeEquatorialPositions, computeGMST, computeHorizonLongitude, computeICLongitude, computeMCLongitude, computeMidpoints, computeSynastryAspects, computeTransitAspects, findHouseOf, findParansAtLatitude, formatDegreeMinutes, geographicAngularDifference, getAnnualProfection, getAspectMatch, getBirthChart, getCompositeChart, getDecan, getDetriment, getDodecatemoria, getDomicileRuler, getEssentialDignity, getExaltation, getFall, getFirdaria, getMonthlyProfections, getOppositeSign, getSolarReturnChart, getSwissEph, getSynastryChart, getTransitChart, getTransitRange, getZodiacPosition, normalizeAngle, queryAstrocartographyLocation, resolveSwissEphRuntimeAssets, shorterArcMidpoint };
|
|
@@ -73,6 +73,21 @@ interface PlanetPosition {
|
|
|
73
73
|
}
|
|
74
74
|
declare const normalizeAngle: (deg: number) => number;
|
|
75
75
|
|
|
76
|
+
type RuntimeAssetSource = "explicit" | "env" | "candidate" | "bundled";
|
|
77
|
+
interface SwissEphRuntimeAssetPaths {
|
|
78
|
+
wasmPath: string;
|
|
79
|
+
ephePath: string;
|
|
80
|
+
wasmPathSource: RuntimeAssetSource;
|
|
81
|
+
ephePathSource: RuntimeAssetSource;
|
|
82
|
+
}
|
|
83
|
+
interface ResolveSwissEphRuntimeAssetsOptions {
|
|
84
|
+
wasmPath?: string;
|
|
85
|
+
ephePath?: string;
|
|
86
|
+
wasmPathCandidates?: string[];
|
|
87
|
+
ephePathCandidates?: string[];
|
|
88
|
+
env?: Record<string, string | undefined>;
|
|
89
|
+
}
|
|
90
|
+
declare function resolveSwissEphRuntimeAssets(options?: ResolveSwissEphRuntimeAssetsOptions): SwissEphRuntimeAssetPaths;
|
|
76
91
|
/**
|
|
77
92
|
* Initializes and returns the Swiss Ephemeris instance.
|
|
78
93
|
* In a browser environment, assets are loaded relative to the script.
|
|
@@ -593,4 +608,4 @@ interface SolarReturnChart {
|
|
|
593
608
|
*/
|
|
594
609
|
declare function getSolarReturnChart(options: SolarReturnOptions): Promise<SolarReturnChart>;
|
|
595
610
|
|
|
596
|
-
export { ASTROCARTOGRAPHY_DEFAULT_PLANETS, type AngleType, type AnnualProfection, type AspectEdge, type AspectName, type AspectPerfection, type AspectSpec, type AstrocartographyHorizonLine, type AstrocartographyHorizonPoint, type AstrocartographyLineProximity, type AstrocartographyMap, type AstrocartographyMapOptions, type AstrocartographyMeridianLine, type AstrocartographyParan, type AstrocartographyQueryOptions, type AstrocartographyQueryResult, type AzaltResult, type BirthChart, type BirthChartOptions, CalcFlag, type CompositeChart, type CompositeChartOptions, DEFAULT_ASPECT_SPECS, DOMICILE_RULERS, type DecanResult, type DodecatemoriaResult, EXALTATIONS, type EssentialDignityResult, type FirdariaMajorPeriod, type FirdariaOptions, type FirdariaPlanet, type FirdariaResult, type FirdariaSubPeriod, HouseSystem, type HydratedNode, type HydratedPlanet, type MonthlyProfection, type MonthlyProfectionsResult, PLANET_AND_NODE_NAMES, Planet, type PlanetEquatorial, RiseTransitFlag, SIGNS, SLOW_PLANETS, type Sign, type SolarReturnChart, type SolarReturnOptions, type SynastryChart, type SynastryChartOptions, type TraditionalPlanet, type TransitAspectEdge, type TransitAspectPoint, type TransitChart, type TransitChartOptions, type TransitPlanet, type TransitRangeOptions, type TransitRangeResult, type TwoChartOptions, VirtualNodes, type ZodiacPosition, closeSwissEph, computeAspects, computeAstrocartographyMap, computeEquatorialPositions, computeGMST, computeHorizonLongitude, computeICLongitude, computeMCLongitude, computeMidpoints, computeSynastryAspects, computeTransitAspects, findHouseOf, findParansAtLatitude, formatDegreeMinutes, geographicAngularDifference, getAnnualProfection, getAspectMatch, getBirthChart, getCompositeChart, getDecan, getDetriment, getDodecatemoria, getDomicileRuler, getEssentialDignity, getExaltation, getFall, getFirdaria, getMonthlyProfections, getOppositeSign, getSolarReturnChart, getSwissEph, getSynastryChart, getTransitChart, getTransitRange, getZodiacPosition, normalizeAngle, queryAstrocartographyLocation, shorterArcMidpoint };
|
|
611
|
+
export { ASTROCARTOGRAPHY_DEFAULT_PLANETS, type AngleType, type AnnualProfection, type AspectEdge, type AspectName, type AspectPerfection, type AspectSpec, type AstrocartographyHorizonLine, type AstrocartographyHorizonPoint, type AstrocartographyLineProximity, type AstrocartographyMap, type AstrocartographyMapOptions, type AstrocartographyMeridianLine, type AstrocartographyParan, type AstrocartographyQueryOptions, type AstrocartographyQueryResult, type AzaltResult, type BirthChart, type BirthChartOptions, CalcFlag, type CompositeChart, type CompositeChartOptions, DEFAULT_ASPECT_SPECS, DOMICILE_RULERS, type DecanResult, type DodecatemoriaResult, EXALTATIONS, type EssentialDignityResult, type FirdariaMajorPeriod, type FirdariaOptions, type FirdariaPlanet, type FirdariaResult, type FirdariaSubPeriod, HouseSystem, type HydratedNode, type HydratedPlanet, type MonthlyProfection, type MonthlyProfectionsResult, PLANET_AND_NODE_NAMES, Planet, type PlanetEquatorial, type ResolveSwissEphRuntimeAssetsOptions, RiseTransitFlag, SIGNS, SLOW_PLANETS, type Sign, type SolarReturnChart, type SolarReturnOptions, type SwissEphRuntimeAssetPaths, type SynastryChart, type SynastryChartOptions, type TraditionalPlanet, type TransitAspectEdge, type TransitAspectPoint, type TransitChart, type TransitChartOptions, type TransitPlanet, type TransitRangeOptions, type TransitRangeResult, type TwoChartOptions, VirtualNodes, type ZodiacPosition, closeSwissEph, computeAspects, computeAstrocartographyMap, computeEquatorialPositions, computeGMST, computeHorizonLongitude, computeICLongitude, computeMCLongitude, computeMidpoints, computeSynastryAspects, computeTransitAspects, findHouseOf, findParansAtLatitude, formatDegreeMinutes, geographicAngularDifference, getAnnualProfection, getAspectMatch, getBirthChart, getCompositeChart, getDecan, getDetriment, getDodecatemoria, getDomicileRuler, getEssentialDignity, getExaltation, getFall, getFirdaria, getMonthlyProfections, getOppositeSign, getSolarReturnChart, getSwissEph, getSynastryChart, getTransitChart, getTransitRange, getZodiacPosition, normalizeAngle, queryAstrocartographyLocation, resolveSwissEphRuntimeAssets, shorterArcMidpoint };
|
package/dist/astrology/index.js
CHANGED
|
@@ -1,209 +1,213 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3JSPGVX3_js = require('../chunk-3JSPGVX3.js');
|
|
4
4
|
require('../chunk-FM7WUVZV.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "ASTROCARTOGRAPHY_DEFAULT_PLANETS", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk3JSPGVX3_js.ASTROCARTOGRAPHY_DEFAULT_PLANETS; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "CalcFlag", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk3JSPGVX3_js.CalcFlag; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "DEFAULT_ASPECT_SPECS", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk3JSPGVX3_js.DEFAULT_ASPECT_SPECS; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "DOMICILE_RULERS", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk3JSPGVX3_js.DOMICILE_RULERS; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "EXALTATIONS", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk3JSPGVX3_js.EXALTATIONS; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "HouseSystem", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk3JSPGVX3_js.HouseSystem; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "PLANET_AND_NODE_NAMES", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk3JSPGVX3_js.PLANET_AND_NODE_NAMES; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "Planet", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunk3JSPGVX3_js.Planet; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "RiseTransitFlag", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunk3JSPGVX3_js.RiseTransitFlag; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "SIGNS", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunk3JSPGVX3_js.SIGNS; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "SLOW_PLANETS", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunk3JSPGVX3_js.SLOW_PLANETS; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "VirtualNodes", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunk3JSPGVX3_js.VirtualNodes; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "closeSwissEph", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunk3JSPGVX3_js.closeSwissEph; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "computeAspects", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunk3JSPGVX3_js.computeAspects; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "computeAstrocartographyMap", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunk3JSPGVX3_js.computeAstrocartographyMap; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "computeEquatorialPositions", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunk3JSPGVX3_js.computeEquatorialPositions; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "computeGMST", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunk3JSPGVX3_js.computeGMST; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "computeHorizonLongitude", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunk3JSPGVX3_js.computeHorizonLongitude; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "computeICLongitude", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunk3JSPGVX3_js.computeICLongitude; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "computeMCLongitude", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunk3JSPGVX3_js.computeMCLongitude; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "computeMidpoints", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunk3JSPGVX3_js.computeMidpoints; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "computeSynastryAspects", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunk3JSPGVX3_js.computeSynastryAspects; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "computeTransitAspects", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunk3JSPGVX3_js.computeTransitAspects; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "findHouseOf", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunk3JSPGVX3_js.findHouseOf; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "findParansAtLatitude", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunk3JSPGVX3_js.findParansAtLatitude; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "formatDegreeMinutes", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunk3JSPGVX3_js.formatDegreeMinutes; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "geographicAngularDifference", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunk3JSPGVX3_js.geographicAngularDifference; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "getAnnualProfection", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunk3JSPGVX3_js.getAnnualProfection; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "getAspectMatch", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunk3JSPGVX3_js.getAspectMatch; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "getBirthChart", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunk3JSPGVX3_js.getBirthChart; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "getCompositeChart", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunk3JSPGVX3_js.getCompositeChart; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "getDecan", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunk3JSPGVX3_js.getDecan; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "getDetriment", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunk3JSPGVX3_js.getDetriment; }
|
|
139
139
|
});
|
|
140
140
|
Object.defineProperty(exports, "getDodecatemoria", {
|
|
141
141
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunk3JSPGVX3_js.getDodecatemoria; }
|
|
143
143
|
});
|
|
144
144
|
Object.defineProperty(exports, "getDomicileRuler", {
|
|
145
145
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunk3JSPGVX3_js.getDomicileRuler; }
|
|
147
147
|
});
|
|
148
148
|
Object.defineProperty(exports, "getEssentialDignity", {
|
|
149
149
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunk3JSPGVX3_js.getEssentialDignity; }
|
|
151
151
|
});
|
|
152
152
|
Object.defineProperty(exports, "getExaltation", {
|
|
153
153
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunk3JSPGVX3_js.getExaltation; }
|
|
155
155
|
});
|
|
156
156
|
Object.defineProperty(exports, "getFall", {
|
|
157
157
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunk3JSPGVX3_js.getFall; }
|
|
159
159
|
});
|
|
160
160
|
Object.defineProperty(exports, "getFirdaria", {
|
|
161
161
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunk3JSPGVX3_js.getFirdaria; }
|
|
163
163
|
});
|
|
164
164
|
Object.defineProperty(exports, "getMonthlyProfections", {
|
|
165
165
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
166
|
+
get: function () { return chunk3JSPGVX3_js.getMonthlyProfections; }
|
|
167
167
|
});
|
|
168
168
|
Object.defineProperty(exports, "getOppositeSign", {
|
|
169
169
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
170
|
+
get: function () { return chunk3JSPGVX3_js.getOppositeSign; }
|
|
171
171
|
});
|
|
172
172
|
Object.defineProperty(exports, "getSolarReturnChart", {
|
|
173
173
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunk3JSPGVX3_js.getSolarReturnChart; }
|
|
175
175
|
});
|
|
176
176
|
Object.defineProperty(exports, "getSwissEph", {
|
|
177
177
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunk3JSPGVX3_js.getSwissEph; }
|
|
179
179
|
});
|
|
180
180
|
Object.defineProperty(exports, "getSynastryChart", {
|
|
181
181
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunk3JSPGVX3_js.getSynastryChart; }
|
|
183
183
|
});
|
|
184
184
|
Object.defineProperty(exports, "getTransitChart", {
|
|
185
185
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
186
|
+
get: function () { return chunk3JSPGVX3_js.getTransitChart; }
|
|
187
187
|
});
|
|
188
188
|
Object.defineProperty(exports, "getTransitRange", {
|
|
189
189
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
190
|
+
get: function () { return chunk3JSPGVX3_js.getTransitRange; }
|
|
191
191
|
});
|
|
192
192
|
Object.defineProperty(exports, "getZodiacPosition", {
|
|
193
193
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunk3JSPGVX3_js.getZodiacPosition; }
|
|
195
195
|
});
|
|
196
196
|
Object.defineProperty(exports, "normalizeAngle", {
|
|
197
197
|
enumerable: true,
|
|
198
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunk3JSPGVX3_js.normalizeAngle; }
|
|
199
199
|
});
|
|
200
200
|
Object.defineProperty(exports, "queryAstrocartographyLocation", {
|
|
201
201
|
enumerable: true,
|
|
202
|
-
get: function () { return
|
|
202
|
+
get: function () { return chunk3JSPGVX3_js.queryAstrocartographyLocation; }
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(exports, "resolveSwissEphRuntimeAssets", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function () { return chunk3JSPGVX3_js.resolveSwissEphRuntimeAssets; }
|
|
203
207
|
});
|
|
204
208
|
Object.defineProperty(exports, "shorterArcMidpoint", {
|
|
205
209
|
enumerable: true,
|
|
206
|
-
get: function () { return
|
|
210
|
+
get: function () { return chunk3JSPGVX3_js.shorterArcMidpoint; }
|
|
207
211
|
});
|
|
208
212
|
//# sourceMappingURL=index.js.map
|
|
209
213
|
//# sourceMappingURL=index.js.map
|
package/dist/astrology/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ASTROCARTOGRAPHY_DEFAULT_PLANETS, CalcFlag, DEFAULT_ASPECT_SPECS, DOMICILE_RULERS, EXALTATIONS, HouseSystem, PLANET_AND_NODE_NAMES, Planet, RiseTransitFlag, SIGNS, SLOW_PLANETS, VirtualNodes, closeSwissEph, computeAspects, computeAstrocartographyMap, computeEquatorialPositions, computeGMST, computeHorizonLongitude, computeICLongitude, computeMCLongitude, computeMidpoints, computeSynastryAspects, computeTransitAspects, findHouseOf, findParansAtLatitude, formatDegreeMinutes, geographicAngularDifference, getAnnualProfection, getAspectMatch, getBirthChart, getCompositeChart, getDecan, getDetriment, getDodecatemoria, getDomicileRuler, getEssentialDignity, getExaltation, getFall, getFirdaria, getMonthlyProfections, getOppositeSign, getSolarReturnChart, getSwissEph, getSynastryChart, getTransitChart, getTransitRange, getZodiacPosition, normalizeAngle, queryAstrocartographyLocation, shorterArcMidpoint } from '../chunk-
|
|
1
|
+
export { ASTROCARTOGRAPHY_DEFAULT_PLANETS, CalcFlag, DEFAULT_ASPECT_SPECS, DOMICILE_RULERS, EXALTATIONS, HouseSystem, PLANET_AND_NODE_NAMES, Planet, RiseTransitFlag, SIGNS, SLOW_PLANETS, VirtualNodes, closeSwissEph, computeAspects, computeAstrocartographyMap, computeEquatorialPositions, computeGMST, computeHorizonLongitude, computeICLongitude, computeMCLongitude, computeMidpoints, computeSynastryAspects, computeTransitAspects, findHouseOf, findParansAtLatitude, formatDegreeMinutes, geographicAngularDifference, getAnnualProfection, getAspectMatch, getBirthChart, getCompositeChart, getDecan, getDetriment, getDodecatemoria, getDomicileRuler, getEssentialDignity, getExaltation, getFall, getFirdaria, getMonthlyProfections, getOppositeSign, getSolarReturnChart, getSwissEph, getSynastryChart, getTransitChart, getTransitRange, getZodiacPosition, normalizeAngle, queryAstrocartographyLocation, resolveSwissEphRuntimeAssets, shorterArcMidpoint } from '../chunk-TZJU6SRX.mjs';
|
|
2
2
|
import '../chunk-WY6NIR2V.mjs';
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
|
4
4
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -481,6 +481,169 @@ var DEFAULT_FLAGS = 2 /* SWISS_EPH */ | 256 /* SPEED */;
|
|
|
481
481
|
var REQUIRED_EPHE_FILES = ["seas_18.se1", "semo_18.se1", "sepl_18.se1"];
|
|
482
482
|
var NODE_EPHE_MOUNT_POINT = "/ephefs";
|
|
483
483
|
var NODE_EPHE_MEMFS_PATH = "/ephemem";
|
|
484
|
+
function emitRuntimeNotice(message) {
|
|
485
|
+
if (typeof process !== "undefined" && process.stderr && typeof process.stderr.write === "function") {
|
|
486
|
+
process.stderr.write(`${message}
|
|
487
|
+
`);
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
console.info(message);
|
|
491
|
+
}
|
|
492
|
+
var SWISS_EPH_RUNTIME_WASM_ENV_KEYS = [
|
|
493
|
+
"KAABALAH_SWISSEPH_WASM_PATH",
|
|
494
|
+
"KAABALAH_WASM_PATH"
|
|
495
|
+
];
|
|
496
|
+
var SWISS_EPH_RUNTIME_EPHE_ENV_KEYS = [
|
|
497
|
+
"KAABALAH_SWISSEPH_EPHE_PATH",
|
|
498
|
+
"KAABALAH_EPHE_PATH"
|
|
499
|
+
];
|
|
500
|
+
function getRuntimeEnv(env) {
|
|
501
|
+
if (env) {
|
|
502
|
+
return env;
|
|
503
|
+
}
|
|
504
|
+
if (typeof process !== "undefined" && process.env) {
|
|
505
|
+
return process.env;
|
|
506
|
+
}
|
|
507
|
+
return {};
|
|
508
|
+
}
|
|
509
|
+
function firstDefinedEnvValue(env, keys) {
|
|
510
|
+
for (const key of keys) {
|
|
511
|
+
const value = env[key];
|
|
512
|
+
if (typeof value === "string" && value.length > 0) {
|
|
513
|
+
return value;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
return void 0;
|
|
517
|
+
}
|
|
518
|
+
function getBundledNodeSwissEphAssets(options) {
|
|
519
|
+
if (options.bundledNodeWasmPath && options.bundledNodeEphePath) {
|
|
520
|
+
return {
|
|
521
|
+
wasmPaths: [options.bundledNodeWasmPath],
|
|
522
|
+
ephePaths: [options.bundledNodeEphePath]
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
const resolvePath = options.nodePathResolve ?? ((...paths) => chunkFM7WUVZV_js.__require("path").resolve(...paths));
|
|
526
|
+
return {
|
|
527
|
+
wasmPaths: [
|
|
528
|
+
options.bundledNodeWasmPath,
|
|
529
|
+
resolvePath(__dirname, swisseph_node_default),
|
|
530
|
+
resolvePath(__dirname, "../../wasm/build/swisseph.node.wasm"),
|
|
531
|
+
resolvePath(__dirname, "../wasm/build/swisseph.node.wasm")
|
|
532
|
+
].filter((value) => typeof value === "string"),
|
|
533
|
+
ephePaths: [
|
|
534
|
+
options.bundledNodeEphePath,
|
|
535
|
+
resolvePath(__dirname, "../../ephe"),
|
|
536
|
+
resolvePath(__dirname, "../ephe")
|
|
537
|
+
].filter((value) => typeof value === "string")
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
function getBundledBrowserSwissEphAssets(options) {
|
|
541
|
+
return {
|
|
542
|
+
wasmPath: options.bundledBrowserWasmPath ?? swisseph_web_default,
|
|
543
|
+
ephePath: options.bundledBrowserEphePath ?? "../ephe"
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
function formatCandidatePaths(paths) {
|
|
547
|
+
return paths.length > 0 ? paths.join(", ") : "(none)";
|
|
548
|
+
}
|
|
549
|
+
function resolveBundledRuntimeAssetPath(label, bundledPaths, existsSync) {
|
|
550
|
+
for (const bundledPath of bundledPaths) {
|
|
551
|
+
if (existsSync(bundledPath)) {
|
|
552
|
+
return {
|
|
553
|
+
path: bundledPath,
|
|
554
|
+
source: "bundled"
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
throw new Error(
|
|
559
|
+
`Unable to resolve Swiss Ephemeris ${label}. Bundled paths checked: ${formatCandidatePaths(
|
|
560
|
+
bundledPaths
|
|
561
|
+
)}.`
|
|
562
|
+
);
|
|
563
|
+
}
|
|
564
|
+
function resolveRuntimeAssetPath(label, explicitPath, envPath, candidatePaths, bundledPaths, existsSync) {
|
|
565
|
+
if (explicitPath) {
|
|
566
|
+
if (!existsSync(explicitPath)) {
|
|
567
|
+
throw new Error(
|
|
568
|
+
`Swiss Ephemeris ${label} override does not exist: "${explicitPath}".`
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
return {
|
|
572
|
+
path: explicitPath,
|
|
573
|
+
source: "explicit"
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
if (envPath) {
|
|
577
|
+
if (!existsSync(envPath)) {
|
|
578
|
+
throw new Error(
|
|
579
|
+
`Swiss Ephemeris ${label} from environment does not exist: "${envPath}".`
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
return {
|
|
583
|
+
path: envPath,
|
|
584
|
+
source: "env"
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
for (const candidatePath of candidatePaths) {
|
|
588
|
+
if (existsSync(candidatePath)) {
|
|
589
|
+
return {
|
|
590
|
+
path: candidatePath,
|
|
591
|
+
source: "candidate"
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
try {
|
|
596
|
+
return resolveBundledRuntimeAssetPath(label, bundledPaths, existsSync);
|
|
597
|
+
} catch (error) {
|
|
598
|
+
throw new Error(
|
|
599
|
+
`Unable to resolve Swiss Ephemeris ${label}. Checked candidate paths: ${formatCandidatePaths(
|
|
600
|
+
candidatePaths
|
|
601
|
+
)}. ${toError(error).message}`
|
|
602
|
+
);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
function resolveSwissEphRuntimeAssetsInternal(options = {}) {
|
|
606
|
+
const isBrowser = options.isBrowser ?? typeof window !== "undefined";
|
|
607
|
+
if (isBrowser) {
|
|
608
|
+
const bundledAssets2 = getBundledBrowserSwissEphAssets(options);
|
|
609
|
+
return {
|
|
610
|
+
wasmPath: options.wasmPath ?? bundledAssets2.wasmPath,
|
|
611
|
+
ephePath: options.ephePath ?? bundledAssets2.ephePath,
|
|
612
|
+
wasmPathSource: options.wasmPath ? "explicit" : "bundled",
|
|
613
|
+
ephePathSource: options.ephePath ? "explicit" : "bundled"
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
const env = getRuntimeEnv(options.env);
|
|
617
|
+
const existsSync = options.existsSync ?? ((path) => chunkFM7WUVZV_js.__require("fs").existsSync(path));
|
|
618
|
+
const bundledAssets = getBundledNodeSwissEphAssets(options);
|
|
619
|
+
const envWasmPath = firstDefinedEnvValue(env, SWISS_EPH_RUNTIME_WASM_ENV_KEYS);
|
|
620
|
+
const envEphePath = firstDefinedEnvValue(env, SWISS_EPH_RUNTIME_EPHE_ENV_KEYS);
|
|
621
|
+
const resolvedWasm = resolveRuntimeAssetPath(
|
|
622
|
+
"wasmPath",
|
|
623
|
+
options.wasmPath,
|
|
624
|
+
envWasmPath,
|
|
625
|
+
options.wasmPathCandidates ?? [],
|
|
626
|
+
bundledAssets.wasmPaths,
|
|
627
|
+
existsSync
|
|
628
|
+
);
|
|
629
|
+
const resolvedEphe = resolveRuntimeAssetPath(
|
|
630
|
+
"ephePath",
|
|
631
|
+
options.ephePath,
|
|
632
|
+
envEphePath,
|
|
633
|
+
options.ephePathCandidates ?? [],
|
|
634
|
+
bundledAssets.ephePaths,
|
|
635
|
+
existsSync
|
|
636
|
+
);
|
|
637
|
+
return {
|
|
638
|
+
wasmPath: resolvedWasm.path,
|
|
639
|
+
ephePath: resolvedEphe.path,
|
|
640
|
+
wasmPathSource: resolvedWasm.source,
|
|
641
|
+
ephePathSource: resolvedEphe.source
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
function resolveSwissEphRuntimeAssets(options = {}) {
|
|
645
|
+
return resolveSwissEphRuntimeAssetsInternal(options);
|
|
646
|
+
}
|
|
484
647
|
function normalizeVirtualPath(path) {
|
|
485
648
|
if (path === "/") {
|
|
486
649
|
return path;
|
|
@@ -654,15 +817,17 @@ async function getSwissEph(options = {}) {
|
|
|
654
817
|
}
|
|
655
818
|
try {
|
|
656
819
|
const isBrowser = typeof window !== "undefined";
|
|
657
|
-
const
|
|
658
|
-
|
|
820
|
+
const runtimeAssets = resolveSwissEphRuntimeAssets({
|
|
821
|
+
wasmPath: options.wasmPath,
|
|
822
|
+
ephePath: options.ephePath
|
|
823
|
+
});
|
|
824
|
+
const finalWasmPath = runtimeAssets.wasmPath;
|
|
659
825
|
const moduleFactory = isBrowser ? (await import('./swisseph.web-MXYBWOOS.js')).default : (await import('./swisseph.node-UD2JYYLE.js')).default;
|
|
660
826
|
const module = await moduleFactory({
|
|
661
827
|
locateFile: () => finalWasmPath
|
|
662
828
|
});
|
|
663
829
|
const instance = new SwissEph(module);
|
|
664
|
-
const
|
|
665
|
-
const finalEphePath = options.ephePath || defaultEphePath;
|
|
830
|
+
const finalEphePath = runtimeAssets.ephePath;
|
|
666
831
|
if (isBrowser) {
|
|
667
832
|
const epheFsPath = "/ephe";
|
|
668
833
|
try {
|
|
@@ -690,16 +855,16 @@ async function getSwissEph(options = {}) {
|
|
|
690
855
|
`Failed to materialize browser ephemeris files at "${epheFsPath}". Missing: ${browserCheck.missingFiles.join(", ")}.`
|
|
691
856
|
);
|
|
692
857
|
}
|
|
693
|
-
|
|
858
|
+
emitRuntimeNotice(`Setting ephemeris path to: ${epheFsPath}`);
|
|
694
859
|
instance.setEphemerisPath(epheFsPath);
|
|
695
860
|
} else {
|
|
696
861
|
const resolution = resolveNodeEphemerisPath(module, finalEphePath);
|
|
697
862
|
if (resolution.strategy === "nodefs-mount") {
|
|
698
|
-
|
|
863
|
+
emitRuntimeNotice(`Setting ephemeris path to: ${resolution.path} (mounted from ${finalEphePath})`);
|
|
699
864
|
} else if (resolution.strategy === "memfs-copy") {
|
|
700
|
-
|
|
865
|
+
emitRuntimeNotice(`Setting ephemeris path to: ${resolution.path} (copied from ${finalEphePath})`);
|
|
701
866
|
} else {
|
|
702
|
-
|
|
867
|
+
emitRuntimeNotice(`Setting ephemeris path to: ${resolution.path}`);
|
|
703
868
|
}
|
|
704
869
|
instance.setEphemerisPath(resolution.path);
|
|
705
870
|
}
|
|
@@ -2036,6 +2201,7 @@ exports.getTransitRange = getTransitRange;
|
|
|
2036
2201
|
exports.getZodiacPosition = getZodiacPosition;
|
|
2037
2202
|
exports.normalizeAngle = normalizeAngle;
|
|
2038
2203
|
exports.queryAstrocartographyLocation = queryAstrocartographyLocation;
|
|
2204
|
+
exports.resolveSwissEphRuntimeAssets = resolveSwissEphRuntimeAssets;
|
|
2039
2205
|
exports.shorterArcMidpoint = shorterArcMidpoint;
|
|
2040
|
-
//# sourceMappingURL=chunk-
|
|
2041
|
-
//# sourceMappingURL=chunk-
|
|
2206
|
+
//# sourceMappingURL=chunk-3JSPGVX3.js.map
|
|
2207
|
+
//# sourceMappingURL=chunk-3JSPGVX3.js.map
|