@hebcal/rest-api 6.5.1 → 7.0.1

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 (47) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/classic-rest-api.d.ts +55 -4
  3. package/dist/esm/classic-rest-api.js +28 -14
  4. package/dist/esm/classic-rest-api.js.map +1 -1
  5. package/dist/esm/common.d.ts +80 -19
  6. package/dist/esm/common.js +31 -28
  7. package/dist/esm/common.js.map +1 -1
  8. package/dist/esm/countryNames.json.d.ts +2 -0
  9. package/dist/esm/countryNames.json.js +3 -5
  10. package/dist/esm/countryNames.json.js.map +1 -1
  11. package/dist/esm/csv.d.ts +15 -2
  12. package/dist/esm/csv.js +18 -9
  13. package/dist/esm/csv.js.map +1 -1
  14. package/dist/esm/en.po.d.ts +81 -0
  15. package/dist/esm/en.po.js +3 -5
  16. package/dist/esm/en.po.js.map +1 -1
  17. package/dist/esm/he.po.d.ts +78 -0
  18. package/dist/esm/he.po.js +3 -5
  19. package/dist/esm/he.po.js.map +1 -1
  20. package/dist/esm/holiday.d.ts +7 -0
  21. package/dist/esm/holiday.js +9 -6
  22. package/dist/esm/holiday.js.map +1 -1
  23. package/dist/esm/index.d.ts +7 -10
  24. package/dist/esm/index.js +6 -10
  25. package/dist/esm/index.js.map +1 -1
  26. package/dist/esm/location.d.ts +28 -3
  27. package/dist/esm/location.js +13 -8
  28. package/dist/esm/location.js.map +1 -1
  29. package/dist/esm/makeAnchor.js +2 -5
  30. package/dist/esm/makeAnchor.js.map +1 -1
  31. package/dist/esm/url.d.ts +24 -1
  32. package/dist/esm/url.js +27 -8
  33. package/dist/esm/url.js.map +1 -1
  34. package/package.json +18 -22
  35. package/dist/bundle.js +0 -921
  36. package/dist/bundle.min.js +0 -2
  37. package/dist/esm/fullcalendar.d.ts +0 -15
  38. package/dist/esm/fullcalendar.js +0 -64
  39. package/dist/esm/fullcalendar.js.map +0 -1
  40. package/dist/esm/memo.d.ts +0 -6
  41. package/dist/esm/memo.js +0 -65
  42. package/dist/esm/memo.js.map +0 -1
  43. package/dist/esm/rss.d.ts +0 -4
  44. package/dist/esm/rss.js +0 -149
  45. package/dist/esm/rss.js.map +0 -1
  46. package/dist/fullcalendar.js +0 -314
  47. package/dist/fullcalendar.min.js +0 -2
@@ -1,26 +1,51 @@
1
1
  import { Location } from '@hebcal/core/dist/esm/location';
2
- import type { StringMap } from './common';
2
+ import type { StringMap } from './common.js';
3
+ /**
4
+ * Maps a 2-letter ISO 3166 country code (e.g. `'FR'`) to its English name
5
+ * (e.g. `'France'`)
6
+ */
3
7
  export declare const countryNames: StringMap;
4
8
  /**
5
- * Location information
9
+ * JSON-serializable representation of a `@hebcal/core` `Location`, as
10
+ * returned by `locationToPlainObj()`. When `locationToPlainObj()` is
11
+ * called without a location, only `geo: 'none'` is set.
6
12
  */
7
13
  export type LocationPlainObj = {
14
+ /** display name, e.g. `'Providence, RI'` */
8
15
  title?: string | null;
16
+ /** short city name, e.g. `'Providence'` */
9
17
  city?: string | null;
18
+ /** Olson timezone ID, e.g. `'America/New_York'` */
10
19
  tzid?: string;
11
20
  latitude?: number;
12
21
  longitude?: number;
22
+ /** 2-letter ISO 3166 country code, e.g. `'US'` */
13
23
  cc?: string;
24
+ /** English country name, e.g. `'United States'` */
14
25
  country?: string;
26
+ /** elevation in meters, when known */
27
+ elevation?: number;
28
+ /** GeoNames admin1 code (roughly, US state or subnational region) */
15
29
  admin1?: string;
30
+ /** ASCII-only spelling of the location name */
16
31
  asciiname?: string;
32
+ /** geocoding method or source, e.g. `'zip'`, `'city'`, or `'none'` */
17
33
  geo?: string;
34
+ /** US ZIP code, when the location was looked up by ZIP */
18
35
  zip?: string;
36
+ /** 2-letter US state abbreviation */
19
37
  state?: string;
38
+ /** full US state name */
20
39
  stateName?: string;
40
+ /** GeoNames.org geonameid */
21
41
  geonameid?: number;
22
42
  };
