@opengis/surveyor 0.0.1 → 0.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/CHANGELOG.md +42 -0
- package/README.md +175 -33
- package/dist/chunks/{AppIcon-C-4QykTP.js → AppIcon-CIR6y5uE.js} +1 -1
- package/dist/chunks/{AppealDetailField-DNRGpnyD.js → AppealDetailField-CI-1qhs3.js} +2 -2
- package/dist/chunks/{AppealStatusBadge-CefimzY3.js → AppealStatusBadge-CSXnfarR.js} +2 -2
- package/dist/chunks/{AppealStatusBadge-Cu-UzdzA.js → AppealStatusBadge-DYBe9hqP.js} +1 -1
- package/dist/chunks/{ApplicationHistorySection-PwToBfej.js → ApplicationHistorySection-C0wwhwA4.js} +4 -4
- package/dist/chunks/{BaseModal-DrTTkLmR.js → BaseModal-C7PVYz0m.js} +1 -1
- package/dist/chunks/{FormFilePicker-CKVdZJU9.js → FormFilePicker-C3XQw50i.js} +2 -2
- package/dist/chunks/{MapLayerMenu-AUeTqgEp.js → MapLayerMenu-DjYCxEc3.js} +1 -1
- package/dist/chunks/{RegistryForm-pvIcFR-V.js → RegistryForm-CEUqFmsF.js} +2 -2
- package/dist/chunks/{RegistryFormModal-BjGu7Upv.js → RegistryFormModal-DfY4z_7r.js} +3 -3
- package/dist/chunks/{RegistryToolbar-CiUgsjpU.js → RegistryToolbar-BV4mYVAc.js} +8 -8
- package/dist/chunks/{UserAccessBadge-DyZDv7Oo.js → UserAccessBadge-D8JfgGfN.js} +1 -1
- package/dist/chunks/{UserTypeBadge-LvnMuKGo.js → UserTypeBadge-YIwwoCho.js} +1 -1
- package/dist/chunks/{VerifiedBadge-B6droMOf.js → VerifiedBadge-Bba8WnuB.js} +2 -2
- package/dist/chunks/{applications-CsCsndMV.js → applications-BB9JRcgl.js} +1 -1
- package/dist/chunks/{buildSchema-nkA4Y0YG.js → buildSchema-CccjX9TJ.js} +1 -1
- package/dist/chunks/{card-BZn5CDw9.js → card-B-ftozcq.js} +12 -12
- package/dist/chunks/{card-9LaB42Ol.js → card-BctFHFZe.js} +7 -7
- package/dist/chunks/{card--DHsMNBd.js → card-CKD1N0QD.js} +6 -6
- package/dist/chunks/{card-CNqXSyqX.js → card-CiNZxAd5.js} +8 -8
- package/dist/chunks/{card-DCyBFoDZ.js → card-DUtDfwMk.js} +6 -6
- package/dist/chunks/card-fL26_Gvc.js +1189 -0
- package/dist/chunks/{certificates-DueBDDvc.js → certificates-BSd1i0un.js} +7 -7
- package/dist/chunks/{create-l28e-bWl.js → create-DxMC_IL1.js} +10 -10
- package/dist/chunks/{filterQuery-B9XNx1f1.js → filterQuery-CvfZrkTC.js} +1 -1
- package/dist/chunks/{form-CdGS1nVO.js → form-Bh6i5n1U.js} +1 -1
- package/dist/chunks/{form-QTkkzwbC.js → form-DDjELqZ9.js} +1 -1
- package/dist/chunks/{map-BW3iOhQg.js → map-Z57iMvFb.js} +11 -11
- package/dist/chunks/{map-layers-qxWjos2V.js → map-layers-DnmkOEld.js} +7 -7
- package/dist/chunks/{organizations-CZOINYMq.js → organizations-BO1_JETm.js} +8 -8
- package/dist/chunks/{organizations-BtuMZ5s_.js → organizations-BbYipLwk.js} +1 -1
- package/dist/chunks/{profile-DxZHxGum.js → profile-ByahbF4B.js} +1 -1
- package/dist/chunks/{profile-CuxlkEev.js → profile-Dwwn_4Pr.js} +3 -3
- package/dist/chunks/{requests-DQJIhz00.js → requests-BCin936Z.js} +6 -6
- package/dist/chunks/{requests-Bt8fEdRc.js → requests-CFv5wwAN.js} +7 -7
- package/dist/chunks/{resendSurveyorRegistration-DopjOHaM.js → resendSurveyorRegistration-BHTTVIw1.js} +1 -1
- package/dist/chunks/{resources-Cl_EvaIy.js → resources-2e8RFqWR.js} +1 -1
- package/dist/chunks/{surveyorAccount-BceNQypZ.js → surveyorAccount-C7UiiIYg.js} +1 -1
- package/dist/chunks/{users-DlaogjC_.js → users-DtTYsgMb.js} +8 -8
- package/dist/index.css +1 -1
- package/dist/index.js +165 -88
- package/package.json +86 -77
- package/plugin.d.ts +15 -0
- package/plugin.js +8 -10
- package/server/app.ts +2 -1
- package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +41 -41
- package/server/modules/surveyor/utils/templates/ds.surveyor_admin_password.pt.hbs +79 -79
- package/server/resources/surveyor-admin/application_comments.ts +3 -3
- package/server/suggests/index.ts +17 -0
- package/README.npm.md +0 -51
- package/dist/chunks/card-CgGOgGyd.js +0 -973
- package/server/embed.ts +0 -49
package/server/embed.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { FastifyInstance } from 'fastify'
|
|
2
|
-
import { createFCore, type AppContext } from '@opengis/fcore'
|
|
3
|
-
import fcoreFastify from '@opengis/fcore/fastify'
|
|
4
|
-
|
|
5
|
-
import dictionaries from './dictionaries/index.js'
|
|
6
|
-
import resources from './resources/index.js'
|
|
7
|
-
import { createSurveyorRoutes } from './modules/surveyor/route.js'
|
|
8
|
-
import { afterSurveyorUser } from './modules/surveyor/utils/permissions.js'
|
|
9
|
-
|
|
10
|
-
export interface RegisterSurveyorBackendOptions {
|
|
11
|
-
fcore?: Record<string, unknown>
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
declare module 'fastify' {
|
|
15
|
-
interface FastifyInstance {
|
|
16
|
-
surveyorCtx?: AppContext
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Registers Surveyor fcore resources and business routes on an existing Fastify app.
|
|
22
|
-
* Does not mount admin/cabinet Vite static assets.
|
|
23
|
-
*/
|
|
24
|
-
export async function registerSurveyorBackend(
|
|
25
|
-
app: FastifyInstance,
|
|
26
|
-
opts: RegisterSurveyorBackendOptions = {},
|
|
27
|
-
): Promise<AppContext> {
|
|
28
|
-
if (app.surveyorCtx) {
|
|
29
|
-
return app.surveyorCtx
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const ctx = await createFCore({
|
|
33
|
-
resources,
|
|
34
|
-
dictionaries,
|
|
35
|
-
hooks: { afterUser: afterSurveyorUser },
|
|
36
|
-
...opts.fcore,
|
|
37
|
-
}) as AppContext
|
|
38
|
-
|
|
39
|
-
await fcoreFastify(ctx)(app as any, {})
|
|
40
|
-
await createSurveyorRoutes(ctx)(app as any, {})
|
|
41
|
-
|
|
42
|
-
app.surveyorCtx = ctx
|
|
43
|
-
|
|
44
|
-
app.addHook('onClose', async () => {
|
|
45
|
-
await ctx.close()
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
return ctx
|
|
49
|
-
}
|