@gracefullight/saju 0.6.0 → 1.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.
package/dist/index.js CHANGED
@@ -17,8 +17,10 @@ import { analyzeStrength } from "./core/strength";
17
17
  import { analyzeTenGods } from "./core/ten-gods";
18
18
  import { analyzeTwelveStages } from "./core/twelve-stages";
19
19
  import { analyzeYongShen } from "./core/yongshen";
20
- export function getSaju(adapter, dtLocal, options) {
21
- const fourPillars = getFourPillars(adapter, dtLocal, {
20
+ export function getSaju(dtLocal, options) {
21
+ const { adapter } = options;
22
+ const fourPillars = getFourPillars(dtLocal, {
23
+ adapter,
22
24
  longitudeDeg: options.longitudeDeg,
23
25
  tzOffsetHours: options.tzOffsetHours,
24
26
  preset: options.preset,
@@ -28,7 +30,7 @@ export function getSaju(adapter, dtLocal, options) {
28
30
  const strength = analyzeStrength(year, month, day, hour);
29
31
  const relations = analyzeRelations(year, month, day, hour);
30
32
  const yongShen = analyzeYongShen(year, month, day, hour);
31
- const solarTerms = analyzeSolarTerms(adapter, dtLocal);
33
+ const solarTerms = analyzeSolarTerms(dtLocal, { adapter });
32
34
  const twelveStages = analyzeTwelveStages(year, month, day, hour);
33
35
  const sinsals = analyzeSinsals(year, month, day, hour);
34
36
  const result = {
@@ -39,7 +41,8 @@ export function getSaju(adapter, dtLocal, options) {
39
41
  relations,
40
42
  yongShen,
41
43
  solarTerms,
42
- majorLuck: calculateMajorLuck(adapter, dtLocal, options.gender, year, month, {
44
+ majorLuck: calculateMajorLuck(dtLocal, options.gender, year, month, {
45
+ adapter,
43
46
  nextJieMillis: solarTerms.nextJieMillis,
44
47
  prevJieMillis: solarTerms.prevJieMillis,
45
48
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gracefullight/saju",
3
- "version": "0.6.0",
3
+ "version": "1.0.0",
4
4
  "description": "Four Pillars (四柱) calculator with flexible date adapter support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",