@camphoric/camphoric-event-lark 1.0.0 → 2.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/CHANGELOG.md +42 -0
- package/README.md +115 -35
- package/dist/camperSchema.js +1 -1
- package/dist/confirmationEmailTemplate.js +2 -2
- package/dist/index.d.ts +52 -0
- package/dist/index.js +7 -1
- package/dist/pricing/pricing.d.ts +2 -0
- package/dist/pricing/pricing.js +3 -0
- package/dist/promoCodes.d.ts +31 -0
- package/dist/promoCodes.js +32 -0
- package/dist/registrationErrorMessages.d.ts +33 -0
- package/dist/registrationErrorMessages.js +42 -0
- package/dist/registrationSchema.js +1 -1
- package/dist/registrationTypes.d.ts +4 -0
- package/dist/registrationTypes.js +3 -2
- package/dist/reports.d.ts +3 -0
- package/dist/reports.js +106 -42
- package/dist/testRegistrations.js +613 -84
- package/package.json +9 -7
- package/reports/Admin--All-Payments.j2 +40 -0
- package/reports/Admin--Meal-Income.j2 +64 -0
- package/reports/Admin--Non-Meal-Income.j2 +89 -0
- package/reports/All-Campers.j2 +2 -2
- package/reports/Campers--All-Camp-3.j2 +2 -2
- package/reports/Campers--By-Reg-Date.j2 +2 -2
- package/reports/Campers--By-Zip-Code--For-Carpool-.j2 +14 -14
- package/reports/Campers--Confirmation-Email-Info.j2 +2 -2
- package/reports/Campers--Early-Arrivals.j2 +1 -1
- package/reports/Campers--Half-Campers.j2 +3 -3
- package/reports/Campers--Lodging-by-Alpha.j2 +1 -1
- package/reports/Campers--Lodging-by-Lodging.j2 +1 -1
- package/reports/Campers--Minors.j2 +7 -4
- package/reports/Campers--NOT-Checked-In.j2 +3 -3
- package/reports/Campers--Name-Badges.j2 +4 -4
- package/reports/Campers--Parking-Exceptions.j2 +4 -4
- package/reports/Campers--Registration-Payments.j2 +2 -2
- package/reports/Campers--Registration-Volunteers.j2 +1 -1
- package/reports/Campers--Tent-Tags.j2 +5 -3
- package/reports/Community-Care--Campers.j2 +13 -11
- package/reports/Crew--Clean--C1.j2 +4 -4
- package/reports/Crew--Clean--C2-3.j2 +4 -4
- package/reports/Crew--Community-Care.j2 +2 -2
- package/reports/Crew--Kitchen--w--Lodging.j2 +1 -1
- package/reports/Crew--Managers-and-Others.j2 +2 -2
- package/reports/Crew--Office--Camp-1.j2 +2 -2
- package/reports/Crew--Office--Camp-2.j2 +2 -2
- package/reports/Crew--Office--Camp-3.j2 +2 -2
- package/reports/Crew--Setup-and-Teardown.j2 +2 -2
- package/reports/Crew--Special-Invites.j2 +1 -1
- package/reports/Donation-Report---Lark.j2 +2 -2
- package/reports/Kitchen--All-Meal-Tickets.j2 +2 -2
- package/reports/Kitchen--Meal-Location-Exceptions.j2 +2 -2
- package/reports/Kitchen--No-Meal-Ticket.j2 +2 -2
- package/reports/Registration--All-reg-workers.j2 +4 -4
- package/reports/Registration--Early-Arrivals.j2 +4 -4
- package/reports/Registration--First-Half-Arrivals.j2 +4 -4
- package/reports/Registration--PayPal-Invoices.j2 +4 -4
- package/reports/Registration--Second-Half-Arrivals.j2 +4 -4
- package/reports/Registration--Values-for-July-Email.j2 +2 -2
- package/reports/Security--Campers.j2 +13 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.0](https://github.com/camphoric/camphoric-event-lark/compare/v1.0.1...v2.0.0) (2026-11-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **deps:** the import-spec peer range is now ^1.2.0, the first spec with report categories.
|
|
9
|
+
* **reports:** needs a Camphoric release with report categories. An older server drops the category, leaving titles with no group. Importing again into an event that has the old titles adds the new reports beside
|
|
10
|
+
* **deps:** the e2e tests and npm run bulk need Camphoric v0.18.0 or later, and bulk needs an API token rather than a password.
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **deps:** need import-spec 1.2.0 for report categories ([1fdbda0](https://github.com/camphoric/camphoric-event-lark/commit/1fdbda0fe9897900a202ff27662de41cd21652a6))
|
|
15
|
+
* **promo-codes:** add a promo code for campers who refer a first-time camper ([04c8539](https://github.com/camphoric/camphoric-event-lark/commit/04c8539d260ab4178754b2c7b0dd62461d70f7d9)), closes [#12](https://github.com/camphoric/camphoric-event-lark/issues/12)
|
|
16
|
+
* **promo-codes:** add a promo code for first-time campers ([04c8539](https://github.com/camphoric/camphoric-event-lark/commit/04c8539d260ab4178754b2c7b0dd62461d70f7d9)), closes [#11](https://github.com/camphoric/camphoric-event-lark/issues/11)
|
|
17
|
+
* **registration-form:** give the form plain-language error messages ([ab8da93](https://github.com/camphoric/camphoric-event-lark/commit/ab8da937bc7f4697c4f9ba5f48cd1532d24575f1))
|
|
18
|
+
* **reports:** add a Kitchen, Meal Income CSV report ([9abff12](https://github.com/camphoric/camphoric-event-lark/commit/9abff126e71c6ed901d0e2080295204e0c5ecdcd))
|
|
19
|
+
* **reports:** add an "Admin, non-meal income" CSV report ([ae67c9e](https://github.com/camphoric/camphoric-event-lark/commit/ae67c9eda37b630984d643e6dcdb2c4c5c68cada))
|
|
20
|
+
* **reports:** add an "All payments" CSV report to Admin ([3fe3c57](https://github.com/camphoric/camphoric-event-lark/commit/3fe3c572f34d136f5fcb22ae52e92dbf8b8f996b))
|
|
21
|
+
* **reports:** give each report a category and drop it from the title ([05d2327](https://github.com/camphoric/camphoric-event-lark/commit/05d23270c15c06dbd5bf480a02de4e67a2ab411e))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **deps:** import with Camphoric v0.18's API tokens (import-tools 3.0.0) ([8e1316f](https://github.com/camphoric/camphoric-event-lark/commit/8e1316fe1a64845de550ee4afeaed00bed5c20cb))
|
|
27
|
+
* **emails:** don't list an empty meal type in the confirmation ([b189cc1](https://github.com/camphoric/camphoric-event-lark/commit/b189cc1422566a804876eb1ea25c1c2d905d648d))
|
|
28
|
+
* **emails:** name the camp year in kitchen invitations and drop a doubled period ([ab8da93](https://github.com/camphoric/camphoric-event-lark/commit/ab8da937bc7f4697c4f9ba5f48cd1532d24575f1))
|
|
29
|
+
* **promo-codes:** take the first-time camper discount off tuition only ([6188132](https://github.com/camphoric/camphoric-event-lark/commit/61881326bf6f438fac5bc296d0dfdcc124574b4f))
|
|
30
|
+
* **registration-form:** remove the doubled "basis" from the intro ([dba85dd](https://github.com/camphoric/camphoric-event-lark/commit/dba85dd37e520d16c96b26cdf1adb9e5ac8f6b5e))
|
|
31
|
+
* **registration-form:** spell "Relevant credentials" correctly ([ab8da93](https://github.com/camphoric/camphoric-event-lark/commit/ab8da937bc7f4697c4f9ba5f48cd1532d24575f1))
|
|
32
|
+
* **reports:** don't fail on a camper who didn't give an age ([26dc12f](https://github.com/camphoric/camphoric-event-lark/commit/26dc12f55f4742ab1c6feb93d34de2fde03e3f39))
|
|
33
|
+
* **reports:** drop a stray backslash from All Campers' phone column and a trailing comma from Parking Exceptions ([e720aae](https://github.com/camphoric/camphoric-event-lark/commit/e720aae0d5d79b2e6da73a6a49ed0992782f42c4))
|
|
34
|
+
* **reports:** format meal income as money and drop the free rows ([51c3fe8](https://github.com/camphoric/camphoric-event-lark/commit/51c3fe80b279d3e9a8201d8a75c45e5b64d30c8d))
|
|
35
|
+
* **reports:** name the meal income discount row after the codes it counts ([5d7f736](https://github.com/camphoric/camphoric-event-lark/commit/5d7f736032ad8b56392500e5baf470a1fb2d4648))
|
|
36
|
+
* **reports:** quote names and other free text in the CSV reports ([e720aae](https://github.com/camphoric/camphoric-event-lark/commit/e720aae0d5d79b2e6da73a6a49ed0992782f42c4))
|
|
37
|
+
|
|
38
|
+
## [1.0.1](https://github.com/camphoric/camphoric-event-lark/compare/v1.0.0...v1.0.1) (2026-10-20)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* **build:** publish to and install from npm ([125149a](https://github.com/camphoric/camphoric-event-lark/commit/125149a798c48e225129da636133673c776e0ce5))
|
|
44
|
+
|
|
3
45
|
## 1.0.0 (2026-10-17)
|
|
4
46
|
|
|
5
47
|
|
package/README.md
CHANGED
|
@@ -7,29 +7,13 @@ imported event.
|
|
|
7
7
|
|
|
8
8
|
It satisfies the contract in
|
|
9
9
|
[`@camphoric/camphoric-event-import-spec`](https://github.com/camphoric/camphoric/tree/main/data/packages/event-import-spec),
|
|
10
|
-
and Camphoric's importer (`data/` in the Camphoric repository) installs it from
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Installing from GitHub Packages
|
|
14
|
-
|
|
15
|
-
The `@camphoric` packages are on GitHub Packages, which needs a token to install **even public
|
|
16
|
-
packages**. This repository's `.npmrc` points the `@camphoric` scope there; give npm a token with
|
|
17
|
-
the `read:packages` scope, never in a committed file:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
gh auth refresh -s read:packages
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm config set //npm.pkg.github.com/:_authToken "$(gh auth token)"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
In GitHub Actions, the workflows use the job's own `GITHUB_TOKEN` (with `packages: read`).
|
|
10
|
+
and Camphoric's importer (`data/` in the Camphoric repository) installs it from npm and
|
|
11
|
+
imports it.
|
|
28
12
|
|
|
29
13
|
## Developing
|
|
30
14
|
|
|
31
15
|
```bash
|
|
32
|
-
npm ci # install
|
|
16
|
+
npm ci # install
|
|
33
17
|
npm test # unit tests, including the spec's conformance checks
|
|
34
18
|
npm run typecheck
|
|
35
19
|
npm run lint # type-check, then ESLint
|
|
@@ -38,15 +22,21 @@ scripts/smoke-test-package.sh # pack it, install it, and load it from its buil
|
|
|
38
22
|
```
|
|
39
23
|
|
|
40
24
|
The event's source is TypeScript; the published package is its build (`dist/`) and its report
|
|
41
|
-
templates (`reports/`). The spec is a **peer dependency** (`^1.
|
|
25
|
+
templates (`reports/`). The spec is a **peer dependency** (`^1.2.0`, the first with report categories), so Camphoric's importer loads
|
|
42
26
|
one copy of it for every event; a spec major this event doesn't follow fails to install rather than
|
|
43
27
|
nesting a second copy. Camphoric's `RELEASE.md` ("What a spec version means") describes how a new
|
|
44
28
|
spec major is rolled out.
|
|
45
29
|
|
|
46
|
-
To add generated registrations to an event imported into a running Camphoric
|
|
30
|
+
To add generated registrations to an event imported into a running Camphoric, with an Admin's
|
|
31
|
+
personal access token (here minted in Camphoric's development stack, beside this checkout; it
|
|
32
|
+
lasts an hour):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
export CAMPHORIC_API_TOKEN=$(docker compose -f ../camphoric/docker-compose.yml exec -T django ./manage.py camphoric_api_token create admin)
|
|
36
|
+
```
|
|
47
37
|
|
|
48
38
|
```bash
|
|
49
|
-
CAMPHORIC_URL=http://localhost:8000
|
|
39
|
+
CAMPHORIC_URL=http://localhost:8000 COUNT=10 npm run bulk
|
|
50
40
|
```
|
|
51
41
|
|
|
52
42
|
(`addRegistrations.ts` describes its other settings. Each completed registration queues a
|
|
@@ -54,10 +44,13 @@ confirmation email, so run it where mail goes to the console, as in local develo
|
|
|
54
44
|
|
|
55
45
|
## End-to-end tests
|
|
56
46
|
|
|
57
|
-
`e2e/` holds Playwright tests of the registration form, using the harness in
|
|
47
|
+
`e2e/` holds Playwright tests of the registration form and the reports, using the harness in
|
|
58
48
|
`@camphoric/camphoric-event-import-tools/e2e`. Before they run, a throwaway Camphoric starts
|
|
59
49
|
(the release image and Postgres, in Docker, on a free port), this event is imported into it with
|
|
60
|
-
its registration window open,
|
|
50
|
+
its registration window open, its sample registrations (`testRegistrations.ts`) and online
|
|
51
|
+
payment enabled, and afterwards the server is removed. Online payments go to the harness's fake
|
|
52
|
+
PayPal, so nothing is paid, and the throwaway server keeps the email it sends for the tests to
|
|
53
|
+
read.
|
|
61
54
|
|
|
62
55
|
```bash
|
|
63
56
|
npx playwright install chromium # once
|
|
@@ -68,17 +61,102 @@ Locally the results are listed in the terminal; `npm run e2e -- --reporter=html`
|
|
|
68
61
|
playwright show-report`, gives the HTML report (with traces) that CI uploads.
|
|
69
62
|
|
|
70
63
|
- `CAMPHORIC_IMAGE_TAG` picks the release image's tag (default `latest`, pulled fresh);
|
|
71
|
-
`CAMPHORIC_E2E_IMAGE` names a locally built image instead.
|
|
72
|
-
|
|
73
|
-
|
|
64
|
+
`CAMPHORIC_E2E_IMAGE` names a locally built image instead. The harness (import-tools 3) imports
|
|
65
|
+
with a personal access token it mints in the server, so the image must be Camphoric v0.18.0 or
|
|
66
|
+
later.
|
|
67
|
+
- The tests need that throwaway server: its fake PayPal is what lets them pay online, so
|
|
68
|
+
`CAMPHORIC_E2E_SERVER_URL` (importing into a running server) can't be used for them.
|
|
74
69
|
- Every test, on desktop and mobile Chrome, shares the one imported event, so a registration one
|
|
75
70
|
test completes stays.
|
|
76
|
-
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
- `e2e/reports.spec.ts` signs in to the admin (as the throwaway server's admin, from the
|
|
72
|
+
harness's `adminCredentials()`) and opens each report in `reports.ts`. It fails on any render
|
|
73
|
+
error, and on any server warning (a field the event or a Camphoric object doesn't have) but the
|
|
74
|
+
known ones its `knownWarnings` lists, each tracked by an issue. It also fails a CSV report whose
|
|
75
|
+
quoting is broken or whose rows don't have the header's number of fields (an unquoted comma). It
|
|
76
|
+
doesn't check what a report says, and runs on desktop Chrome only, since reports render on the
|
|
77
|
+
server. A warning comes only from a line some registration reaches, and every test shares the
|
|
78
|
+
one event, so which show depends on what the tests have registered:
|
|
79
|
+
`__tests__/reportVariables.test.ts` checks every name a template reads against the event instead.
|
|
80
|
+
- The fixtures: `registration`, a page object for the form (fields by label, campers and their
|
|
81
|
+
lists, lodging, the price ticker, the payment step); `admin`, for invitations and the email the
|
|
82
|
+
server sent; and `payPal`, the orders sent to the fake PayPal. The client's markup lives only
|
|
83
|
+
in the harness, so a change to the Camphoric client changes the harness, not these tests.
|
|
84
|
+
- `e2e/forms.ts` holds this event's own helpers: the required answers, opening the form through
|
|
85
|
+
an invitation, and the amounts due by check and online.
|
|
86
|
+
|
|
87
|
+
`.github/workflows/e2e.yml` runs them on pull requests, from `upstream.yml` (below), and on
|
|
88
|
+
demand.
|
|
89
|
+
|
|
90
|
+
## Testing against new Camphoric releases
|
|
91
|
+
|
|
92
|
+
`.github/workflows/upstream.yml` ("Camphoric releases") tests this event against the newest
|
|
93
|
+
Camphoric release and import packages, rather than the lockfile's. Every 6 hours it finds the
|
|
94
|
+
newest stable Camphoric release (by version) whose image `ghcr.io/camphoric/camphoric:vX.Y.Z` is
|
|
95
|
+
published, and the newest `@camphoric/camphoric-event-import-spec` and `-tools` versions within
|
|
96
|
+
this event's ranges in `package.json`. A release is created before its image is pushed, so until
|
|
97
|
+
the newest release's image is published it tests the newest release before it that has one, and
|
|
98
|
+
says so in the run's summary and notes. Once the release is a day old, the note says instead that
|
|
99
|
+
its image was never published and that the release's `build-image` job needs re-running. It looks
|
|
100
|
+
each image up in GHCR's registry API, with retries: an answer other than found or not found (an
|
|
101
|
+
outage, say) fails the run, rather than counting as a missing image. When it hasn't tested that
|
|
102
|
+
combination yet, it runs `ci.yml` and `e2e.yml` against exactly those versions; the run's summary
|
|
103
|
+
lists them.
|
|
104
|
+
|
|
105
|
+
A combination is tested once, pass or fail: a marker in the Actions cache records it, keyed by
|
|
106
|
+
the Camphoric release and package versions tested, by each package's newest version, in this
|
|
107
|
+
event's range or not, and by a newer release whose image is still missing a day after its release.
|
|
108
|
+
So the first check after a newer release's image is published tests it, and a new major outside a
|
|
109
|
+
range is tested, and reported, within 6 hours. A newer release's missing image is reported within
|
|
110
|
+
6 hours of the release turning a day old; before that, usually only by a Monday or forced run.
|
|
111
|
+
When none of the five newest releases has a published image, the 6-hourly check waits.
|
|
112
|
+
|
|
113
|
+
On Mondays at 14:00 UTC it tests regardless. That catches drift no release causes, such as a new
|
|
114
|
+
Node 22 or runner image, or a new in-range version of a dependency that the smoke test installs
|
|
115
|
+
from npm. Chromium comes with `@playwright/test`: the lockfile's, unless the import-tools version
|
|
116
|
+
tested needs a newer one, when npm installs the newest its peer range allows, so a new Playwright
|
|
117
|
+
release changes it too. The CI and E2E summaries list this event's top-level packages as
|
|
118
|
+
installed, and name each whose version isn't the one `package-lock.json` pins: the requested
|
|
119
|
+
packages, and any they moved, such as `@playwright/test`. With no image found, it tests the newest
|
|
120
|
+
release anyway, so the missing image is reported, and it doesn't record the combination.
|
|
121
|
+
|
|
122
|
+
A failure opens a **`camphoric-compat`** issue here, or comments on the open one, naming the
|
|
123
|
+
versions tested; so does a note that a package has a version newer than this event's range
|
|
124
|
+
allows (a new major, which this event needs migrating to), or that the newest release's image
|
|
125
|
+
isn't published. A report the issue already has isn't repeated, and a clean run closes it. A
|
|
126
|
+
note's wording is fixed (a missing image's changes once, when its release is a day old), so the
|
|
127
|
+
same note isn't reported again on each run.
|
|
128
|
+
|
|
129
|
+
A fix pushed here runs CI against the lockfile, not the new versions, and the marker keeps the
|
|
130
|
+
6-hourly check from retrying the failed combination. To test it again (and close the issue)
|
|
131
|
+
before Monday, run it with `force`:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
gh workflow run upstream.yml -f force=true
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
To run CI or E2E by hand against a given image tag (a pre-release, say) or exact package
|
|
138
|
+
versions (an image of v0.18.0 or later, and import-tools 3.x: the harness mints an API token in
|
|
139
|
+
the server, and earlier versions sign in with a password v0.18.0 refuses):
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
gh workflow run e2e.yml -f image_tag=v0.19.0-rc.1
|
|
143
|
+
gh workflow run e2e.yml -f spec_version=1.2.0 -f tools_version=3.0.0
|
|
144
|
+
gh workflow run ci.yml -f spec_version=1.2.0 -f tools_version=3.0.0
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
A version outside this event's range works too, such as a new major or a pre-release
|
|
148
|
+
(`-f tools_version=4.0.0-rc.1`): the run installs it over the range (with `--force` if a peer
|
|
149
|
+
range makes npm refuse it), checks the installed package's own version, and marks it `invalid` in
|
|
150
|
+
the summary's `npm ls`. It must be an exact version, not a range or a tag. CI's smoke test
|
|
151
|
+
installs the packed package with the `spec_version` given (`tools_version` doesn't apply, since
|
|
152
|
+
the package doesn't depend on the tools). To do the same locally:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
SPEC_VERSION=1.2.0 scripts/smoke-test-package.sh
|
|
156
|
+
```
|
|
79
157
|
|
|
80
|
-
|
|
81
|
-
|
|
158
|
+
GitHub disables scheduled workflows in a public repository after 60 days without activity; if
|
|
159
|
+
the Actions tab shows "Camphoric releases" disabled, enable it there.
|
|
82
160
|
|
|
83
161
|
## Releases
|
|
84
162
|
|
|
@@ -86,14 +164,16 @@ Commits follow [Conventional Commits](https://www.conventionalcommits.org/) (`fe
|
|
|
86
164
|
release; `feat!:` is a major). On each push to `main`,
|
|
87
165
|
[release-please](https://github.com/googleapis/release-please) keeps a release PR up to date
|
|
88
166
|
with the version bump and `CHANGELOG.md`. Merging it tags `vX.Y.Z`, creates the GitHub Release,
|
|
89
|
-
and publishes the package to
|
|
167
|
+
and publishes the package to npm. To publish a released tag again, if that failed:
|
|
90
168
|
|
|
91
169
|
```bash
|
|
92
170
|
gh workflow run release-please.yml -f tag=v1.0.0
|
|
93
171
|
```
|
|
94
172
|
|
|
95
|
-
The
|
|
96
|
-
|
|
173
|
+
The package's settings on npmjs.com list this repository and `release-please.yml` as its GitHub
|
|
174
|
+
Actions trusted publisher, allowed to `npm publish`. npm drops a trusted publisher that hasn't
|
|
175
|
+
published within 2 days of being added; without a matching one, the publish fails with npm's 404
|
|
176
|
+
or `ENEEDAUTH`.
|
|
97
177
|
|
|
98
178
|
## History
|
|
99
179
|
|
package/dist/camperSchema.js
CHANGED
|
@@ -21,7 +21,7 @@ accommodate your choice.
|
|
|
21
21
|
- If you paid 50% of your tuition, your final payment will be due NO LATER THAN
|
|
22
22
|
JUNE 20.
|
|
23
23
|
- If you have not yet ordered meals then they also need to be ordered before
|
|
24
|
-
June 20th by emailing registration@larkcamp.org
|
|
24
|
+
June 20th by emailing registration@larkcamp.org.
|
|
25
25
|
|
|
26
26
|
**YOU HAVE REGISTERED FOR:**
|
|
27
27
|
|
|
@@ -30,7 +30,7 @@ accommodate your choice.
|
|
|
30
30
|
{%- set badge = camper.attributes.name_badge or {} -%}
|
|
31
31
|
{{ camper.attributes.first_name }} {{ camper.attributes.last_name }} - {{ camper.attributes.session }}
|
|
32
32
|
{{ camper.lodging.path_names | join(', ') if camper.lodging else 'none' }}
|
|
33
|
-
{{ meals.meal_plan }}, {{ meals.meal_type }}: {{ camper.pricing.meals | money }}
|
|
33
|
+
{{ meals.meal_plan }}{% if meals.meal_type %}, {{ meals.meal_type }}{% endif %}: {{ camper.pricing.meals | money }}
|
|
34
34
|
{% if badge.purchase -%}
|
|
35
35
|
Name badge ({{ camper.pricing.name_badge | money }}): {{ badge.name }} - {{ badge.pronouns }}
|
|
36
36
|
{% endif -%}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type SampleRegGenerator } from '@camphoric/camphoric-event-import-spec';
|
|
2
2
|
export declare const eventName: string;
|
|
3
|
+
export declare const epaymentHandling = "2.5";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
data: {
|
|
5
6
|
lodgings?: import("@camphoric/camphoric-event-import-spec").Lodgings | undefined;
|
|
@@ -7,6 +8,41 @@ declare const _default: {
|
|
|
7
8
|
name: string;
|
|
8
9
|
label: string;
|
|
9
10
|
}[] | undefined;
|
|
11
|
+
email_templates?: {
|
|
12
|
+
filter?: {
|
|
13
|
+
combinator?: "and" | "or" | undefined;
|
|
14
|
+
rules: ({
|
|
15
|
+
value?: unknown;
|
|
16
|
+
field: string;
|
|
17
|
+
op: "is_set" | "is_not_set" | "is_true" | "is_false";
|
|
18
|
+
} | {
|
|
19
|
+
field: string;
|
|
20
|
+
op: "is_set" | "is_not_set" | "is_true" | "is_false" | "contains" | "not_contains" | "is" | "is_not" | "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "any_of" | "before" | "after" | "on";
|
|
21
|
+
value: unknown;
|
|
22
|
+
})[];
|
|
23
|
+
} | undefined;
|
|
24
|
+
from_email?: string | undefined;
|
|
25
|
+
reply_to?: string | undefined;
|
|
26
|
+
recipient_source?: "campers" | "registrations" | "manual" | undefined;
|
|
27
|
+
filter_expression?: string | undefined;
|
|
28
|
+
address_expression?: string | undefined;
|
|
29
|
+
name_expression?: string | undefined;
|
|
30
|
+
recipient_list?: string | undefined;
|
|
31
|
+
include_incomplete?: boolean | undefined;
|
|
32
|
+
name: string;
|
|
33
|
+
subject: string;
|
|
34
|
+
body: string;
|
|
35
|
+
}[] | undefined;
|
|
36
|
+
promo_codes?: {
|
|
37
|
+
scope?: "registration" | "camper" | undefined;
|
|
38
|
+
enabled?: boolean | undefined;
|
|
39
|
+
expiration_date?: string | undefined;
|
|
40
|
+
excluded_registration_types?: string[] | undefined;
|
|
41
|
+
excludes_uninvited?: boolean | undefined;
|
|
42
|
+
label: string;
|
|
43
|
+
code: string;
|
|
44
|
+
pricing_logic: unknown;
|
|
45
|
+
}[] | undefined;
|
|
10
46
|
organization: string | number;
|
|
11
47
|
event: {
|
|
12
48
|
registration_start?: string | undefined;
|
|
@@ -37,6 +73,10 @@ declare const _default: {
|
|
|
37
73
|
exp: unknown;
|
|
38
74
|
}[] | undefined;
|
|
39
75
|
paypal_enabled?: boolean | undefined;
|
|
76
|
+
payment_types?: {
|
|
77
|
+
label: string;
|
|
78
|
+
value: string;
|
|
79
|
+
}[] | undefined;
|
|
40
80
|
paypal_client_id?: string | undefined;
|
|
41
81
|
epayment_handling?: string | undefined;
|
|
42
82
|
pre_submit_template?: string | undefined;
|
|
@@ -44,16 +84,28 @@ declare const _default: {
|
|
|
44
84
|
confirmation_email_subject?: string | undefined;
|
|
45
85
|
confirmation_email_template?: string | undefined;
|
|
46
86
|
confirmation_email_from?: string | undefined;
|
|
87
|
+
confirmation_email_reply_to?: string | undefined;
|
|
88
|
+
invoice_email_subject?: string | undefined;
|
|
89
|
+
invoice_email_template?: string | undefined;
|
|
90
|
+
invoice_email_from?: string | undefined;
|
|
91
|
+
invoice_email_reply_to?: string | undefined;
|
|
47
92
|
name: string;
|
|
48
93
|
};
|
|
49
94
|
reports: {
|
|
95
|
+
category?: string | undefined;
|
|
96
|
+
description?: string | undefined;
|
|
50
97
|
output?: "csv" | "md" | "txt" | "html" | "hbs" | undefined;
|
|
51
98
|
variables_source?: "client" | "server" | undefined;
|
|
99
|
+
variables_schema?: Record<string, unknown> | undefined;
|
|
52
100
|
title: string;
|
|
53
101
|
template: string;
|
|
54
102
|
}[];
|
|
55
103
|
registration_types: {
|
|
104
|
+
invitation_email_from?: string | undefined;
|
|
105
|
+
invitation_email_reply_to?: string | undefined;
|
|
106
|
+
camper_schema_overrides?: Record<string, unknown> | undefined;
|
|
56
107
|
registration_schema_overrides?: Record<string, unknown> | undefined;
|
|
108
|
+
ui_schema_overrides?: Record<string, unknown> | undefined;
|
|
57
109
|
name: string;
|
|
58
110
|
label: string;
|
|
59
111
|
invitation_email_subject: string;
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,9 @@ import camper_admin_schema from "./camperAdminAttributes.js";
|
|
|
10
10
|
import registration_schema from "./registrationSchema.js";
|
|
11
11
|
import registration_types from "./registrationTypes.js";
|
|
12
12
|
import registration_ui_schema from "./registrationUISchema.js";
|
|
13
|
+
import registration_error_messages from "./registrationErrorMessages.js";
|
|
13
14
|
import lodgings from "./lodgings.js";
|
|
15
|
+
import promo_codes from "./promoCodes.js";
|
|
14
16
|
import reports from "./reports.js";
|
|
15
17
|
import makeRegistrations from "./testRegistrations.js";
|
|
16
18
|
import registration_template_vars from "./regTemplateVars.js";
|
|
@@ -19,6 +21,8 @@ import registration_admin_schema from "./regAdminAttributes.js";
|
|
|
19
21
|
import { dates, lengthInDays, year } from "./dates.js";
|
|
20
22
|
import { confirmation_email_template, confirmation_email_subject, } from "./confirmationEmailTemplate.js";
|
|
21
23
|
export const eventName = `Lark Camp ${year}`;
|
|
24
|
+
// The handling (percent) added to a payment made online, with PayPal
|
|
25
|
+
export const epaymentHandling = '2.5';
|
|
22
26
|
const data = {
|
|
23
27
|
organization: 'Lark Traditional Arts',
|
|
24
28
|
event: {
|
|
@@ -38,6 +42,7 @@ const data = {
|
|
|
38
42
|
registration_template_vars,
|
|
39
43
|
registration_schema,
|
|
40
44
|
registration_ui_schema,
|
|
45
|
+
registration_error_messages,
|
|
41
46
|
registration_admin_schema,
|
|
42
47
|
// deposit_schema,
|
|
43
48
|
// deposit_schema,
|
|
@@ -53,6 +58,7 @@ const data = {
|
|
|
53
58
|
lodgings,
|
|
54
59
|
reports,
|
|
55
60
|
registration_types,
|
|
61
|
+
promo_codes,
|
|
56
62
|
custom_charge_types: [
|
|
57
63
|
{
|
|
58
64
|
label: 'New Camper Discount',
|
|
@@ -75,7 +81,7 @@ const data = {
|
|
|
75
81
|
if (process.env.PAYPAL_CLIENT_ID) {
|
|
76
82
|
data.event.paypal_enabled = true;
|
|
77
83
|
data.event.paypal_client_id = process.env.PAYPAL_CLIENT_ID;
|
|
78
|
-
data.event.epayment_handling =
|
|
84
|
+
data.event.epayment_handling = epaymentHandling;
|
|
79
85
|
}
|
|
80
86
|
const sampleRegGenerator = async (_fetch, results) => {
|
|
81
87
|
const regs = makeRegistrations(savedLodging(results));
|
package/dist/pricing/pricing.js
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const yearSuffix: (campYear: number) => string;
|
|
2
|
+
export declare const firstTimeCode: (campYear: number) => string;
|
|
3
|
+
export declare const firstTimeReferrerCode: (campYear: number) => string;
|
|
4
|
+
declare const _default: ({
|
|
5
|
+
label: string;
|
|
6
|
+
code: string;
|
|
7
|
+
pricing_logic: {
|
|
8
|
+
max: (number | {
|
|
9
|
+
min: ({
|
|
10
|
+
var: string;
|
|
11
|
+
} | {
|
|
12
|
+
var: (string | number)[];
|
|
13
|
+
})[];
|
|
14
|
+
})[];
|
|
15
|
+
};
|
|
16
|
+
scope: "camper";
|
|
17
|
+
} | {
|
|
18
|
+
label: string;
|
|
19
|
+
code: string;
|
|
20
|
+
pricing_logic: {
|
|
21
|
+
max: (number | {
|
|
22
|
+
min: ({
|
|
23
|
+
var: string;
|
|
24
|
+
} | {
|
|
25
|
+
var: (string | number)[];
|
|
26
|
+
})[];
|
|
27
|
+
})[];
|
|
28
|
+
};
|
|
29
|
+
scope: "registration";
|
|
30
|
+
})[];
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { year } from "./dates.js";
|
|
3
|
+
// Each year's codes end with the first 4 characters of the year's MD5 sum, so
|
|
4
|
+
// they're new every year. They aren't secret: anyone with this package (it's
|
|
5
|
+
// public) can work them out for any year.
|
|
6
|
+
export const yearSuffix = (campYear) => createHash('md5').update(String(campYear)).digest('hex').slice(0, 4);
|
|
7
|
+
export const firstTimeCode = (campYear) => `lc${campYear}FirstTime${yearSuffix(campYear)}`;
|
|
8
|
+
export const firstTimeReferrerCode = (campYear) => `lc${campYear}FTReferrer${yearSuffix(campYear)}`;
|
|
9
|
+
// Up to `amount` off one price line: never more than the line, and never
|
|
10
|
+
// below nothing
|
|
11
|
+
const upTo = (amount, line) => ({
|
|
12
|
+
max: [0, { min: [{ var: amount }, { var: [line, 0] }] }],
|
|
13
|
+
});
|
|
14
|
+
// Promo codes: Camphoric works out each one's discount after every other price
|
|
15
|
+
// line (and never takes more than the total it comes off)
|
|
16
|
+
export default [
|
|
17
|
+
{
|
|
18
|
+
label: 'First-time camper',
|
|
19
|
+
code: firstTimeCode(year),
|
|
20
|
+
// $100 off each camper's tuition, or the whole tuition when it's less
|
|
21
|
+
pricing_logic: upTo('pricing.first_time_camper_discount', 'tuition'),
|
|
22
|
+
scope: 'camper',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: 'First-time camper referrer',
|
|
26
|
+
code: firstTimeReferrerCode(year),
|
|
27
|
+
// $75 off the registration's meals (all its campers' together), or the
|
|
28
|
+
// meals' whole cost when they come to less
|
|
29
|
+
pricing_logic: upTo('pricing.first_time_referrer_meals_discount', 'meals'),
|
|
30
|
+
scope: 'registration',
|
|
31
|
+
},
|
|
32
|
+
];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
lta_donation: {
|
|
3
|
+
type: string;
|
|
4
|
+
minimum: string;
|
|
5
|
+
};
|
|
6
|
+
'campers.*.name_badge.pronouns': {
|
|
7
|
+
maxLength: string;
|
|
8
|
+
};
|
|
9
|
+
'campers.*.good_samaritan.credentials': {
|
|
10
|
+
required: string;
|
|
11
|
+
};
|
|
12
|
+
'campers.*.good_samaritan.skills': {
|
|
13
|
+
required: string;
|
|
14
|
+
minItems: string;
|
|
15
|
+
};
|
|
16
|
+
'payment.payer_number': {
|
|
17
|
+
pattern: string;
|
|
18
|
+
};
|
|
19
|
+
registrant_email: {
|
|
20
|
+
format: string;
|
|
21
|
+
pattern: string;
|
|
22
|
+
};
|
|
23
|
+
'campers.*.email': {
|
|
24
|
+
format: string;
|
|
25
|
+
};
|
|
26
|
+
campers: {
|
|
27
|
+
minItems: string;
|
|
28
|
+
};
|
|
29
|
+
'*': {
|
|
30
|
+
required: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// The form's own validation messages, in place of the raw JSON-schema ones
|
|
2
|
+
// ("must be integer", "must match pattern …") that testers couldn't make sense
|
|
3
|
+
// of: { field path: { validation keyword: message } }, with "*" for an array
|
|
4
|
+
// index and the path "*" for the event-wide default of a keyword. A required
|
|
5
|
+
// field's path is the missing field's own.
|
|
6
|
+
export default {
|
|
7
|
+
// Jed: a donation of 3.50 was "demanding an integer value"
|
|
8
|
+
'lta_donation': {
|
|
9
|
+
type: 'Please enter a whole number of dollars, e.g. 25.',
|
|
10
|
+
minimum: 'Please enter a whole number of dollars, e.g. 25.',
|
|
11
|
+
},
|
|
12
|
+
// Mahati: pronouns over the limit gave "errors in the name badge field"
|
|
13
|
+
'campers.*.name_badge.pronouns': {
|
|
14
|
+
maxLength: 'Pronouns can be at most 15 characters.',
|
|
15
|
+
},
|
|
16
|
+
// Madelyn: volunteering without credentials gave a page of errors
|
|
17
|
+
'campers.*.good_samaritan.credentials': {
|
|
18
|
+
required: 'Please list your credentials.',
|
|
19
|
+
},
|
|
20
|
+
'campers.*.good_samaritan.skills': {
|
|
21
|
+
required: 'Please check at least one skill.',
|
|
22
|
+
minItems: 'Please check at least one skill.',
|
|
23
|
+
},
|
|
24
|
+
'payment.payer_number': {
|
|
25
|
+
pattern: 'Enter your phone number with country code, digits only, e.g. +17075551234.',
|
|
26
|
+
},
|
|
27
|
+
// (Camphoric checks the registrant's email with a pattern, too)
|
|
28
|
+
'registrant_email': {
|
|
29
|
+
format: 'Please enter a valid email address.',
|
|
30
|
+
pattern: 'Please enter a valid email address.',
|
|
31
|
+
},
|
|
32
|
+
'campers.*.email': {
|
|
33
|
+
format: 'Please enter a valid email address.',
|
|
34
|
+
},
|
|
35
|
+
// Removing the only camper gave "Camper Information: Please choose at least 1"
|
|
36
|
+
'campers': {
|
|
37
|
+
minItems: 'Please add at least one camper.',
|
|
38
|
+
},
|
|
39
|
+
'*': {
|
|
40
|
+
required: 'This field is required.',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
Read the [Terms of Registration](http://www.larkcamp.org/campterms.html) before you fill out this form.
|
|
7
7
|
|
|
8
8
|
Please note that registrations are accepted in the order they are received and
|
|
9
|
-
your camping preferences are processed on a
|
|
9
|
+
your camping preferences are processed on a first-come, first-served basis.
|
|
10
10
|
|
|
11
11
|
### PROOF OF NEGATIVE COVID TEST JUST BEFORE CAMP WILL BE REQUIRED FOR ALL ATTENDEES
|
|
12
12
|
|
|
@@ -14,7 +14,11 @@ export declare const regTypes: ({
|
|
|
14
14
|
};
|
|
15
15
|
})[];
|
|
16
16
|
declare const _default: {
|
|
17
|
+
invitation_email_from?: string | undefined;
|
|
18
|
+
invitation_email_reply_to?: string | undefined;
|
|
19
|
+
camper_schema_overrides?: Record<string, unknown> | undefined;
|
|
17
20
|
registration_schema_overrides?: Record<string, unknown> | undefined;
|
|
21
|
+
ui_schema_overrides?: Record<string, unknown> | undefined;
|
|
18
22
|
name: string;
|
|
19
23
|
label: string;
|
|
20
24
|
invitation_email_subject: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as priceLists from "./pricing/pricingLists.js";
|
|
2
2
|
import pricing from "./pricing/pricing.js";
|
|
3
|
+
import { year } from "./dates.js";
|
|
3
4
|
// Invitation emails are Jinja (SPEC §8.4): `invitation` (recipient_name,
|
|
4
5
|
// recipient_email, code, register_url), `registration_type` and `event`.
|
|
5
6
|
const createCrewEmailTemplate = (regType) => `
|
|
@@ -54,7 +55,7 @@ const crewEmailTemplateOverrides = {
|
|
|
54
55
|
'kitchen-full': () => `
|
|
55
56
|
Dear {{ invitation.recipient_name or invitation.recipient_email }},
|
|
56
57
|
|
|
57
|
-
Below is your personalized link to register for Lark Camp
|
|
58
|
+
Below is your personalized link to register for Lark Camp ${year} as Full Trade Kitchen Crew (includes kitchens, coffeehouses, & bakery).
|
|
58
59
|
|
|
59
60
|
[Please click here to register!]({{ invitation.register_url }})
|
|
60
61
|
|
|
@@ -90,7 +91,7 @@ https://www.larktraditionalarts.org`,
|
|
|
90
91
|
'kitchen-partial': () => `
|
|
91
92
|
Dear {{ invitation.recipient_name or invitation.recipient_email }},
|
|
92
93
|
|
|
93
|
-
Below is your personalized link to register for Lark Camp
|
|
94
|
+
Below is your personalized link to register for Lark Camp ${year} as Partial Pay Kitchen Crew (includes kitchens, coffeehouses, & bakery).
|
|
94
95
|
|
|
95
96
|
[Please click here to register!]({{ invitation.register_url }})
|
|
96
97
|
|
package/dist/reports.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
category?: string | undefined;
|
|
3
|
+
description?: string | undefined;
|
|
2
4
|
output?: "csv" | "md" | "txt" | "html" | "hbs" | undefined;
|
|
3
5
|
variables_source?: "client" | "server" | undefined;
|
|
6
|
+
variables_schema?: Record<string, unknown> | undefined;
|
|
4
7
|
title: string;
|
|
5
8
|
template: string;
|
|
6
9
|
}[];
|