No description
Find a file
Aric Camarata 09079091ae
Some checks failed
CI / Test (Node 20) (push) Failing after 34s
CI / Test (Node 22) (push) Failing after 38s
CI / Test (Node 24) (push) Failing after 27s
CI / Lint & Format (push) Failing after 39s
CI / Typecheck (push) Failing after 35s
CI / Pack check (push) Failing after 31s
CI / Coverage (push) Failing after 3s
add opt-in anonymous telemetry (#1)
* add Forgejo CI mirror and telemetry disclosure

Mirrors .github/workflows/ci.yml to .forgejo/workflows/ for self-hosted
runner on git.ariccamarata.com. Adds failure-reporting hook stub (server
registration via nself sentry ci enable is a server-side step). Adds
telemetry disclosure section to README.

* add opt-in telemetry via @acamarata/telemetry (off by default)

* chore: update lockfile for @acamarata/telemetry devDep

* chore: fix prettier formatting on telemetry import
2026-06-30 15:56:57 -04:00
.forgejo/workflows add opt-in anonymous telemetry (#1) 2026-06-30 15:56:57 -04:00
.github docs: update README, wiki examples, and CI coverage (P1) 2026-05-30 20:16:06 -04:00
mm-256-75 adding mm-256-75 images 2023-11-14 11:54:46 +07:00
mm-256-85 adding mm-256-85 images 2023-11-14 12:02:14 +07:00
mm-512-75 adding mm-512-75 images 2023-11-14 12:05:55 +07:00
mm-512-85 adding mm-512-85 images 2023-11-14 12:06:43 +07:00
my-256-75 adding my-256-75 images 2023-11-14 12:07:32 +07:00
my-256-85 adding my-256-85 images 2023-11-14 12:08:59 +07:00
my-512-75 adding my-512-75 images 2023-11-14 12:10:57 +07:00
my-512-85 adding my-512-85 images 2023-11-14 12:14:19 +07:00
src add opt-in anonymous telemetry (#1) 2026-06-30 15:56:57 -04:00
.editorconfig feat: v2.0.0 — TypeScript rewrite, npm-publishable, off-by-one fix 2026-02-25 15:34:10 -05:00
.gitignore refactor: code quality improvements across the board 2026-03-08 11:32:47 -04:00
.npmrc feat: v2.0.0 — TypeScript rewrite, npm-publishable, off-by-one fix 2026-02-25 15:34:10 -05:00
.nvmrc feat: v2.0.0 — TypeScript rewrite, npm-publishable, off-by-one fix 2026-02-25 15:34:10 -05:00
CHANGELOG.md chore: E6 polish wiki content + ADR-015 CI updates (P1) 2026-05-29 07:15:59 -04:00
eslint.config.mjs ci: fix eslint config and add missing @typescript-eslint devDeps 2026-05-31 08:48:38 -04:00
LICENSE feat: v2.0.0 — TypeScript rewrite, npm-publishable, off-by-one fix 2026-02-25 15:34:10 -05:00
package.json add opt-in anonymous telemetry (#1) 2026-06-30 15:56:57 -04:00
pnpm-lock.yaml add opt-in anonymous telemetry (#1) 2026-06-30 15:56:57 -04:00
pnpm-workspace.yaml feat: v2.0.0 — TypeScript rewrite, npm-publishable, off-by-one fix 2026-02-25 15:34:10 -05:00
README.md add opt-in anonymous telemetry (#1) 2026-06-30 15:56:57 -04:00
TELEMETRY.md add opt-in anonymous telemetry (#1) 2026-06-30 15:56:57 -04:00
test-cjs.cjs ci: fix eslint config and add missing @typescript-eslint devDeps 2026-05-31 08:48:38 -04:00
test.mjs ci: fix eslint config and add missing @typescript-eslint devDeps 2026-05-31 08:48:38 -04:00
tsconfig.json chore: adopt shared config packages (tsconfig, eslint, prettier) 2026-05-30 15:13:20 -04:00
tsup.config.ts ci: fix eslint config and add missing @typescript-eslint devDeps 2026-05-31 08:48:38 -04:00
typedoc.json docs: add TypeDoc API generation (typedoc@0.28.19 + typedoc-plugin-markdown@4.11.0) 2026-05-30 16:42:00 -04:00

moon-cycle

CI License: MIT

Maps any JavaScript Date to the correct NASA moon phase image filename. Two algorithms: synodic-cycle mapping (708 images) and calendar-year mapping (8,760 images).

Not published to npm. The image dataset (~438 MB of hourly WebP photos from NASA's Scientific Visualization Studio) lives in this repository. Use CDN or clone.

Install

# Clone to get code and images together
git clone https://github.com/acamarata/moon-cycle.git

# Or add the code-only package via git
pnpm add github:acamarata/moon-cycle

Quick Start

import { cycleMonth, cdnUrl } from 'moon-cycle';

const filename = cycleMonth();                     // e.g. "354.webp"
const url = cdnUrl(filename, 'mm', 256, 75);
// => 'https://cdn.jsdelivr.net/gh/acamarata/moon-cycle@main/mm-256-75/354.webp'

CommonJS:

const { cycleMonth, cdnUrl } = require('moon-cycle');

Documentation

Full reference: GitHub Wiki

Acknowledgments

Moon phase imagery from NASA's Scientific Visualization Studio:

Ernie Wright (2023). Moon Phase and Libration, 2023 [Data set]. NASA Scientific Visualization Studio. https://svs.gsfc.nasa.gov/5187

Images are in the public domain per NASA's media usage guidelines.

License

MIT. See LICENSE for the full text.

Telemetry

This package supports optional, anonymous usage telemetry via @acamarata/telemetry. It is off by default. See TELEMETRY.md for what is collected and how to enable or disable it.