@betterportal/hello-view 0.0.1
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 +11 -0
- package/bsb-plugin.json +23 -0
- package/bsb-tests.json +14 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/.bp-generated/registry.d.ts +3 -0
- package/lib/plugins/service-betterportal-hello-view/.bp-generated/registry.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/.bp-generated/registry.js +80 -0
- package/lib/plugins/service-betterportal-hello-view/.bp-generated/registry.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/_theme.bootstrap1/index.d.ts +13 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/_theme.bootstrap1/index.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/_theme.bootstrap1/index.js +11 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/_theme.bootstrap1/index.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/_theme.bootstrap1/index.stream.d.ts +12 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/_theme.bootstrap1/index.stream.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/_theme.bootstrap1/index.stream.js +18 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/_theme.bootstrap1/index.stream.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/index.d.ts +34 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/index.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/index.js +50 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/delayed/index.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.clock.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.clock.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.clock.js +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.clock.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.clock.sse.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.clock.sse.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.clock.sse.js +6 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.clock.sse.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.profile.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.profile.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.profile.js +15 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/_nav.profile.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/index.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/index.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/index.js +8 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/index.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-cards.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-cards.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-cards.js +13 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-cards.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-data.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-data.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-data.js +52 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-data.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-elements.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-elements.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-elements.js +8 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-elements.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-forms.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-forms.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-forms.js +8 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-forms.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-interactive.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-interactive.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-interactive.js +11 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-interactive.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-overlays.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-overlays.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-overlays.js +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-overlays.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-patterns.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-patterns.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-patterns.js +25 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.bootstrap1/showcase-patterns.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.embedded/index.d.ts +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.embedded/index.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.embedded/index.js +5 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/_theme.embedded/index.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/index.d.ts +23 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/index.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/index.js +37 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/index.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/sse.d.ts +10 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/sse.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/sse.js +20 -0
- package/lib/plugins/service-betterportal-hello-view/bp-routes/hello/sse.js.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/index.d.ts +57 -0
- package/lib/plugins/service-betterportal-hello-view/index.d.ts.map +1 -0
- package/lib/plugins/service-betterportal-hello-view/index.js +66 -0
- package/lib/plugins/service-betterportal-hello-view/index.js.map +1 -0
- package/lib/schemas/service-betterportal-hello-view.json +109 -0
- package/lib/schemas/service-betterportal-hello-view.plugin.json +122 -0
- package/package.json +65 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as av from "anyvali";
|
|
2
|
+
import type { Infer } from "anyvali";
|
|
3
|
+
import type { SSEHandlerContext } from "@betterportal/framework";
|
|
4
|
+
export declare const tickSchema: av.ObjectSchema<{
|
|
5
|
+
time: av.StringSchema;
|
|
6
|
+
iso: av.StringSchema;
|
|
7
|
+
}>;
|
|
8
|
+
export type Tick = Infer<typeof tickSchema>;
|
|
9
|
+
export declare function handleSSE(_ctx: SSEHandlerContext): AsyncGenerator<Tick>;
|
|
10
|
+
//# sourceMappingURL=sse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-hello-view/bp-routes/hello/sse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAIjE,eAAO,MAAM,UAAU;;;EAGK,CAAC;AAE7B,MAAM,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAW5C,wBAAuB,SAAS,CAAC,IAAI,EAAE,iBAAiB,GAAG,cAAc,CAAC,IAAI,CAAC,CAM9E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as av from "anyvali";
|
|
2
|
+
// -- Tick schema (validated per yielded value) ------------------------
|
|
3
|
+
export const tickSchema = av.object({
|
|
4
|
+
time: av.string().minLength(1),
|
|
5
|
+
iso: av.string().minLength(1)
|
|
6
|
+
}, { unknownKeys: "strip" });
|
|
7
|
+
// -- Helpers ----------------------------------------------------------
|
|
8
|
+
function formatTime(d) {
|
|
9
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
10
|
+
return `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`;
|
|
11
|
+
}
|
|
12
|
+
// -- Handler - async generator. Framework drives the SSE stream ------
|
|
13
|
+
export async function* handleSSE(_ctx) {
|
|
14
|
+
while (true) {
|
|
15
|
+
const now = new Date();
|
|
16
|
+
yield { time: formatTime(now), iso: now.toISOString() };
|
|
17
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=sse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sse.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-hello-view/bp-routes/hello/sse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAI9B,wEAAwE;AAExE,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9B,GAAG,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;CAC9B,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;AAI7B,wEAAwE;AAExE,SAAS,UAAU,CAAC,CAAO;IACzB,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACtD,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;AAC9E,CAAC;AAED,uEAAuE;AAEvE,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,SAAS,CAAC,IAAuB;IACtD,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC;QACxD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type BSBServiceConstructor } from "@bsb/base";
|
|
2
|
+
import * as av from "anyvali";
|
|
3
|
+
import { BPService, type BPServiceDefinition } from "@betterportal/plugin-bsb";
|
|
4
|
+
declare const Config: import("@bsb/base").BSBPluginConfigClass<av.ObjectSchema<{
|
|
5
|
+
host: av.StringSchema;
|
|
6
|
+
port: av.IntSchema;
|
|
7
|
+
betterportal: av.OptionalSchema<av.ObjectSchema<{
|
|
8
|
+
bpConfigPath: av.OptionalSchema<av.StringSchema>;
|
|
9
|
+
configApiToken: av.OptionalSchema<av.StringSchema>;
|
|
10
|
+
configEncryptionKey: av.OptionalSchema<av.StringSchema>;
|
|
11
|
+
controlPlaneUrl: av.OptionalSchema<av.StringSchema>;
|
|
12
|
+
serviceApiKey: av.OptionalSchema<av.StringSchema>;
|
|
13
|
+
bootstrapStatePath: av.StringSchema;
|
|
14
|
+
scopedConfigCachePath: av.StringSchema;
|
|
15
|
+
trustedProxyHeaders: av.BoolSchema;
|
|
16
|
+
cfProxy: av.BoolSchema;
|
|
17
|
+
trustedProxyIps: av.ArraySchema<av.StringSchema>;
|
|
18
|
+
}>>;
|
|
19
|
+
}>>;
|
|
20
|
+
declare const EventSchemas: {
|
|
21
|
+
readonly emitEvents: {};
|
|
22
|
+
readonly onEvents: {};
|
|
23
|
+
readonly emitReturnableEvents: {};
|
|
24
|
+
readonly onReturnableEvents: {};
|
|
25
|
+
readonly emitBroadcast: {};
|
|
26
|
+
readonly onBroadcast: {};
|
|
27
|
+
};
|
|
28
|
+
export declare class Plugin extends BPService<InstanceType<typeof Config>, typeof EventSchemas> {
|
|
29
|
+
static Config: import("@bsb/base").BSBPluginConfigClass<av.ObjectSchema<{
|
|
30
|
+
host: av.StringSchema;
|
|
31
|
+
port: av.IntSchema;
|
|
32
|
+
betterportal: av.OptionalSchema<av.ObjectSchema<{
|
|
33
|
+
bpConfigPath: av.OptionalSchema<av.StringSchema>;
|
|
34
|
+
configApiToken: av.OptionalSchema<av.StringSchema>;
|
|
35
|
+
configEncryptionKey: av.OptionalSchema<av.StringSchema>;
|
|
36
|
+
controlPlaneUrl: av.OptionalSchema<av.StringSchema>;
|
|
37
|
+
serviceApiKey: av.OptionalSchema<av.StringSchema>;
|
|
38
|
+
bootstrapStatePath: av.StringSchema;
|
|
39
|
+
scopedConfigCachePath: av.StringSchema;
|
|
40
|
+
trustedProxyHeaders: av.BoolSchema;
|
|
41
|
+
cfProxy: av.BoolSchema;
|
|
42
|
+
trustedProxyIps: av.ArraySchema<av.StringSchema>;
|
|
43
|
+
}>>;
|
|
44
|
+
}>>;
|
|
45
|
+
static EventSchemas: {
|
|
46
|
+
readonly emitEvents: {};
|
|
47
|
+
readonly onEvents: {};
|
|
48
|
+
readonly emitReturnableEvents: {};
|
|
49
|
+
readonly onReturnableEvents: {};
|
|
50
|
+
readonly emitBroadcast: {};
|
|
51
|
+
readonly onBroadcast: {};
|
|
52
|
+
};
|
|
53
|
+
constructor(cfg: BSBServiceConstructor<InstanceType<typeof Config>, typeof EventSchemas>);
|
|
54
|
+
protected definition(): BPServiceDefinition;
|
|
55
|
+
}
|
|
56
|
+
export { Config, EventSchemas };
|
|
57
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/service-betterportal-hello-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAG3B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAA4B,SAAS,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAUzG,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;GAQX,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;CAOhB,CAAC;AAEH,qBAAa,MAAO,SAAQ,SAAS,CAAC,YAAY,CAAC,OAAO,MAAM,CAAC,EAAE,OAAO,YAAY,CAAC;IACrF,MAAM,CAAC,MAAM;;;;;;;;;;;;;;;QAAU;IACvB,MAAM,CAAC,YAAY;;;;;;;MAAgB;gBAEvB,GAAG,EAAE,qBAAqB,CAAC,YAAY,CAAC,OAAO,MAAM,CAAC,EAAE,OAAO,YAAY,CAAC;IAIxF,SAAS,CAAC,UAAU,IAAI,mBAAmB;CAkC5C;AAED,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { createConfigSchema, createEventSchemas } from "@bsb/base";
|
|
2
|
+
import * as av from "anyvali";
|
|
3
|
+
import { BetterPortalConfigSchema, BPService } from "@betterportal/plugin-bsb";
|
|
4
|
+
import { registry } from "./.bp-generated/registry.js";
|
|
5
|
+
const PluginConfigSchema = av.object({
|
|
6
|
+
host: av.string().minLength(1).default("0.0.0.0"),
|
|
7
|
+
port: av.int().min(1).default(3200),
|
|
8
|
+
betterportal: BetterPortalConfigSchema
|
|
9
|
+
}, { unknownKeys: "strip" });
|
|
10
|
+
const Config = createConfigSchema({
|
|
11
|
+
name: "service-betterportal-hello-view",
|
|
12
|
+
description: "Hello view example service for BetterPortal v10",
|
|
13
|
+
tags: ["betterportal", "service", "example", "htmx"],
|
|
14
|
+
documentation: ["./README.md"]
|
|
15
|
+
}, PluginConfigSchema);
|
|
16
|
+
const EventSchemas = createEventSchemas({
|
|
17
|
+
emitEvents: {},
|
|
18
|
+
onEvents: {},
|
|
19
|
+
emitReturnableEvents: {},
|
|
20
|
+
onReturnableEvents: {},
|
|
21
|
+
emitBroadcast: {},
|
|
22
|
+
onBroadcast: {}
|
|
23
|
+
});
|
|
24
|
+
export class Plugin extends BPService {
|
|
25
|
+
static Config = Config;
|
|
26
|
+
static EventSchemas = EventSchemas;
|
|
27
|
+
constructor(cfg) {
|
|
28
|
+
super({ ...cfg, eventSchemas: EventSchemas });
|
|
29
|
+
}
|
|
30
|
+
definition() {
|
|
31
|
+
return {
|
|
32
|
+
manifest: {
|
|
33
|
+
pluginId: "service.betterportal.hello-view",
|
|
34
|
+
title: "BetterPortal Hello View Example",
|
|
35
|
+
description: "Example business service showing API-first view negotiation.",
|
|
36
|
+
configSchemas: [
|
|
37
|
+
{
|
|
38
|
+
id: "hello.tenant",
|
|
39
|
+
title: "Hello Tenant Config",
|
|
40
|
+
description: "Tenant-scoped config for the hello example service.",
|
|
41
|
+
scope: "tenant",
|
|
42
|
+
jsonSchema: { greetingPrefix: "string", supportEmail: "string", apiKey: "string" },
|
|
43
|
+
fields: [
|
|
44
|
+
{ key: "greetingPrefix", title: "Greeting Prefix", description: "Prefix shown before the hello response.", scope: "tenant", visibility: "protected", ownership: "plugin", sourceOfTruth: "plugin", required: false },
|
|
45
|
+
{ key: "supportEmail", title: "Support Email", description: "Support contact shown in admin tooling.", scope: "tenant", visibility: "protected", ownership: "mixed", sourceOfTruth: "bp", required: false },
|
|
46
|
+
{ key: "apiKey", title: "API Key", description: "Example secret field for managed service credentials.", scope: "tenant", visibility: "secret", ownership: "plugin", sourceOfTruth: "plugin", required: false }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "hello.app",
|
|
51
|
+
title: "Hello App Override",
|
|
52
|
+
description: "App-specific overrides for the hello example service.",
|
|
53
|
+
scope: "app",
|
|
54
|
+
jsonSchema: { displayName: "string" },
|
|
55
|
+
fields: [
|
|
56
|
+
{ key: "displayName", title: "Display Name", description: "Overrides the display name for the app context.", scope: "app", visibility: "protected", ownership: "mixed", sourceOfTruth: "bp", required: false }
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
registry
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export { Config, EventSchemas };
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/service-betterportal-hello-view/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginName": "service-betterportal-hello-view",
|
|
3
|
+
"events": {},
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"configSchema": {
|
|
6
|
+
"anyvaliVersion": "1.0",
|
|
7
|
+
"schemaVersion": "1.1",
|
|
8
|
+
"root": {
|
|
9
|
+
"kind": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"host": {
|
|
12
|
+
"kind": "string",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"default": "0.0.0.0"
|
|
15
|
+
},
|
|
16
|
+
"port": {
|
|
17
|
+
"kind": "int",
|
|
18
|
+
"min": 1,
|
|
19
|
+
"default": 3200
|
|
20
|
+
},
|
|
21
|
+
"betterportal": {
|
|
22
|
+
"kind": "optional",
|
|
23
|
+
"inner": {
|
|
24
|
+
"kind": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"bpConfigPath": {
|
|
27
|
+
"kind": "optional",
|
|
28
|
+
"inner": {
|
|
29
|
+
"kind": "string",
|
|
30
|
+
"minLength": 1
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"configApiToken": {
|
|
34
|
+
"kind": "optional",
|
|
35
|
+
"inner": {
|
|
36
|
+
"kind": "string",
|
|
37
|
+
"minLength": 1
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"configEncryptionKey": {
|
|
41
|
+
"kind": "optional",
|
|
42
|
+
"inner": {
|
|
43
|
+
"kind": "string",
|
|
44
|
+
"minLength": 16
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"controlPlaneUrl": {
|
|
48
|
+
"kind": "optional",
|
|
49
|
+
"inner": {
|
|
50
|
+
"kind": "string",
|
|
51
|
+
"minLength": 1
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"serviceApiKey": {
|
|
55
|
+
"kind": "optional",
|
|
56
|
+
"inner": {
|
|
57
|
+
"kind": "string",
|
|
58
|
+
"minLength": 1
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"bootstrapStatePath": {
|
|
62
|
+
"kind": "string",
|
|
63
|
+
"minLength": 1,
|
|
64
|
+
"default": "./.bp-bootstrap/state.enc"
|
|
65
|
+
},
|
|
66
|
+
"scopedConfigCachePath": {
|
|
67
|
+
"kind": "string",
|
|
68
|
+
"minLength": 1,
|
|
69
|
+
"default": "./.bp-sync-cache/scoped.json"
|
|
70
|
+
},
|
|
71
|
+
"trustedProxyHeaders": {
|
|
72
|
+
"kind": "bool",
|
|
73
|
+
"default": false
|
|
74
|
+
},
|
|
75
|
+
"cfProxy": {
|
|
76
|
+
"kind": "bool",
|
|
77
|
+
"default": false
|
|
78
|
+
},
|
|
79
|
+
"trustedProxyIps": {
|
|
80
|
+
"kind": "array",
|
|
81
|
+
"items": {
|
|
82
|
+
"kind": "string",
|
|
83
|
+
"minLength": 1
|
|
84
|
+
},
|
|
85
|
+
"default": []
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": [
|
|
89
|
+
"bootstrapStatePath",
|
|
90
|
+
"scopedConfigCachePath",
|
|
91
|
+
"trustedProxyHeaders",
|
|
92
|
+
"cfProxy",
|
|
93
|
+
"trustedProxyIps"
|
|
94
|
+
],
|
|
95
|
+
"unknownKeys": "strip"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"required": [
|
|
100
|
+
"host",
|
|
101
|
+
"port"
|
|
102
|
+
],
|
|
103
|
+
"unknownKeys": "strip"
|
|
104
|
+
},
|
|
105
|
+
"definitions": {},
|
|
106
|
+
"extensions": {}
|
|
107
|
+
},
|
|
108
|
+
"pluginType": "service"
|
|
109
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "service-betterportal-hello-view",
|
|
3
|
+
"name": "service-betterportal-hello-view",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"description": "Hello view example service for BetterPortal v10",
|
|
6
|
+
"category": "service",
|
|
7
|
+
"tags": [
|
|
8
|
+
"betterportal",
|
|
9
|
+
"service",
|
|
10
|
+
"example",
|
|
11
|
+
"htmx"
|
|
12
|
+
],
|
|
13
|
+
"documentation": [
|
|
14
|
+
"./README.md"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": [],
|
|
17
|
+
"author": "BetterCorp",
|
|
18
|
+
"license": "(AGPL-3.0-only OR Commercial)",
|
|
19
|
+
"configSchema": {
|
|
20
|
+
"anyvaliVersion": "1.0",
|
|
21
|
+
"schemaVersion": "1.1",
|
|
22
|
+
"root": {
|
|
23
|
+
"kind": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"host": {
|
|
26
|
+
"kind": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"default": "0.0.0.0"
|
|
29
|
+
},
|
|
30
|
+
"port": {
|
|
31
|
+
"kind": "int",
|
|
32
|
+
"min": 1,
|
|
33
|
+
"default": 3200
|
|
34
|
+
},
|
|
35
|
+
"betterportal": {
|
|
36
|
+
"kind": "optional",
|
|
37
|
+
"inner": {
|
|
38
|
+
"kind": "object",
|
|
39
|
+
"properties": {
|
|
40
|
+
"bpConfigPath": {
|
|
41
|
+
"kind": "optional",
|
|
42
|
+
"inner": {
|
|
43
|
+
"kind": "string",
|
|
44
|
+
"minLength": 1
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"configApiToken": {
|
|
48
|
+
"kind": "optional",
|
|
49
|
+
"inner": {
|
|
50
|
+
"kind": "string",
|
|
51
|
+
"minLength": 1
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"configEncryptionKey": {
|
|
55
|
+
"kind": "optional",
|
|
56
|
+
"inner": {
|
|
57
|
+
"kind": "string",
|
|
58
|
+
"minLength": 16
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"controlPlaneUrl": {
|
|
62
|
+
"kind": "optional",
|
|
63
|
+
"inner": {
|
|
64
|
+
"kind": "string",
|
|
65
|
+
"minLength": 1
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"serviceApiKey": {
|
|
69
|
+
"kind": "optional",
|
|
70
|
+
"inner": {
|
|
71
|
+
"kind": "string",
|
|
72
|
+
"minLength": 1
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"bootstrapStatePath": {
|
|
76
|
+
"kind": "string",
|
|
77
|
+
"minLength": 1,
|
|
78
|
+
"default": "./.bp-bootstrap/state.enc"
|
|
79
|
+
},
|
|
80
|
+
"scopedConfigCachePath": {
|
|
81
|
+
"kind": "string",
|
|
82
|
+
"minLength": 1,
|
|
83
|
+
"default": "./.bp-sync-cache/scoped.json"
|
|
84
|
+
},
|
|
85
|
+
"trustedProxyHeaders": {
|
|
86
|
+
"kind": "bool",
|
|
87
|
+
"default": false
|
|
88
|
+
},
|
|
89
|
+
"cfProxy": {
|
|
90
|
+
"kind": "bool",
|
|
91
|
+
"default": false
|
|
92
|
+
},
|
|
93
|
+
"trustedProxyIps": {
|
|
94
|
+
"kind": "array",
|
|
95
|
+
"items": {
|
|
96
|
+
"kind": "string",
|
|
97
|
+
"minLength": 1
|
|
98
|
+
},
|
|
99
|
+
"default": []
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": [
|
|
103
|
+
"bootstrapStatePath",
|
|
104
|
+
"scopedConfigCachePath",
|
|
105
|
+
"trustedProxyHeaders",
|
|
106
|
+
"cfProxy",
|
|
107
|
+
"trustedProxyIps"
|
|
108
|
+
],
|
|
109
|
+
"unknownKeys": "strip"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"required": [
|
|
114
|
+
"host",
|
|
115
|
+
"port"
|
|
116
|
+
],
|
|
117
|
+
"unknownKeys": "strip"
|
|
118
|
+
},
|
|
119
|
+
"definitions": {},
|
|
120
|
+
"extensions": {}
|
|
121
|
+
}
|
|
122
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@betterportal/hello-view",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "BetterPortal v10 example service plugin for Node.js",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "src/index.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"bp-codegen": "bp-codegen",
|
|
9
|
+
"build": "bsb-plugin-cli build",
|
|
10
|
+
"clean": "bsb-plugin-cli clean",
|
|
11
|
+
"start": "bsb-plugin-cli start",
|
|
12
|
+
"dev": "bsb-plugin-cli dev",
|
|
13
|
+
"test": "node -e \"process.exit(0)\"",
|
|
14
|
+
"prepublishOnly": "npm run build"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"betterportal",
|
|
18
|
+
"example",
|
|
19
|
+
"service",
|
|
20
|
+
"demo"
|
|
21
|
+
],
|
|
22
|
+
"author": "BetterCorp",
|
|
23
|
+
"license": "(AGPL-3.0-only OR Commercial)",
|
|
24
|
+
"type": "module",
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@bsb/base": "^9.5.0",
|
|
27
|
+
"@types/node": "^24.12.2",
|
|
28
|
+
"tsx": "^4.21.0",
|
|
29
|
+
"typescript": "^5.9.3"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@betterportal/framework": "0.0.1",
|
|
33
|
+
"@betterportal/plugin-bsb": "0.0.1",
|
|
34
|
+
"anyvali": "^1.0.6",
|
|
35
|
+
"jsx-htmx": "4.0.0-beta2"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"lib/**/*",
|
|
39
|
+
"README.md",
|
|
40
|
+
"bsb-plugin.json",
|
|
41
|
+
"bsb-tests.json"
|
|
42
|
+
],
|
|
43
|
+
"bsb": {
|
|
44
|
+
"hooks": {
|
|
45
|
+
"afterSchemas": "bp-codegen"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"betterportal": {
|
|
49
|
+
"routes": [
|
|
50
|
+
"src/plugins/service-betterportal-hello-view/bp-routes/"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://github.com/BetterCorp/BetterPortal#readme",
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/BetterCorp/BetterPortal.git",
|
|
57
|
+
"directory": "services/nodejs/examples/hello-view"
|
|
58
|
+
},
|
|
59
|
+
"bugs": {
|
|
60
|
+
"url": "https://github.com/BetterCorp/BetterPortal/issues"
|
|
61
|
+
},
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public"
|
|
64
|
+
}
|
|
65
|
+
}
|