kaabalah 5.5.1 → 6.0.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.
Files changed (66) hide show
  1. package/README.md +72 -0
  2. package/dist/astrology/index.d.mts +16 -1
  3. package/dist/astrology/index.d.ts +16 -1
  4. package/dist/astrology/index.js +55 -51
  5. package/dist/astrology/index.mjs +1 -1
  6. package/dist/{chunk-BJUCABP4.js → chunk-3HYK4Q4B.js} +123 -10
  7. package/dist/chunk-3HYK4Q4B.js.map +1 -0
  8. package/dist/{chunk-27IU6FA2.mjs → chunk-3SFBJHP2.mjs} +3 -3
  9. package/dist/{chunk-27IU6FA2.mjs.map → chunk-3SFBJHP2.mjs.map} +1 -1
  10. package/dist/chunk-4NMXTZX4.mjs +525 -0
  11. package/dist/chunk-4NMXTZX4.mjs.map +1 -0
  12. package/dist/{chunk-T6Y4DLMA.mjs → chunk-5NCI7UPZ.mjs} +176 -11
  13. package/dist/chunk-5NCI7UPZ.mjs.map +1 -0
  14. package/dist/chunk-7IXAG4KW.mjs +2136 -0
  15. package/dist/chunk-7IXAG4KW.mjs.map +1 -0
  16. package/dist/{chunk-HGEWHDIX.js → chunk-DU5HI6CU.js} +176 -10
  17. package/dist/chunk-DU5HI6CU.js.map +1 -0
  18. package/dist/{chunk-PEAOQ7YH.js → chunk-EVQ432JA.js} +23 -23
  19. package/dist/{chunk-PEAOQ7YH.js.map → chunk-EVQ432JA.js.map} +1 -1
  20. package/dist/{chunk-PPSRTX52.mjs → chunk-IHQPXEB7.mjs} +123 -11
  21. package/dist/chunk-IHQPXEB7.mjs.map +1 -0
  22. package/dist/{chunk-W5UTGQI2.mjs → chunk-S6BFRUJQ.mjs} +3 -3
  23. package/dist/{chunk-W5UTGQI2.mjs.map → chunk-S6BFRUJQ.mjs.map} +1 -1
  24. package/dist/chunk-XB6PXEKO.js +529 -0
  25. package/dist/chunk-XB6PXEKO.js.map +1 -0
  26. package/dist/chunk-XNJ6UHWN.js +2150 -0
  27. package/dist/chunk-XNJ6UHWN.js.map +1 -0
  28. package/dist/{chunk-ZQ2ZZPOW.js → chunk-XTVGQXCL.js} +4 -4
  29. package/dist/{chunk-ZQ2ZZPOW.js.map → chunk-XTVGQXCL.js.map} +1 -1
  30. package/dist/cli.js +1817 -97
  31. package/dist/cli.js.map +1 -1
  32. package/dist/{registry-DOiHyH-r.d.mts → constants-DbFwuCjR.d.mts} +1 -177
  33. package/dist/{registry-DOiHyH-r.d.ts → constants-DbFwuCjR.d.ts} +1 -177
  34. package/dist/core/index.d.mts +66 -3
  35. package/dist/core/index.d.ts +66 -3
  36. package/dist/core/index.js +55 -39
  37. package/dist/core/index.mjs +2 -2
  38. package/dist/correspondence-model-D8c42J4c.d.mts +281 -0
  39. package/dist/correspondence-model-DhmBYoMf.d.ts +281 -0
  40. package/dist/gematria/index.d.mts +2 -1
  41. package/dist/gematria/index.d.ts +2 -1
  42. package/dist/gematria/index.js +5 -5
  43. package/dist/gematria/index.mjs +2 -2
  44. package/dist/index.d.mts +5 -4
  45. package/dist/index.d.ts +5 -4
  46. package/dist/index.js +179 -119
  47. package/dist/index.mjs +6 -6
  48. package/dist/numerology/index.js +18 -18
  49. package/dist/numerology/index.mjs +3 -3
  50. package/dist/tarot/index.d.mts +157 -2
  51. package/dist/tarot/index.d.ts +157 -2
  52. package/dist/tarot/index.js +46 -4
  53. package/dist/tarot/index.mjs +3 -1
  54. package/package.json +1 -1
  55. package/dist/chunk-3IPH7UTM.mjs +0 -878
  56. package/dist/chunk-3IPH7UTM.mjs.map +0 -1
  57. package/dist/chunk-AD7T42HJ.js +0 -4
  58. package/dist/chunk-AD7T42HJ.js.map +0 -1
  59. package/dist/chunk-BJUCABP4.js.map +0 -1
  60. package/dist/chunk-FYR5Z7M2.js +0 -882
  61. package/dist/chunk-FYR5Z7M2.js.map +0 -1
  62. package/dist/chunk-HGEWHDIX.js.map +0 -1
  63. package/dist/chunk-PPSRTX52.mjs.map +0 -1
  64. package/dist/chunk-RFSO3JRG.mjs +0 -3
  65. package/dist/chunk-RFSO3JRG.mjs.map +0 -1
  66. package/dist/chunk-T6Y4DLMA.mjs.map +0 -1
