@epilot/validators
v0.0.30
Published
Shared input validators, regex patterns, and AJV schema keywords used across epilot Journey apps.
Maintainers
Keywords
Readme
@epilot/validators
Shared input validators, regex patterns, and AJV schema keywords used across epilot Journey apps.
Installation
yarn add @epilot/validatorsUsage
import {
functionalValidators,
regExpStatments,
schemaKeywords,
IBAN_Specifications
} from '@epilot/validators'What each export provides:
| Export | Description |
| ---------------------- | ------------------------------------------------------------------ |
| functionalValidators | Callback-style validators: iban, birth_date, future_date_14. |
| regExpStatments | Named regex patterns (email, name, German date, telephone, etc.). |
| schemaKeywords | AJV-compatible custom JSON Schema keywords. |
| IBAN_Specifications | Country specifications re-exported from the iban package. |
Development
yarn install
yarn start # tsdx watch — rebuild on change
yarn build # tsdx build — produces dist/
yarn test # tsdx test
yarn lint # eslintdist/ is gitignored. The prepack script rebuilds it automatically before any npm publish / npm pack, so a fresh checkout never needs a manual yarn build before releasing.
Releasing
The CI does not publish this package. The publish job is disabled in .gitlab-ci.yml. Pushing a tag does not trigger a release. Version bumps and publishes happen manually from a developer's machine.
Why
The @epilot npm organisation has 2FA on writes. An unattended GitLab runner can't supply an OTP, so CI publishes are blocked at the registry with a 403. Until a service-account-style token is configured at the npm-org level, publishing is a human step.
Cutting a release
- Be on
masterwith a clean working tree and an up-to-date pull. - Bump version, regenerate
CHANGELOG.md, commit, tag, and push:
This runsyarn releaseprerelease(lint + test), thenstandard-version, thenpostrelease(git push && git push --tags). It does not publish. - Make sure you're logged in to npm as a user with publish rights on
@epilot/validators:npm whoami # confirm the right user npm login # only if needed - Publish:
npm publishprepackrebuildsdist/from source.- npm prompts for your 2FA OTP.
- On success, the new version is on the registry; the tag pushed in step 2 is now the canonical marker for it.
If you forget step 4
The tag exists but no version was published. Either:
- Run
npm publishfrom the tagged commit, or - Run
yarn releaseagain (it will bump to the next patch) and publish that.
npm doesn't allow republishing the same version, so if a publish half-completed, bump and republish.