23
43
  /**
24
- * Converts a @hebcal/core `Location` to a plain JS object.
44
+ * Converts a `@hebcal/core` `Location` to a plain, JSON-serializable object.
45
+ * Some fields (e.g. `elevation`, `state`, `geonameid`) are only present when
46
+ * the `Location` was constructed with that extra metadata attached (as done
47
+ * by GeoNames-backed location lookups).
48
+ * @param location - the location to convert, or `undefined`
49
+ * @returns a plain object, or `{geo: 'none'}` if `location` is `undefined`
25
50
  */
26
51
  export declare function locationToPlainObj(location: Location | undefined): LocationPlainObj;
@@ -1,7 +1,9 @@
1
- /*! @hebcal/rest-api v6.5.1 */
2
1
  import countryNames0 from './countryNames.json.js';
3
-
4
- const countryNames = countryNames0;
2
+ /**
3
+ * Maps a 2-letter ISO 3166 country code (e.g. `'FR'`) to its English name
4
+ * (e.g. `'France'`)
5
+ */
6
+ export const countryNames = countryNames0;
5
7
  const LOC_FIELDS = [
6
8
  'elevation',
7
9
  'admin1',
@@ -13,9 +15,14 @@ const LOC_FIELDS = [
13
15
  'geonameid',
14
16
  ];
15
17
  /**
16
- * Converts a @hebcal/core `Location` to a plain JS object.
18
+ * Converts a `@hebcal/core` `Location` to a plain, JSON-serializable object.
19
+ * Some fields (e.g. `elevation`, `state`, `geonameid`) are only present when
20
+ * the `Location` was constructed with that extra metadata attached (as done
21
+ * by GeoNames-backed location lookups).
22
+ * @param location - the location to convert, or `undefined`
23
+ * @returns a plain object, or `{geo: 'none'}` if `location` is `undefined`
17
24
  */
18
- function locationToPlainObj(location) {
25
+ export function locationToPlainObj(location) {
19
26
  if (typeof location === 'object' &&
20
27
  location !== null &&
21
28
  typeof location.getLatitude === 'function') {
@@ -41,6 +48,4 @@ function locationToPlainObj(location) {
41
48
  return { geo: 'none' };
42
49
  }
43
50
  }
44
-
45
- export { countryNames, locationToPlainObj };
46
- //# sourceMappingURL=location.js.map
51
+ //# sourceMappingURL=location.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"location.js","sources":["../../../src/location.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIO,MAAM,YAAY,GAAc;AAsBvC,MAAM,UAAU,GAAG;I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AO;IACP,WAAW;IACX,WAAW;CACZ,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,QAA8B;IAE9B,IACE,OAAO,QAAQ,KAAK,QAAQ;QAC5B,QAAQ,KAAK,IAAI;QACjB,OAAO,QAAQ,CAAC,WAAW,KAAK,UAAU,EAC1C,CAAC;QACD,MAAM,EAAE,GAAW,QAAQ,CAAC,cAAc,EAAG,CAAC;QAC9C,MAAM,CAAC,GAAqB;YAC1B,KAAK,EAAE,QAAQ,CAAC,OAAO,EAAE;YACzB,IAAI,EAAE,QAAQ,CAAC,YAAY,EAAE;YAC7B,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE;YACxB,QAAQ,EAAE,QAAQ,CAAC,WAAW,EAAE;YAChC,SAAS,EAAE,QAAQ,CAAC,YAAY,EAAE;YAClC,EAAE,EAAE,EAAE;YACN,OAAO,EAAE,YAAY,CAAC,EAAE,CAAC;SAC1B,CAAC;QACF,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;YAC3B,MAAM,GAAG,GAAI,QAAgB,CAAC,CAAC,CAAC,CAAC;YACjC,IAAI,GAAG,EAAE,CAAC;gBACP,CAAS,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;YACtB,CAAC;QACH,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;SAAM,CAAC;QACN,OAAO,EAAC,GAAG,EAAE,MAAM,EAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
@@ -1,11 +1,10 @@
1
- /*! @hebcal/rest-api v6.5.1 */
2
1
  /**
3
2
  * Helper function to transform a string to make it more usable in a URL or filename.
4
3
  * Converts to lowercase and replaces non-word characters with hyphen ('-').
5
4
  * @example
6
5
  * makeAnchor('Rosh Chodesh Adar II') // 'rosh-chodesh-adar-ii'
7
6
  */
8
- function makeAnchor(s) {
7
+ export function makeAnchor(s) {
9
8
  return s
10
9
  .toLowerCase()
11
10
  .replaceAll("'", '')
@@ -14,6 +13,4 @@ function makeAnchor(s) {
14
13
  .replaceAll(/^-/g, '')
15
14
  .replaceAll(/-$/g, '');
16
15
  }
17
-
18
- export { makeAnchor };
19
- //# sourceMappingURL=makeAnchor.js.map
16
+ //# sourceMappingURL=makeAnchor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"makeAnchor.js","sources":["../../../src/makeAnchor.ts"],"sourcesContent":[null],"names":[],"mappings":";AAAA;;;;;AAKG;AACG,SAAU,UAAU,CAAC,CAAS,EAAA;AAClC,IAAA,OAAO;AACJ,SAAA,WAAW;AACX,SAAA,UAAU,CAAC,GAAG,EAAE,EAAE;AAClB,SAAA,UAAU,CAAC,QAAQ,EAAE,GAAG;AACxB,SAAA,UAAU,CAAC,KAAK,EAAE,GAAG;AACrB,SAAA,UAAU,CAAC,KAAK,EAAE,EAAE;AACpB,SAAA,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC;AAC1B;;;;"}
1
+ {"version":3,"file":"makeAnchor.js","sourceRoot":"","sources":["../../src/makeAnchor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,CAAS;IAClC,OAAO,CAAC;SACL,WAAW,EAAE;SACb,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC;SACnB,UAAU,CAAC,QAAQ,EAAE,GAAG,CAAC;SACzB,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC;SACtB,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC;SACrB,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAC3B,CAAC"}
package/dist/esm/url.d.ts CHANGED
@@ -1,5 +1,28 @@
1
+ /**
2
+ * Rewrites a long-form `hebcal.com/sedrot/<parsha>-<YYYYMMDD>` URL in place
3
+ * to the short `hebcal.com/s/<year>[i]/<parsha-id>[d]` form, e.g.
4
+ * `/sedrot/bereshit-20201017` becomes `/s/5781/1`. Falls back to trimming
5
+ * the `/sedrot/` prefix to `/s/` if the path doesn't match the expected
6
+ * `<parsha>-<8-digit-date>` shape.
7
+ * @param u - the URL to rewrite; mutated in place via `u.pathname`
8
+ */
1
9
  export declare function shortenSedrotUrl(u: URL): void;
2
10
  /**
3
- * Appends utm_source and utm_medium parameters to a URL
11
+ * Adjusts a Hebcal.com event link for Israel/Diaspora and appends UTM
12
+ * tracking parameters. For `www.hebcal.com` holiday/sedrot/omer links, this
13
+ * also sets `i=on` when `il` is true, rewrites the host to the shorter
14
+ * `hebcal.com` and shortens the path (see `shortenSedrotUrl()` for sedrot),
15
+ * and uses the abbreviated `us`/`um`/`uc` parameter names instead of the
16
+ * full `utm_source`/`utm_medium`/`utm_campaign` (the `us`/`um` params are
17
+ * omitted when `utmCampaign` starts with `'ical-'` or `'pdf-'`, since those
18
+ * campaigns are tracked by `uc` alone). For all other URLs, the standard
19
+ * `utm_source`/`utm_medium`/`utm_campaign` parameters are appended, and
20
+ * `utm_source` defaults to `'hebcal.com'` when not otherwise specified.
21
+ * @param url - the event URL to rewrite
22
+ * @param il - `true` to mark the link as using the Israel holiday schedule
23
+ * @param utmSource - tracking source, e.g. `'js'`
24
+ * @param utmMedium - tracking medium, e.g. `'api'`
25
+ * @param utmCampaign - tracking campaign, e.g. `'ical-foo'`
26
+ * @returns the rewritten URL as a string
4
27
  */
5
28
  export declare function appendIsraelAndTracking(url: string, il: boolean, utmSource?: string, utmMedium?: string, utmCampaign?: string): string;
package/dist/esm/url.js CHANGED
@@ -1,8 +1,6 @@
1
- /*! @hebcal/rest-api v6.5.1 */
2
1
  import { HDate } from '@hebcal/hdate';
3
2
  import { parshiot } from '@hebcal/core/dist/esm/sedra';
4
3
  import { makeAnchor } from './makeAnchor.js';
5
-
6
4
  const parsha2id = new Map();
7
5
  for (let id = 0; id < parshiot.length; id++) {
8
6
  const name = parshiot[id];
@@ -38,7 +36,15 @@ function parse8digitDateStr(date) {
38
36
  }
39
37
  return dt;
40
38
  }
41
- function shortenSedrotUrl(u) {
39
+ /**
40
+ * Rewrites a long-form `hebcal.com/sedrot/<parsha>-<YYYYMMDD>` URL in place
41
+ * to the short `hebcal.com/s/<year>[i]/<parsha-id>[d]` form, e.g.
42
+ * `/sedrot/bereshit-20201017` becomes `/s/5781/1`. Falls back to trimming
43
+ * the `/sedrot/` prefix to `/s/` if the path doesn't match the expected
44
+ * `<parsha>-<8-digit-date>` shape.
45
+ * @param u - the URL to rewrite; mutated in place via `u.pathname`
46
+ */
47
+ export function shortenSedrotUrl(u) {
42
48
  const path = u.pathname;
43
49
  const dash = path.lastIndexOf('-');
44
50
  const dateStr = path.substring(dash + 1);
@@ -64,9 +70,24 @@ function shortenSedrotUrl(u) {
64
70
  }
65
71
  }
66
72
  /**
67
- * Appends utm_source and utm_medium parameters to a URL
73
+ * Adjusts a Hebcal.com event link for Israel/Diaspora and appends UTM
74
+ * tracking parameters. For `www.hebcal.com` holiday/sedrot/omer links, this
75
+ * also sets `i=on` when `il` is true, rewrites the host to the shorter
76
+ * `hebcal.com` and shortens the path (see `shortenSedrotUrl()` for sedrot),
77
+ * and uses the abbreviated `us`/`um`/`uc` parameter names instead of the
78
+ * full `utm_source`/`utm_medium`/`utm_campaign` (the `us`/`um` params are
79
+ * omitted when `utmCampaign` starts with `'ical-'` or `'pdf-'`, since those
80
+ * campaigns are tracked by `uc` alone). For all other URLs, the standard
81
+ * `utm_source`/`utm_medium`/`utm_campaign` parameters are appended, and
82
+ * `utm_source` defaults to `'hebcal.com'` when not otherwise specified.
83
+ * @param url - the event URL to rewrite
84
+ * @param il - `true` to mark the link as using the Israel holiday schedule
85
+ * @param utmSource - tracking source, e.g. `'js'`
86
+ * @param utmMedium - tracking medium, e.g. `'api'`
87
+ * @param utmCampaign - tracking campaign, e.g. `'ical-foo'`
88
+ * @returns the rewritten URL as a string
68
89
  */
69
- function appendIsraelAndTracking(url, il, utmSource, utmMedium, utmCampaign) {
90
+ export function appendIsraelAndTracking(url, il, utmSource, utmMedium, utmCampaign) {
70
91
  const u = new URL(url);
71
92
  const isHebcal = u.host === 'www.hebcal.com';
72
93
  if (isHebcal) {
@@ -118,6 +139,4 @@ function appendIsraelAndTracking(url, il, utmSource, utmMedium, utmCampaign) {
118
139
  }
119
140
  return u.toString();
120
141
  }
121
-
122
- export { appendIsraelAndTracking, shortenSedrotUrl };
123
- //# sourceMappingURL=url.js.map
142
+ //# sourceMappingURL=url.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"url.js","sources":["../../../src/url.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAIA,MAAM,SAAS,GAAG,IAAI,GAAG,EAAkB;AAC3C,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;AAC3C,IAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC;AACzB,IAAA,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AACzC;AAEA,MAAM,gBAAgB,GAAa;IACjC,kBAAkB;IAClB,gBAAgB;IAChB,qBAAqB;IACrB,kBAAkB;IAClB,cAAc;IACd,aAAa;IACb,oBAAoB;CACZ;AAEV,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU;AACjC,KAAK,MAAM,IAAI,IAAI,gBAAgB,EAAE;AACnC,IAAA,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC;AAC/B,IAAA,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;IAC9B,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;AAC5B,IAAA,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,EAAG,CAAC;AAC5B;AAEA,SAAS,kBAAkB,CAAC,IAAY,EAAA;IACtC,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/B,MAAM,EAAE,GAAG,IA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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/rest-api",
3
- "version": "6.5.1",
3
+ "version": "7.0.1",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "hebcal"
@@ -16,7 +16,10 @@
16
16
  ".": "./dist/esm/index.js",
17
17
  "./dist/esm/*": "./dist/esm/*.js"
18
18
  },
19
- "files": ["dist", "po"],
19
+ "files": [
20
+ "dist",
21
+ "po"
22
+ ],
20
23
  "repository": {
21
24
  "type": "git",
22
25
  "url": "https://github.com/hebcal/hebcal-rest-api.git"
@@ -26,38 +29,31 @@
26
29
  },
27
30
  "homepage": "https://hebcal.github.io/api/rest-api/",
28
31
  "dependencies": {
29
- "@hebcal/core": "^6.6.0",
32
+ "@hebcal/core": "^6.8.2",
30
33
  "@hebcal/hdate": "^0.22.5",
31
- "@hebcal/leyning": "^9.5.5"
34
+ "@hebcal/leyning": "^9.6.0"
32
35
  },
33
36
  "scripts": {
34
37
  "po2json": "node ./po2json.js po/en.po po/he.po",
35
- "build": "npm run po2json && rollup -c",
38
+ "build": "npm run po2json && npm run json2ts && tsc",
36
39
  "prepublish": "npm run build",
37
40
  "pretest": "npm run build",
38
- "docs": "typedoc",
39
- "lint": "gts lint",
40
- "clean": "gts clean",
41
- "fix": "gts fix",
42
- "test": "vitest"
41
+ "docs": "npx -y typedoc@^0.28.20",
42
+ "lint": "oxlint && prettier --check \"src/**/*.ts\" \"*.js\"",
43
+ "clean": "rm -rf ./dist",
44
+ "fix": "oxlint --fix && prettier --write \"src/**/*.ts\" \"*.js\"",
45
+ "test": "vitest",
46
+ "json2ts": "node ./json2ts.js src/countryNames.json"
43
47
  },
44
48
  "license": "BSD-2-Clause",
45
49
  "devDependencies": {
46
50
  "@hebcal/learning": "^6.9.5",
47
51
  "@hebcal/locales": "^6.5.1",
48
- "@rollup/plugin-json": "^6.1.0",
49
- "@rollup/plugin-node-resolve": "^16.0.3",
50
- "@rollup/plugin-terser": "^1.0.0",
51
- "@rollup/plugin-typescript": "^12.3.0",
52
- "@types/node": "^26.1.0",
52
+ "@types/node": "^26.1.2",
53
53
  "gettext-parser": "^9.1.1",
54
- "gts": "^7.0.0",
55
- "rollup": "^4.62.2",
56
- "typedoc": "^0.28.20",
57
- "typescript": "^6.0.3",
54
+ "oxlint": "^1.76.0",
55
+ "prettier": "^3.9.6",
56
+ "typescript": "^7.0.2",
58
57
  "vitest": "^4.1.10"
59
- },
60
- "overrides": {
61
- "tmp": "^0.2.6"
62
58
  }
63
59
  }