@magmacomputing/tempo-plugin-astro 1.1.6 → 1.1.8

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/CHANGELOG.md CHANGED
@@ -2,13 +2,17 @@
2
2
 
3
3
  All notable changes to the `@magmacomputing/tempo-plugin-astro` project will be documented in this file.
4
4
 
5
- ## [1.1.4] - 2026-06-11
5
+ ## [1.1.6] - 2026-06-11
6
6
 
7
7
  ### Changed
8
8
  - Renamed the metadata payload property `type` to `event` (Equinox vs. Solstice) to better reflect astronomical terminology and reduce naming collisions.
9
9
  - Refactored internal `calculateAstroMoment` parameter from `season` to `quarter` to resolve semantic ambiguity between meteorological seasons and astronomical quarters.
10
10
  - Augmented the `@magmacomputing/tempo/core` module to natively type the `TempoTermRegistry` for `astro` and `astronomy`, providing full strict IntelliSense autocomplete for IDEs.
11
11
 
12
+ ### Fixed
13
+ - **Type Definitions**: Added missing `start: Tempo` and `end: Tempo` boundaries to the `TempoTermRegistry` augmentation, ensuring accurate typings for the dynamic range boundaries injected by the core resolver.
14
+ - **NPM Registry Metadata**: Explicitly added `README.md`, `CHANGELOG.md`, and `LICENSE` to the `files` array in `package.json` to ensure the npmjs.com registry correctly renders package documentation.
15
+
12
16
  ## [1.1.3] - 2026-06-07
13
17
 
14
18
  ### Security
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ ![Tempo Plugin](/plugin-logo.svg)
2
+
1
3
  # @magmacomputing/tempo-plugin-astro
2
4
 
