@defra-fish/gafl-webapp-service

中文文档
1.77.1发布于 2026/11/12SEE LICENSE IN LICENSEES Module构建来源已验证近 30 天下载 3094

The websales frontend for the GAFL service

原始使用文档
文档目录3 节
  1. Environment variables
  2. OS Places address lookup
  3. GOV.UK pay setup

gafl-webapp-service

The web and telesales service buying a rod fishing licence; for https://www.gov.uk/fishing-licences

To run from this directory:

node src/gafl-webapp-service.js

Environment variables

namedescriptionrequireddefaultvalid
NODE_ENVNode environmentnodevelopment, fsh-{env}
HAPI_KEEP_ALIVE_TIMEOUT_MSConfigure the keep-alive timeout on the server listenerno1 minute
PORTThe http port the listens onno3000
REDIS_HOSTHostname of the redis instance used for session cachingyes
REDIS_PORTPort number of the redis instance used for session cachingno6379
REDIS_PASSWORDPassword used to authenticate with the configured redis instanceno
CHANNELThe sales channelnowebsaleswebsales, telesales
SESSION_COOKIE_NAMEName of the session cookienosid
CSRF_TOKEN_COOKIE_NAMEName of the CSRF token cookienorlsctkn
SESSION_COOKIE_PASSWORDEncryption key for the session cookie (at least 32 characters)yes
SESSION_TTL_MSTime to live for the session cookie and cacheno10800000
ADDRESS_LOOKUP_URLOS Places API endpoint URLnohttps://api.os.uk/search/places/v1/postcode
ADDRESS_LOOKUP_KEYThe API key required by OS placesno
ADDRESS_LOOKUP_MAX_RESULTSMaximum results to fetch from OS API (pagination cap)no5000
ADDRESS_LOOKUP_TIMEOUT_MSThe timeout in milliseconds for the lookupno10000
SALES_API_URLThe address of the sales apinohttp://0.0.0.0:4000
SALES_API_TIMEOUT_MSThe timeout in milliseconds requests to the apino10000
GOV_PAY_API_URLThe GOV.UK Pay API base urlnoYes
GOV_PAY_APIKEYGOV pay access identifiernoYes
GOV_PAY_REQUEST_TIMEOUT_MSTimeout in milliseconds for API requestsnoYes
FEEDBACK_URILocation of feedback surveyno#
ANALYTICS_PRIMARY_PROPERTYAnalytics ID for tracking inc ecommerceno
ANALYTICS_PROPERTY_APIAnalytics property API key for linking Analytics.google propertyno
SERVICE_PAGEGOV.UK service pagenohttps://www.gov.uk/fishing-licences/buy-a-fishing-licence
AIRBRAKE_HOSTURL of airbrake hostno
AIRBRAKE_PROJECT_KEYProject key for airbrake loggingno
ENABLE_ANALYTICS_OPT_IN_DEBUGGINGSet log if analytics been checked in non-productionno
ERROR_PAGE_ROUTEDisplay error pages to support welsh languageno
SHOW_CANCELLATION_JOURNEYDisplay option to show recurring payments cancellation journey to adminnotelesales
SHOW_CANCELLATION_JOURNEY_PUBLICDisplay option to show recurring payments cancellation journey to publicnowebsales

OS Places address lookup

The address lookup service calls the OS Places API directly. The service performs client-side filtering when a premises search is provided.

GOV.UK pay setup

The details of the GOV.UK payment API can be found here: https://docs.payments.service.gov.uk/#gov-uk-pay-technical-documentation

版本与发布记录

@defra-fish/gafl-webapp-service 共发布 1,059 个版本,首次发布于 2020/03/23;过去 12 个月发布了 136 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.77.1latest2026/11/12今天
1.78.0-rc.1rc2026/11/11今天
1.78.0-rc.02026/11/111 天前
1.77.02026/11/093 天前
1.77.0-rc.182026/11/066 天前
1.77.0-rc.172026/11/0210 天前

其他发布通道:beta → 0.0.1-beta.56,multibuy-rc → 1.28.0-multibuy-rc.0,rc → 1.78.0-rc.1。

关于 @defra-fish/gafl-webapp-service 的常见问题

@defra-fish/gafl-webapp-service 是什么?

The websales frontend for the GAFL service

如何安装 @defra-fish/gafl-webapp-service?

在项目目录运行 npm install @defra-fish/gafl-webapp-service,或使用 pnpm add / yarn add / bun add。

@defra-fish/gafl-webapp-service 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/defra-fish__gafl-webapp-service 是否存在。

@defra-fish/gafl-webapp-service 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@defra-fish/gafl-webapp-service 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@defra-fish/gafl-webapp-service 可以商用吗?

@defra-fish/gafl-webapp-service 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@defra-fish/gafl-webapp-service 的下载量有多少?

根据 npm 官方下载统计,@defra-fish/gafl-webapp-service 在 2026/10/12 – 2026/11/10 这 30 天内被下载 3,094 次,日均约 103 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@defra-fish/gafl-webapp-service 还在维护吗?

最新版本 1.77.1 发布于 2026/11/12(今天);至今共发布 1059 个版本,其中过去 12 个月发布了 136 个;首次发布于 2020/03/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。