mihrab-methods 1.0.0 → 1.0.2
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/README.md +91 -291
- package/certification.json +16 -5
- package/dist/cjs/authorities/algeria.d.ts +1 -1
- package/dist/cjs/authorities/indonesia.d.ts +1 -1
- package/dist/cjs/authorities/morocco.d.ts +1 -1
- package/dist/cjs/authorities/sweden.d.ts +1 -1
- package/dist/cjs/core/api.d.ts +1 -1
- package/dist/cjs/core/api.js +2 -1
- package/dist/cjs/core/clock.d.ts +8 -1
- package/dist/cjs/core/clock.js +29 -8
- package/dist/cjs/core/fetchLatest.d.ts +5 -1
- package/dist/cjs/core/fetchLatest.js +101 -46
- package/dist/cjs/core/registry.d.ts +1 -1
- package/dist/cjs/core/registry.js +5 -0
- package/dist/cjs/core/types.d.ts +4 -0
- package/dist/cjs/data/generated/algeriaCertification.js +1 -1
- package/dist/cjs/data/generated/diyanetCertification.js +1 -1
- package/dist/cjs/data/generated/indonesiaCertification.js +1 -1
- package/dist/cjs/data/generated/moroccoCertification.js +1 -1
- package/dist/cjs/data/generated/swedenCertification.js +1 -1
- package/dist/cjs/locate.js +1 -1
- package/dist/esm/authorities/algeria.d.ts +1 -1
- package/dist/esm/authorities/indonesia.d.ts +1 -1
- package/dist/esm/authorities/morocco.d.ts +1 -1
- package/dist/esm/authorities/sweden.d.ts +1 -1
- package/dist/esm/core/api.d.ts +1 -1
- package/dist/esm/core/api.js +2 -1
- package/dist/esm/core/clock.d.ts +8 -1
- package/dist/esm/core/clock.js +29 -8
- package/dist/esm/core/fetchLatest.d.ts +5 -1
- package/dist/esm/core/fetchLatest.js +99 -13
- package/dist/esm/core/registry.d.ts +1 -1
- package/dist/esm/core/registry.js +5 -0
- package/dist/esm/core/types.d.ts +4 -0
- package/dist/esm/data/generated/algeriaCertification.js +1 -1
- package/dist/esm/data/generated/diyanetCertification.js +1 -1
- package/dist/esm/data/generated/indonesiaCertification.js +1 -1
- package/dist/esm/data/generated/moroccoCertification.js +1 -1
- package/dist/esm/data/generated/swedenCertification.js +1 -1
- package/dist/esm/locate.js +1 -1
- package/package.json +3 -1
- package/schemas/certification.schema.json +119 -24
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const data = { "certified": true, "checkedAt": "2026-10-
|
|
1
|
+
const data = { "certified": true, "checkedAt": "2026-10-18", "places": 108, "checks": [{ "tables": "Sweden — Islamiska Förbundet’s tables", "places": 107, "times": 59640, "off": 0, "offWithoutCorrections": 20, "from": "2026-10-11", "to": "2027-11-19", "setAside": { "misplaced": [], "sourceFaults": 33395, "copiedRows": 646 } }, { "tables": "Sweden — Diyanet’s own tables", "places": 159, "times": 1393794, "off": 0, "offWithoutCorrections": 259, "from": "2024-01-01", "to": "2027-12-31" }], "corrections": { "from": "2024-01-01", "to": "2027-12-31", "entries": 270, "sha256": "173d7145b5ec917882f8ac9890dd1fa5f3143bd714eb540482861bf8a6bac660" }, "revision": 1 };
|
|
2
2
|
export default data;
|
package/dist/esm/locate.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* that into the authority whose table the point's community prays by, or
|
|
11
11
|
* null where none of the five applies.
|
|
12
12
|
*
|
|
13
|
-
* Its own entry point because the outlines are
|
|
13
|
+
* Its own entry point because the outlines are 470 KB an app that already
|
|
14
14
|
* knows its country does not need.
|
|
15
15
|
*/
|
|
16
16
|
import outlines from './data/generated/countryOutlines.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mihrab-methods",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "The prayer-time authorities' own calculation methods, each reproducing its published timetable to the minute: Sweden (Diyanet, as Islamiska Förbundet prints it), Diyanet worldwide, Morocco (Habous), Algeria (Ministry of Religious Affairs), Indonesia (Kemenag).",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"author": "Hassan El Ghamri",
|
|
@@ -169,6 +169,8 @@
|
|
|
169
169
|
"precertify": "npm run embed",
|
|
170
170
|
"certify": "tsx tools/certify.ts",
|
|
171
171
|
"vectors": "npm run embed && tsx tools/vectors.ts",
|
|
172
|
+
"readme": "node scripts/readme.mjs",
|
|
173
|
+
"preflight": "npm run typecheck && npm test && node scripts/readme.mjs --check",
|
|
172
174
|
"serve": "npm run embed && tsx tools/serve.ts"
|
|
173
175
|
},
|
|
174
176
|
"devDependencies": {
|
|
@@ -4,54 +4,149 @@
|
|
|
4
4
|
"title": "mihrab-methods certification",
|
|
5
5
|
"description": "What may be used: for each authority, whether its method reproduces every time of the authority's tables on the printed minute, over which dates, at which method revision, and which correction list that holds with. Written by `npm run certify`; read by apps to keep current (fetchLatestCorrections).",
|
|
6
6
|
"type": "object",
|
|
7
|
-
"propertyNames": {
|
|
8
|
-
|
|
7
|
+
"propertyNames": {
|
|
8
|
+
"enum": [
|
|
9
|
+
"sweden",
|
|
10
|
+
"diyanet",
|
|
11
|
+
"morocco",
|
|
12
|
+
"algeria",
|
|
13
|
+
"indonesia"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": {
|
|
17
|
+
"$ref": "#/$defs/entry"
|
|
18
|
+
},
|
|
9
19
|
"$defs": {
|
|
10
|
-
"date": {
|
|
20
|
+
"date": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
|
|
23
|
+
},
|
|
11
24
|
"entry": {
|
|
12
25
|
"type": "object",
|
|
13
|
-
"required": [
|
|
26
|
+
"required": [
|
|
27
|
+
"certified",
|
|
28
|
+
"checkedAt",
|
|
29
|
+
"checks"
|
|
30
|
+
],
|
|
14
31
|
"additionalProperties": false,
|
|
15
32
|
"properties": {
|
|
16
|
-
"certified": {
|
|
17
|
-
|
|
18
|
-
|
|
33
|
+
"certified": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"description": "True only when every check below has every time on the printed minute. Not trusted alone: apps re-derive it from the checks."
|
|
36
|
+
},
|
|
37
|
+
"checkedAt": {
|
|
38
|
+
"$ref": "#/$defs/date"
|
|
39
|
+
},
|
|
40
|
+
"places": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": 0,
|
|
43
|
+
"description": "How many places the library offers for the authority (the checks say how many were compared)."
|
|
44
|
+
},
|
|
45
|
+
"checks": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"minItems": 1,
|
|
48
|
+
"items": {
|
|
49
|
+
"$ref": "#/$defs/check"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
19
52
|
"corrections": {
|
|
20
53
|
"type": "object",
|
|
21
54
|
"description": "The correction list this certification is for: its identity, and the SHA-256 of data/corrections/<authority>.json as published.",
|
|
22
|
-
"required": [
|
|
55
|
+
"required": [
|
|
56
|
+
"from",
|
|
57
|
+
"to",
|
|
58
|
+
"entries"
|
|
59
|
+
],
|
|
23
60
|
"additionalProperties": false,
|
|
24
61
|
"properties": {
|
|
25
|
-
"from": {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
62
|
+
"from": {
|
|
63
|
+
"$ref": "#/$defs/date"
|
|
64
|
+
},
|
|
65
|
+
"to": {
|
|
66
|
+
"$ref": "#/$defs/date"
|
|
67
|
+
},
|
|
68
|
+
"entries": {
|
|
69
|
+
"type": "integer",
|
|
70
|
+
"minimum": 0
|
|
71
|
+
},
|
|
72
|
+
"sha256": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
75
|
+
}
|
|
29
76
|
}
|
|
30
77
|
},
|
|
31
|
-
"revision": {
|
|
78
|
+
"revision": {
|
|
79
|
+
"type": "integer",
|
|
80
|
+
"minimum": 1,
|
|
81
|
+
"description": "The method's revision the list is for. An app computing another revision must not apply the list."
|
|
82
|
+
}
|
|
32
83
|
}
|
|
33
84
|
},
|
|
34
85
|
"check": {
|
|
35
86
|
"type": "object",
|
|
36
|
-
"required": [
|
|
87
|
+
"required": [
|
|
88
|
+
"tables",
|
|
89
|
+
"places",
|
|
90
|
+
"times",
|
|
91
|
+
"off",
|
|
92
|
+
"from",
|
|
93
|
+
"to"
|
|
94
|
+
],
|
|
37
95
|
"additionalProperties": false,
|
|
38
96
|
"properties": {
|
|
39
|
-
"tables": {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
97
|
+
"tables": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"description": "Whose tables were checked."
|
|
100
|
+
},
|
|
101
|
+
"places": {
|
|
102
|
+
"type": "integer",
|
|
103
|
+
"minimum": 0
|
|
104
|
+
},
|
|
105
|
+
"times": {
|
|
106
|
+
"type": "integer",
|
|
107
|
+
"minimum": 0
|
|
108
|
+
},
|
|
109
|
+
"off": {
|
|
110
|
+
"type": "integer",
|
|
111
|
+
"minimum": 0,
|
|
112
|
+
"description": "Times not on the printed minute. Certified only at 0."
|
|
113
|
+
},
|
|
114
|
+
"from": {
|
|
115
|
+
"$ref": "#/$defs/date"
|
|
116
|
+
},
|
|
117
|
+
"to": {
|
|
118
|
+
"$ref": "#/$defs/date"
|
|
119
|
+
},
|
|
45
120
|
"setAside": {
|
|
46
121
|
"type": "object",
|
|
47
122
|
"description": "Rows set aside as the source's fault, not the method's, so each can be judged.",
|
|
48
|
-
"required": [
|
|
123
|
+
"required": [
|
|
124
|
+
"misplaced",
|
|
125
|
+
"sourceFaults",
|
|
126
|
+
"copiedRows"
|
|
127
|
+
],
|
|
49
128
|
"additionalProperties": false,
|
|
50
129
|
"properties": {
|
|
51
|
-
"misplaced": {
|
|
52
|
-
|
|
53
|
-
|
|
130
|
+
"misplaced": {
|
|
131
|
+
"type": "array",
|
|
132
|
+
"items": {
|
|
133
|
+
"type": "string"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"sourceFaults": {
|
|
137
|
+
"type": "integer",
|
|
138
|
+
"minimum": 0
|
|
139
|
+
},
|
|
140
|
+
"copiedRows": {
|
|
141
|
+
"type": "integer",
|
|
142
|
+
"minimum": 0
|
|
143
|
+
}
|
|
54
144
|
}
|
|
145
|
+
},
|
|
146
|
+
"offWithoutCorrections": {
|
|
147
|
+
"type": "integer",
|
|
148
|
+
"minimum": 0,
|
|
149
|
+
"description": "Of the same times, how many the method alone, without its correction list, leaves off the printed minute."
|
|
55
150
|
}
|
|
56
151
|
}
|
|
57
152
|
}
|