3
5
  This is a premium plugin for the [Tempo](https://github.com/magmacomputing/magma) library that provides precise astronomical events (Equinoxes and Solstices) and maps them to traditional season names based on hemisphere.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- const a0_0x301a05=a0_0x4b00;(function(_0x8dcba5,_0x5b2b74){const _0x5f3fc8=a0_0x4b00,_0xb49b05=_0x8dcba5();while(!![]){try{const _0x495b8f=parseInt(_0x5f3fc8(0x123))/0x1*(parseInt(_0x5f3fc8(0x13e))/0x2)+-parseInt(_0x5f3fc8(0x133))/0x3+parseInt(_0x5f3fc8(0x141))/0x4*(-parseInt(_0x5f3fc8(0x125))/0x5)+-parseInt(_0x5f3fc8(0x145))/0x6*(parseInt(_0x5f3fc8(0x13c))/0x7)+-parseInt(_0x5f3fc8(0x126))/0x8+parseInt(_0x5f3fc8(0x12b))/0x9+parseInt(_0x5f3fc8(0x14a))/0xa;if(_0x495b8f===_0x5b2b74)break;else _0xb49b05['push'](_0xb49b05['shift']());}catch(_0x528f5a){_0xb49b05['push'](_0xb49b05['shift']());}}}(a0_0x5da1,0x97794));import{Tempo,enums}from'@magmacomputing/tempo/core';import{getTermRange}from'@magmacomputing/tempo/term';function a0_0x4b00(_0x9ec0f,_0x3e9b15){_0x9ec0f=_0x9ec0f-0x11f;const _0x5da1d4=a0_0x5da1();let _0x4b0097=_0x5da1d4[_0x9ec0f];return _0x4b0097;}import{definePremiumTerm}from'@magmacomputing/tempo/plugin';import{enumify}from'@magmacomputing/tempo/library';var ASTRO=enumify({'Vernal':a0_0x301a05(0x129),'Summer':'summer','Autumnal':a0_0x301a05(0x12f),'Winter':'winter'}),{COMPASS,DURATIONS}=enums,key=a0_0x301a05(0x140),scope=a0_0x301a05(0x120);function a0_0x5da1(){const _0x12c633=['Solstice','5JAvxLa','7173928ClsaLI','nanosecond','push','vernal','Equinox','7646490oGKdoU','days','hour','second','autumnal','South','Summer','month','2157663ByuhNq','year','add','Spring','find','microsecond','Winter','summer','sphere','3319547KyOuWF','extend','2317690CwrnxU','with','astro','2392260QLSzrU','Autumn','map','toDateTime','12djHUEl','key','trunc','Autumnal','winter','17744500mUcBiJ','day','minute','config','millisecond','astronomy','UTC','Vernal','1bzXWgD'];a0_0x5da1=function(){return _0x12c633;};return a0_0x5da1();}function calculateAstroMoment(_0xf56da5,_0x573bba,_0x9f821a){const _0x8e37bc=a0_0x301a05,_0x327d8d=(_0xf56da5-0x7d0)/0x3e8;let _0x468431;switch(_0x573bba){case ASTRO['Vernal']:_0x468431=2451623.80984+365242.37404*_0x327d8d+0.05169*_0x327d8d*_0x327d8d;break;case ASTRO['Summer']:_0x468431=2451716.56767+365241.62603*_0x327d8d+0.00325*_0x327d8d*_0x327d8d;break;case ASTRO[_0x8e37bc(0x148)]:_0x468431=2451810.21715+365242.01767*_0x327d8d-0.11575*_0x327d8d*_0x327d8d;break;case ASTRO[_0x8e37bc(0x139)]:_0x468431=2451900.05952+365242.74049*_0x327d8d-0.06223*_0x327d8d*_0x327d8d;break;}const _0x2dc389=Math[_0x8e37bc(0x147)]((_0x468431-2440587.5)*DURATIONS[_0x8e37bc(0x12c)]);return new Tempo(_0x2dc389,{'timeZone':_0x9f821a,'timeStamp':'ms'});}function resolve(_0x5de8de,_0x3364e6){const _0x2b33f9=a0_0x301a05,_0x381cf9=_0x5de8de[_0x2b33f9(0x14d)][_0x2b33f9(0x13b)];if(!_0x381cf9)return[];const _0x5cba0a=_0x3364e6?.['yy']??_0x3364e6?.[_0x2b33f9(0x134)]??_0x5de8de['yy'],_0x3dec82=_0x3364e6?.['timeZoneId']??_0x5de8de['tz']??_0x2b33f9(0x121),_0x5ade56=[],_0x123c4d=_0x381cf9===COMPASS[_0x2b33f9(0x130)]?{'vernal':_0x2b33f9(0x148),'summer':'Winter','autumnal':_0x2b33f9(0x122),'winter':_0x2b33f9(0x131)}:{'vernal':_0x2b33f9(0x122),'summer':_0x2b33f9(0x131),'autumnal':_0x2b33f9(0x148),'winter':'Winter'},_0x59a54b=_0x381cf9===COMPASS[_0x2b33f9(0x130)]?{'vernal':_0x2b33f9(0x142),'summer':'Winter','autumnal':_0x2b33f9(0x136),'winter':_0x2b33f9(0x131)}:{'vernal':_0x2b33f9(0x136),'summer':_0x2b33f9(0x131),'autumnal':_0x2b33f9(0x142),'winter':_0x2b33f9(0x139)};for(const _0x3a97ce of[_0x5cba0a-0x1,_0x5cba0a,_0x5cba0a+0x1]){const _0x307251=(_0x2d8836,_0x241add)=>{const _0x5828fd=_0x2b33f9,_0x5391f1=calculateAstroMoment(_0x2d8836,_0x241add,_0x3dec82),_0x4ca894=_0x5391f1['toDateTime']();return{'year':_0x4ca894[_0x5828fd(0x134)],'month':_0x4ca894[_0x5828fd(0x132)],'day':_0x4ca894[_0x5828fd(0x14b)],'hour':_0x4ca894[_0x5828fd(0x12d)],'minute':_0x4ca894[_0x5828fd(0x14c)],'second':_0x4ca894[_0x5828fd(0x12e)],'millisecond':_0x4ca894['millisecond'],'microsecond':_0x4ca894[_0x5828fd(0x138)],'nanosecond':_0x4ca894[_0x5828fd(0x127)]};};_0x5ade56[_0x2b33f9(0x128)]({'key':_0x123c4d[_0x2b33f9(0x129)],'season':_0x59a54b['vernal'],'sphere':_0x381cf9,..._0x307251(_0x3a97ce,ASTRO[_0x2b33f9(0x122)]),'event':_0x2b33f9(0x12a),'group':_0x2b33f9(0x120)}),_0x5ade56[_0x2b33f9(0x128)]({'key':_0x123c4d['summer'],'season':_0x59a54b[_0x2b33f9(0x13a)],'sphere':_0x381cf9,..._0x307251(_0x3a97ce,ASTRO[_0x2b33f9(0x131)]),'event':_0x2b33f9(0x124),'group':_0x2b33f9(0x120)}),_0x5ade56['push']({'key':_0x123c4d[_0x2b33f9(0x12f)],'season':_0x59a54b['autumnal'],'sphere':_0x381cf9,..._0x307251(_0x3a97ce,ASTRO['Autumnal']),'event':_0x2b33f9(0x12a),'group':'astronomy'}),_0x5ade56['push']({'key':_0x123c4d[_0x2b33f9(0x149)],'season':_0x59a54b['winter'],'sphere':_0x381cf9,..._0x307251(_0x3a97ce,ASTRO[_0x2b33f9(0x139)]),'event':_0x2b33f9(0x124),'group':'astronomy'});}return _0x5ade56;}function resolveDateBoundary(_0x5f362a,_0x501afe){const _0x48e68e=a0_0x301a05,_0x4085a4=resolve(_0x5f362a,_0x501afe);return _0x4085a4[_0x48e68e(0x143)](_0x473ad3=>({..._0x473ad3,'hour':0x0,'minute':0x0,'second':0x0,'millisecond':0x0,'microsecond':0x0,'nanosecond':0x0}));}var AstroTerm=definePremiumTerm({'key':key,'scope':scope,'resolve'(_0x36cd99){return resolve(this,_0x36cd99);},'define'(_0x4d2772,_0x381a2c){const _0x1c82f9=a0_0x301a05,_0x1a94ec=resolve(this,_0x381a2c),_0x5a980f=resolveDateBoundary(this,_0x381a2c),_0x278591=_0x381a2c??this[_0x1c82f9(0x144)]();if(_0x4d2772===!![]||_0x4d2772===void 0x0){const _0x3e9dd1=getTermRange(this,_0x5a980f,!![],_0x381a2c);return _0x3e9dd1;}const _0x19ac41=getTermRange(this,_0x1a94ec,![],_0x381a2c);if(!_0x19ac41)return _0x19ac41;const _0x3ec9df=getTermRange(this,_0x5a980f,![],_0x381a2c);if(!_0x3ec9df)return _0x19ac41;const _0x20e687=_0x1a94ec[_0x1c82f9(0x137)](_0x318ec7=>_0x318ec7['key']===_0x3ec9df['key']&&_0x318ec7['year']===_0x3ec9df['year']&&_0x318ec7[_0x1c82f9(0x132)]===_0x3ec9df['month']&&_0x318ec7['day']===_0x3ec9df[_0x1c82f9(0x14b)]);if(!_0x20e687)return{..._0x3ec9df,'strict':_0x19ac41[_0x1c82f9(0x146)]};const _0x384ae9=_0x278591[_0x1c82f9(0x13f)]({'year':_0x20e687[_0x1c82f9(0x134)],'month':_0x20e687[_0x1c82f9(0x132)],'day':_0x20e687[_0x1c82f9(0x14b)],'hour':_0x20e687[_0x1c82f9(0x12d)]??0x0,'minute':_0x20e687[_0x1c82f9(0x14c)]??0x0,'second':_0x20e687[_0x1c82f9(0x12e)]??0x0,'millisecond':_0x20e687[_0x1c82f9(0x11f)]??0x0,'microsecond':_0x20e687[_0x1c82f9(0x138)]??0x0,'nanosecond':_0x20e687['nanosecond']??0x0})[_0x1c82f9(0x135)]({'minutes':0x1}),_0x2d4ddd=getTermRange(this,_0x1a94ec,![],_0x384ae9);if(!_0x2d4ddd)return{..._0x3ec9df,'strict':_0x19ac41[_0x1c82f9(0x146)]};return{..._0x2d4ddd,'strict':_0x19ac41[_0x1c82f9(0x146)]};}});Tempo[a0_0x301a05(0x13d)](AstroTerm);export{AstroTerm};
1
+ const a0_0x4b4289=a0_0x4920;(function(_0x27c096,_0x35b39c){const _0x499a12=a0_0x4920,_0x50e8ff=_0x27c096();while(!![]){try{const _0x473e5e=parseInt(_0x499a12(0x9c))/0x1+parseInt(_0x499a12(0xa2))/0x2+-parseInt(_0x499a12(0xc1))/0x3*(parseInt(_0x499a12(0xbb))/0x4)+parseInt(_0x499a12(0x9e))/0x5*(-parseInt(_0x499a12(0xac))/0x6)+-parseInt(_0x499a12(0x9f))/0x7*(parseInt(_0x499a12(0x9b))/0x8)+parseInt(_0x499a12(0xba))/0x9+-parseInt(_0x499a12(0xa8))/0xa*(-parseInt(_0x499a12(0xa9))/0xb);if(_0x473e5e===_0x35b39c)break;else _0x50e8ff['push'](_0x50e8ff['shift']());}catch(_0x1a5f17){_0x50e8ff['push'](_0x50e8ff['shift']());}}}(a0_0x31dd,0xbf636));import{Tempo,enums}from'@magmacomputing/tempo/core';import{getTermRange}from'@magmacomputing/tempo/term';function a0_0x31dd(){const _0x4f3ec2=['summer','second','autumnal','sphere','hour','Winter','month','1707624BKXLBF','4ApSEzI','push','Vernal','nanosecond','Solstice','days','2710014rWeXED','microsecond','toDateTime','key','millisecond','5301416KAtGie','131624UpWYiG','Spring','3117655NoCFgS','7AkdNkd','astronomy','year','2185472nARmUb','winter','Summer','UTC','Autumn','Autumnal','10aNZifW','24011977rkFfJj','minute','find','12zwdXSg','day','astro','Equinox','South','vernal','timeZoneId'];a0_0x31dd=function(){return _0x4f3ec2;};return a0_0x31dd();}import{definePremiumTerm}from'@magmacomputing/tempo/plugin';import{enumify}from'@magmacomputing/tempo/library';var ASTRO=enumify({'Vernal':'vernal','Summer':a0_0x4b4289(0xb3),'Autumnal':a0_0x4b4289(0xb5),'Winter':a0_0x4b4289(0xa3)}),{COMPASS,DURATIONS}=enums,key=a0_0x4b4289(0xae),scope='astronomy';function calculateAstroMoment(_0x571df6,_0x2fbead,_0x15146e){const _0x8b83c6=a0_0x4b4289,_0x22d8d4=(_0x571df6-0x7d0)/0x3e8;let _0x4d7f4f;switch(_0x2fbead){case ASTRO[_0x8b83c6(0xbd)]:_0x4d7f4f=2451623.80984+365242.37404*_0x22d8d4+0.05169*_0x22d8d4*_0x22d8d4;break;case ASTRO[_0x8b83c6(0xa4)]:_0x4d7f4f=2451716.56767+365241.62603*_0x22d8d4+0.00325*_0x22d8d4*_0x22d8d4;break;case ASTRO[_0x8b83c6(0xa7)]:_0x4d7f4f=2451810.21715+365242.01767*_0x22d8d4-0.11575*_0x22d8d4*_0x22d8d4;break;case ASTRO[_0x8b83c6(0xb8)]:_0x4d7f4f=2451900.05952+365242.74049*_0x22d8d4-0.06223*_0x22d8d4*_0x22d8d4;break;}const _0x3f2c15=Math['trunc']((_0x4d7f4f-2440587.5)*DURATIONS[_0x8b83c6(0xc0)]);return new Tempo(_0x3f2c15,{'timeZone':_0x15146e,'timeStamp':'ms'});}function resolve(_0x1d7a2f,_0x28845a){const _0x28bd70=a0_0x4b4289,_0x4e17df=_0x1d7a2f['config'][_0x28bd70(0xb6)];if(!_0x4e17df)return[];const _0x37faeb=_0x28845a?.['yy']??_0x28845a?.[_0x28bd70(0xa1)]??_0x1d7a2f['yy'],_0xae79b6=_0x28845a?.[_0x28bd70(0xb2)]??_0x1d7a2f['tz']??_0x28bd70(0xa5),_0x4ac109=[],_0x55ad88=_0x4e17df===COMPASS[_0x28bd70(0xb0)]?{'vernal':_0x28bd70(0xa7),'summer':'Winter','autumnal':_0x28bd70(0xbd),'winter':_0x28bd70(0xa4)}:{'vernal':_0x28bd70(0xbd),'summer':'Summer','autumnal':'Autumnal','winter':_0x28bd70(0xb8)},_0x446e19=_0x4e17df===COMPASS[_0x28bd70(0xb0)]?{'vernal':_0x28bd70(0xa6),'summer':'Winter','autumnal':_0x28bd70(0x9d),'winter':_0x28bd70(0xa4)}:{'vernal':_0x28bd70(0x9d),'summer':_0x28bd70(0xa4),'autumnal':_0x28bd70(0xa6),'winter':_0x28bd70(0xb8)};for(const _0x1a84c9 of[_0x37faeb-0x1,_0x37faeb,_0x37faeb+0x1]){const _0x2f4329=(_0x5eb7de,_0x308d5f)=>{const _0x49a277=_0x28bd70,_0x21e191=calculateAstroMoment(_0x5eb7de,_0x308d5f,_0xae79b6),_0x32c8d3=_0x21e191['toDateTime']();return{'year':_0x32c8d3[_0x49a277(0xa1)],'month':_0x32c8d3['month'],'day':_0x32c8d3['day'],'hour':_0x32c8d3[_0x49a277(0xb7)],'minute':_0x32c8d3['minute'],'second':_0x32c8d3[_0x49a277(0xb4)],'millisecond':_0x32c8d3[_0x49a277(0x9a)],'microsecond':_0x32c8d3['microsecond'],'nanosecond':_0x32c8d3[_0x49a277(0xbe)]};};_0x4ac109[_0x28bd70(0xbc)]({'key':_0x55ad88[_0x28bd70(0xb1)],'season':_0x446e19[_0x28bd70(0xb1)],'sphere':_0x4e17df,..._0x2f4329(_0x1a84c9,ASTRO[_0x28bd70(0xbd)]),'event':_0x28bd70(0xaf),'group':_0x28bd70(0xa0)}),_0x4ac109[_0x28bd70(0xbc)]({'key':_0x55ad88['summer'],'season':_0x446e19['summer'],'sphere':_0x4e17df,..._0x2f4329(_0x1a84c9,ASTRO[_0x28bd70(0xa4)]),'event':'Solstice','group':_0x28bd70(0xa0)}),_0x4ac109[_0x28bd70(0xbc)]({'key':_0x55ad88[_0x28bd70(0xb5)],'season':_0x446e19[_0x28bd70(0xb5)],'sphere':_0x4e17df,..._0x2f4329(_0x1a84c9,ASTRO[_0x28bd70(0xa7)]),'event':_0x28bd70(0xaf),'group':_0x28bd70(0xa0)}),_0x4ac109['push']({'key':_0x55ad88[_0x28bd70(0xa3)],'season':_0x446e19[_0x28bd70(0xa3)],'sphere':_0x4e17df,..._0x2f4329(_0x1a84c9,ASTRO[_0x28bd70(0xb8)]),'event':_0x28bd70(0xbf),'group':_0x28bd70(0xa0)});}return _0x4ac109;}function a0_0x4920(_0x4f7cca,_0x1bf28c){_0x4f7cca=_0x4f7cca-0x98;const _0x31dd05=a0_0x31dd();let _0x492072=_0x31dd05[_0x4f7cca];return _0x492072;}function resolveDateBoundary(_0x21e3f3,_0x3de22d){const _0x1c65ff=resolve(_0x21e3f3,_0x3de22d);return _0x1c65ff['map'](_0x8c1074=>({..._0x8c1074,'hour':0x0,'minute':0x0,'second':0x0,'millisecond':0x0,'microsecond':0x0,'nanosecond':0x0}));}var AstroTerm=definePremiumTerm({'key':key,'scope':scope,'resolve'(_0x244442){return resolve(this,_0x244442);},'define'(_0x2449f0,_0x196df6){const _0x99530f=a0_0x4b4289,_0xbe57f5=resolve(this,_0x196df6),_0x88c0a9=resolveDateBoundary(this,_0x196df6),_0x194d70=_0x196df6??this[_0x99530f(0x98)]();if(_0x2449f0===!![]||_0x2449f0===void 0x0){const _0x32f0bb=getTermRange(this,_0x88c0a9,!![],_0x196df6);return _0x32f0bb;}const _0x1d8bf3=getTermRange(this,_0xbe57f5,![],_0x196df6);if(!_0x1d8bf3)return _0x1d8bf3;const _0x7c94c6=getTermRange(this,_0x88c0a9,![],_0x196df6);if(!_0x7c94c6)return _0x1d8bf3;const _0x473a2c=_0xbe57f5[_0x99530f(0xab)](_0x292733=>_0x292733[_0x99530f(0x99)]===_0x7c94c6['key']&&_0x292733[_0x99530f(0xa1)]===_0x7c94c6['year']&&_0x292733[_0x99530f(0xb9)]===_0x7c94c6['month']&&_0x292733[_0x99530f(0xad)]===_0x7c94c6[_0x99530f(0xad)]);if(!_0x473a2c)return{..._0x7c94c6,'strict':_0x1d8bf3[_0x99530f(0x99)]};const _0x5a7e95=_0x194d70['with']({'year':_0x473a2c['year'],'month':_0x473a2c[_0x99530f(0xb9)],'day':_0x473a2c[_0x99530f(0xad)],'hour':_0x473a2c[_0x99530f(0xb7)]??0x0,'minute':_0x473a2c[_0x99530f(0xaa)]??0x0,'second':_0x473a2c['second']??0x0,'millisecond':_0x473a2c[_0x99530f(0x9a)]??0x0,'microsecond':_0x473a2c[_0x99530f(0xc2)]??0x0,'nanosecond':_0x473a2c['nanosecond']??0x0})['add']({'minutes':0x1}),_0x5426dc=getTermRange(this,_0xbe57f5,![],_0x5a7e95);if(!_0x5426dc)return{..._0x7c94c6,'strict':_0x1d8bf3[_0x99530f(0x99)]};return{..._0x5426dc,'strict':_0x1d8bf3[_0x99530f(0x99)]};}});Tempo['extend'](AstroTerm);export{AstroTerm};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmacomputing/tempo-plugin-astro",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Tempo plugin that calculates precise astronomical seasons (solstices & equinoxes) using the Jean Meeus algorithm — hemisphere-aware, sub-minute accuracy",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",