@@ -479,6 +479,169 @@ var DEFAULT_FLAGS = 2 /* SWISS_EPH */ | 256 /* SPEED */;
479
479
  var REQUIRED_EPHE_FILES = ["seas_18.se1", "semo_18.se1", "sepl_18.se1"];
480
480
  var NODE_EPHE_MOUNT_POINT = "/ephefs";
481
481
  var NODE_EPHE_MEMFS_PATH = "/ephemem";
482
+ function emitRuntimeNotice(message) {
483
+ if (typeof process !== "undefined" && process.stderr && typeof process.stderr.write === "function") {
484
+ process.stderr.write(`${message}
485
+ `);
486
+ return;
487
+ }
488
+ console.info(message);
489
+ }
490
+ var SWISS_EPH_RUNTIME_WASM_ENV_KEYS = [
491
+ "KAABALAH_SWISSEPH_WASM_PATH",
492
+ "KAABALAH_WASM_PATH"
493
+ ];
494
+ var SWISS_EPH_RUNTIME_EPHE_ENV_KEYS = [
495
+ "KAABALAH_SWISSEPH_EPHE_PATH",
496
+ "KAABALAH_EPHE_PATH"
497
+ ];
498
+ function getRuntimeEnv(env) {
499
+ if (env) {
500
+ return env;
501
+ }
502
+ if (typeof process !== "undefined" && process.env) {
503
+ return process.env;
504
+ }
505
+ return {};
506
+ }
507
+ function firstDefinedEnvValue(env, keys) {
508
+ for (const key of keys) {
509
+ const value = env[key];
510
+ if (typeof value === "string" && value.length > 0) {
511
+ return value;
512
+ }
513
+ }
514
+ return void 0;
515
+ }
516
+ function getBundledNodeSwissEphAssets(options) {
517
+ if (options.bundledNodeWasmPath && options.bundledNodeEphePath) {
518
+ return {
519
+ wasmPaths: [options.bundledNodeWasmPath],
520
+ ephePaths: [options.bundledNodeEphePath]
521
+ };
522
+ }
523
+ const resolvePath = options.nodePathResolve ?? ((...paths) => __require("path").resolve(...paths));
524
+ return {
525
+ wasmPaths: [
526
+ options.bundledNodeWasmPath,
527
+ resolvePath(__dirname, swisseph_node_default),
528
+ resolvePath(__dirname, "../../wasm/build/swisseph.node.wasm"),
529
+ resolvePath(__dirname, "../wasm/build/swisseph.node.wasm")
530
+ ].filter((value) => typeof value === "string"),
531
+ ephePaths: [
532
+ options.bundledNodeEphePath,
533
+ resolvePath(__dirname, "../../ephe"),
534
+ resolvePath(__dirname, "../ephe")
535
+ ].filter((value) => typeof value === "string")
536
+ };
537
+ }
538
+ function getBundledBrowserSwissEphAssets(options) {
539
+ return {
540
+ wasmPath: options.bundledBrowserWasmPath ?? swisseph_web_default,
541
+ ephePath: options.bundledBrowserEphePath ?? "../ephe"
542
+ };
543
+ }
544
+ function formatCandidatePaths(paths) {
545
+ return paths.length > 0 ? paths.join(", ") : "(none)";
546
+ }
547
+ function resolveBundledRuntimeAssetPath(label, bundledPaths, existsSync) {
548
+ for (const bundledPath of bundledPaths) {
549
+ if (existsSync(bundledPath)) {
550
+ return {
551
+ path: bundledPath,
552
+ source: "bundled"
553
+ };
554
+ }
555
+ }
556
+ throw new Error(
557
+ `Unable to resolve Swiss Ephemeris ${label}. Bundled paths checked: ${formatCandidatePaths(
558
+ bundledPaths
559
+ )}.`
560
+ );
561
+ }
562
+ function resolveRuntimeAssetPath(label, explicitPath, envPath, candidatePaths, bundledPaths, existsSync) {
563
+ if (explicitPath) {
564
+ if (!existsSync(explicitPath)) {
565
+ throw new Error(
566
+ `Swiss Ephemeris ${label} override does not exist: "${explicitPath}".`
567
+ );
568
+ }
569
+ return {
570
+ path: explicitPath,
571
+ source: "explicit"
572
+ };
573
+ }
574
+ if (envPath) {
575
+ if (!existsSync(envPath)) {
576
+ throw new Error(
577
+ `Swiss Ephemeris ${label} from environment does not exist: "${envPath}".`
578
+ );
579
+ }
580
+ return {
581
+ path: envPath,
582
+ source: "env"
583
+ };
584
+ }
585
+ for (const candidatePath of candidatePaths) {
586
+ if (existsSync(candidatePath)) {
587
+ return {
588
+ path: candidatePath,
589
+ source: "candidate"
590
+ };
591
+ }
592
+ }
593
+ try {
594
+ return resolveBundledRuntimeAssetPath(label, bundledPaths, existsSync);
595
+ } catch (error) {
596
+ throw new Error(
597
+ `Unable to resolve Swiss Ephemeris ${label}. Checked candidate paths: ${formatCandidatePaths(
598
+ candidatePaths
599
+ )}. ${toError(error).message}`
600
+ );
601
+ }
602
+ }
603
+ function resolveSwissEphRuntimeAssetsInternal(options = {}) {
604
+ const isBrowser = options.isBrowser ?? typeof window !== "undefined";
605
+ if (isBrowser) {
606
+ const bundledAssets2 = getBundledBrowserSwissEphAssets(options);
607
+ return {
608
+ wasmPath: options.wasmPath ?? bundledAssets2.wasmPath,
609
+ ephePath: options.ephePath ?? bundledAssets2.ephePath,
610
+ wasmPathSource: options.wasmPath ? "explicit" : "bundled",
611
+ ephePathSource: options.ephePath ? "explicit" : "bundled"
612
+ };
613
+ }
614
+ const env = getRuntimeEnv(options.env);
615
+ const existsSync = options.existsSync ?? ((path) => __require("fs").existsSync(path));
616
+ const bundledAssets = getBundledNodeSwissEphAssets(options);
617
+ const envWasmPath = firstDefinedEnvValue(env, SWISS_EPH_RUNTIME_WASM_ENV_KEYS);
618
+ const envEphePath = firstDefinedEnvValue(env, SWISS_EPH_RUNTIME_EPHE_ENV_KEYS);
619
+ const resolvedWasm = resolveRuntimeAssetPath(
620
+ "wasmPath",
621
+ options.wasmPath,
622
+ envWasmPath,
623
+ options.wasmPathCandidates ?? [],
624
+ bundledAssets.wasmPaths,
625
+ existsSync
626
+ );
627
+ const resolvedEphe = resolveRuntimeAssetPath(
628
+ "ephePath",
629
+ options.ephePath,
630
+ envEphePath,
631
+ options.ephePathCandidates ?? [],
632
+ bundledAssets.ephePaths,
633
+ existsSync
634
+ );
635
+ return {
636
+ wasmPath: resolvedWasm.path,
637
+ ephePath: resolvedEphe.path,
638
+ wasmPathSource: resolvedWasm.source,
639
+ ephePathSource: resolvedEphe.source
640
+ };
641
+ }
642
+ function resolveSwissEphRuntimeAssets(options = {}) {
643
+ return resolveSwissEphRuntimeAssetsInternal(options);
644
+ }
482
645
  function normalizeVirtualPath(path) {
483
646
  if (path === "/") {
484
647
  return path;
@@ -652,15 +815,17 @@ async function getSwissEph(options = {}) {
652
815
  }
653
816
  try {
654
817
  const isBrowser = typeof window !== "undefined";
655
- const wasmUrl = isBrowser ? swisseph_web_default : swisseph_node_default;
656
- const finalWasmPath = options.wasmPath || (isBrowser ? wasmUrl : __require("path").resolve(__dirname, wasmUrl));
818
+ const runtimeAssets = resolveSwissEphRuntimeAssets({
819
+ wasmPath: options.wasmPath,
820
+ ephePath: options.ephePath
821
+ });
822
+ const finalWasmPath = runtimeAssets.wasmPath;
657
823
  const moduleFactory = isBrowser ? (await import('./swisseph.web-TSFJI7DQ.mjs')).default : (await import('./swisseph.node-6H4ISR7M.mjs')).default;
658
824
  const module = await moduleFactory({
659
825
  locateFile: () => finalWasmPath
660
826
  });
661
827
  const instance = new SwissEph(module);
662
- const defaultEphePath = isBrowser ? "../ephe" : __require("path").resolve(__dirname, "../ephe");
663
- const finalEphePath = options.ephePath || defaultEphePath;
828
+ const finalEphePath = runtimeAssets.ephePath;
664
829
  if (isBrowser) {
665
830
  const epheFsPath = "/ephe";
666
831
  try {
@@ -688,16 +853,16 @@ async function getSwissEph(options = {}) {
688
853
  `Failed to materialize browser ephemeris files at "${epheFsPath}". Missing: ${browserCheck.missingFiles.join(", ")}.`
689
854
  );
690
855
  }
691
- console.info(`Setting ephemeris path to: ${epheFsPath}`);
856
+ emitRuntimeNotice(`Setting ephemeris path to: ${epheFsPath}`);
692
857
  instance.setEphemerisPath(epheFsPath);
693
858
  } else {
694
859
  const resolution = resolveNodeEphemerisPath(module, finalEphePath);
695
860
  if (resolution.strategy === "nodefs-mount") {
696
- console.info(`Setting ephemeris path to: ${resolution.path} (mounted from ${finalEphePath})`);
861
+ emitRuntimeNotice(`Setting ephemeris path to: ${resolution.path} (mounted from ${finalEphePath})`);
697
862
  } else if (resolution.strategy === "memfs-copy") {
698
- console.info(`Setting ephemeris path to: ${resolution.path} (copied from ${finalEphePath})`);
863
+ emitRuntimeNotice(`Setting ephemeris path to: ${resolution.path} (copied from ${finalEphePath})`);
699
864
  } else {
700
- console.info(`Setting ephemeris path to: ${resolution.path}`);
865
+ emitRuntimeNotice(`Setting ephemeris path to: ${resolution.path}`);
701
866
  }
702
867
  instance.setEphemerisPath(resolution.path);
703
868
  }
@@ -1985,6 +2150,6 @@ async function getSolarReturnChart(options) {
1985
2150
  };
1986
2151
  }
1987
2152
 
1988
- 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 };
1989
- //# sourceMappingURL=chunk-T6Y4DLMA.mjs.map
1990
- //# sourceMappingURL=chunk-T6Y4DLMA.mjs.map
2153
+ 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 };
2154
+ //# sourceMappingURL=chunk-5NCI7UPZ.mjs.map
2155
+ //# sourceMappingURL=chunk-5NCI7UPZ.mjs.map