@zlooks.cn/global-config-server 1.0.2 → 1.0.4
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/dist/command/index.js +2 -6
- package/dist/command/index.js.map +1 -1
- package/dist/mcp/global-config-provider.d.ts +8 -8
- package/dist/mcp/global-config-provider.d.ts.map +1 -1
- package/dist/mcp/global-config-provider.js +44 -39
- package/dist/mcp/global-config-provider.js.map +1 -1
- package/dist/messages/site-presentation/read.msg.d.ts +51 -0
- package/dist/messages/site-presentation/read.msg.d.ts.map +1 -0
- package/dist/messages/site-presentation/read.msg.js +6 -0
- package/dist/messages/site-presentation/read.msg.js.map +1 -0
- package/dist/messages/site-presentation/update.msg.d.ts +93 -0
- package/dist/messages/site-presentation/update.msg.d.ts.map +1 -0
- package/dist/messages/site-presentation/update.msg.js +6 -0
- package/dist/messages/site-presentation/update.msg.js.map +1 -0
- package/dist/messages/site-profile/read.msg.d.ts +37 -0
- package/dist/messages/site-profile/read.msg.d.ts.map +1 -0
- package/dist/messages/site-profile/read.msg.js +6 -0
- package/dist/messages/site-profile/read.msg.js.map +1 -0
- package/dist/messages/site-profile/update.msg.d.ts +65 -0
- package/dist/messages/site-profile/update.msg.d.ts.map +1 -0
- package/dist/messages/site-profile/update.msg.js +6 -0
- package/dist/messages/site-profile/update.msg.js.map +1 -0
- package/dist/models/read-site-presentation.model.d.ts +43 -0
- package/dist/models/read-site-presentation.model.d.ts.map +1 -0
- package/dist/models/read-site-presentation.model.js +12 -0
- package/dist/models/read-site-presentation.model.js.map +1 -0
- package/dist/models/read-site-profile.model.d.ts +33 -0
- package/dist/models/read-site-profile.model.d.ts.map +1 -0
- package/dist/models/read-site-profile.model.js +12 -0
- package/dist/models/read-site-profile.model.js.map +1 -0
- package/dist/models/update-site-presentation.model.d.ts +81 -0
- package/dist/models/update-site-presentation.model.d.ts.map +1 -0
- package/dist/models/update-site-presentation.model.js +18 -0
- package/dist/models/update-site-presentation.model.js.map +1 -0
- package/dist/models/update-site-profile.model.d.ts +61 -0
- package/dist/models/update-site-profile.model.d.ts.map +1 -0
- package/dist/models/update-site-profile.model.js +18 -0
- package/dist/models/update-site-profile.model.js.map +1 -0
- package/dist/services/application.service.d.ts +6 -2
- package/dist/services/application.service.d.ts.map +1 -1
- package/dist/services/application.service.js +13 -5
- package/dist/services/application.service.js.map +1 -1
- package/dist/services/config.service.js +1 -1
- package/dist/services/config.service.js.map +1 -1
- package/dist/services/global-config-runtime.service.d.ts +8 -148
- package/dist/services/global-config-runtime.service.d.ts.map +1 -1
- package/dist/services/global-config-runtime.service.js +3 -26
- package/dist/services/global-config-runtime.service.js.map +1 -1
- package/dist/services/global-config.boot.js +3 -0
- package/dist/services/global-config.boot.js.map +1 -1
- package/dist/services/mcp-provider.service.js +3 -6
- package/dist/services/mcp-provider.service.js.map +1 -1
- package/package.json +14 -12
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { loadService } from '@hile/core';
|
|
2
|
+
import { defineModel } from '@hile/model';
|
|
3
|
+
import globalConfigRuntimeService from '../services/global-config-runtime.service.js';
|
|
4
|
+
export default defineModel(async (_query, invocation) => {
|
|
5
|
+
invocation.signal.throwIfAborted();
|
|
6
|
+
const { presentationStore } = await loadService(globalConfigRuntimeService);
|
|
7
|
+
invocation.signal.throwIfAborted();
|
|
8
|
+
const snapshot = await presentationStore.read();
|
|
9
|
+
invocation.signal.throwIfAborted();
|
|
10
|
+
return snapshot;
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=read-site-presentation.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-site-presentation.model.js","sourceRoot":"","sources":["../../src/models/read-site-presentation.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,0BAA0B,MAAM,8CAA8C,CAAC;AAEtF,eAAe,WAAW,CACxB,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;IAC3B,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAC5E,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAChD,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,OAAO,QAAQ,CAAC;AAClB,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare const _default: import("@hile/model").ModelDefinition<Record<string, never>, Readonly<{
|
|
2
|
+
schemaVersion: 1;
|
|
3
|
+
revision: number;
|
|
4
|
+
value: {
|
|
5
|
+
profile: {
|
|
6
|
+
displayName: string;
|
|
7
|
+
avatarUrl?: string | undefined;
|
|
8
|
+
headline: string;
|
|
9
|
+
biography: string;
|
|
10
|
+
};
|
|
11
|
+
topics: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
summary: string;
|
|
15
|
+
href?: string | undefined;
|
|
16
|
+
}[];
|
|
17
|
+
featuredLinks: ({
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
href: string;
|
|
21
|
+
external: false;
|
|
22
|
+
} | {
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
href: string;
|
|
26
|
+
external: true;
|
|
27
|
+
})[];
|
|
28
|
+
};
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
updatedBy: string;
|
|
31
|
+
}>>;
|
|
32
|
+
export default _default;
|
|
33
|
+
//# sourceMappingURL=read-site-profile.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-site-profile.model.d.ts","sourceRoot":"","sources":["../../src/models/read-site-profile.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { loadService } from '@hile/core';
|
|
2
|
+
import { defineModel } from '@hile/model';
|
|
3
|
+
import globalConfigRuntimeService from '../services/global-config-runtime.service.js';
|
|
4
|
+
export default defineModel(async (_query, invocation) => {
|
|
5
|
+
invocation.signal.throwIfAborted();
|
|
6
|
+
const { profileStore } = await loadService(globalConfigRuntimeService);
|
|
7
|
+
invocation.signal.throwIfAborted();
|
|
8
|
+
const snapshot = await profileStore.read();
|
|
9
|
+
invocation.signal.throwIfAborted();
|
|
10
|
+
return snapshot;
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=read-site-profile.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-site-profile.model.js","sourceRoot":"","sources":["../../src/models/read-site-profile.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,0BAA0B,MAAM,8CAA8C,CAAC;AAEtF,eAAe,WAAW,CACxB,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;IAC3B,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,WAAW,CAAC,0BAA0B,CAAC,CAAC;IACvE,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,CAAC;IAC3C,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,OAAO,QAAQ,CAAC;AAClB,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
declare const _default: import("@hile/model").ModelDefinition<Readonly<{
|
|
2
|
+
expectedRevision: number;
|
|
3
|
+
value: {
|
|
4
|
+
identity: {
|
|
5
|
+
name: string;
|
|
6
|
+
homeHref: string;
|
|
7
|
+
backgroundVideoUrl?: string | null | undefined;
|
|
8
|
+
logoUrl?: string | undefined;
|
|
9
|
+
faviconUrl?: string | undefined;
|
|
10
|
+
description?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
linkGroups: {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
links: ({
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
href: string;
|
|
19
|
+
external: false;
|
|
20
|
+
} | {
|
|
21
|
+
id: string;
|
|
22
|
+
label: string;
|
|
23
|
+
href: string;
|
|
24
|
+
external: true;
|
|
25
|
+
})[];
|
|
26
|
+
}[];
|
|
27
|
+
legal: {
|
|
28
|
+
copyright?: string | undefined;
|
|
29
|
+
registrations: {
|
|
30
|
+
id: string;
|
|
31
|
+
kind: "icp" | "other" | "public-security";
|
|
32
|
+
number: string;
|
|
33
|
+
verificationUrl?: string | undefined;
|
|
34
|
+
iconUrl?: string | undefined;
|
|
35
|
+
}[];
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
actor: string;
|
|
39
|
+
}>, Readonly<{
|
|
40
|
+
schemaVersion: 2;
|
|
41
|
+
revision: number;
|
|
42
|
+
value: {
|
|
43
|
+
identity: {
|
|
44
|
+
name: string;
|
|
45
|
+
homeHref: string;
|
|
46
|
+
backgroundVideoUrl?: string | null | undefined;
|
|
47
|
+
logoUrl?: string | undefined;
|
|
48
|
+
faviconUrl?: string | undefined;
|
|
49
|
+
description?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
linkGroups: {
|
|
52
|
+
id: string;
|
|
53
|
+
label: string;
|
|
54
|
+
links: ({
|
|
55
|
+
id: string;
|
|
56
|
+
label: string;
|
|
57
|
+
href: string;
|
|
58
|
+
external: false;
|
|
59
|
+
} | {
|
|
60
|
+
id: string;
|
|
61
|
+
label: string;
|
|
62
|
+
href: string;
|
|
63
|
+
external: true;
|
|
64
|
+
})[];
|
|
65
|
+
}[];
|
|
66
|
+
legal: {
|
|
67
|
+
copyright?: string | undefined;
|
|
68
|
+
registrations: {
|
|
69
|
+
id: string;
|
|
70
|
+
kind: "icp" | "other" | "public-security";
|
|
71
|
+
number: string;
|
|
72
|
+
verificationUrl?: string | undefined;
|
|
73
|
+
iconUrl?: string | undefined;
|
|
74
|
+
}[];
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
updatedAt: string;
|
|
78
|
+
updatedBy: string;
|
|
79
|
+
}>>;
|
|
80
|
+
export default _default;
|
|
81
|
+
//# sourceMappingURL=update-site-presentation.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-site-presentation.model.d.ts","sourceRoot":"","sources":["../../src/models/update-site-presentation.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { loadService } from '@hile/core';
|
|
2
|
+
import { defineModel } from '@hile/model';
|
|
3
|
+
import { globalConfigPresentationUpdateCommandSchema, } from '@zlooks.cn/global-config-shared';
|
|
4
|
+
import globalConfigRuntimeService from '../services/global-config-runtime.service.js';
|
|
5
|
+
export default defineModel(async (input, invocation) => {
|
|
6
|
+
invocation.signal.throwIfAborted();
|
|
7
|
+
const command = globalConfigPresentationUpdateCommandSchema.parse(input);
|
|
8
|
+
const { presentationStore, presentationPublisher } = await loadService(globalConfigRuntimeService);
|
|
9
|
+
invocation.signal.throwIfAborted();
|
|
10
|
+
const snapshot = await presentationStore.update({
|
|
11
|
+
expectedRevision: command.expectedRevision,
|
|
12
|
+
value: command.value,
|
|
13
|
+
updatedBy: command.actor,
|
|
14
|
+
});
|
|
15
|
+
await presentationPublisher.refresh();
|
|
16
|
+
return snapshot;
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=update-site-presentation.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-site-presentation.model.js","sourceRoot":"","sources":["../../src/models/update-site-presentation.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,2CAA2C,GAG5C,MAAM,iCAAiC,CAAC;AACzC,OAAO,0BAA0B,MAAM,8CAA8C,CAAC;AAEtF,eAAe,WAAW,CACxB,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;IAC1B,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,OAAO,GAAG,2CAA2C,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACzE,MAAM,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,GAAG,MAAM,WAAW,CACpE,0BAA0B,CAC3B,CAAC;IACF,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,MAAM,CAAC;QAC9C,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;QAC1C,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,KAAK;KACzB,CAAC,CAAC;IACH,MAAM,qBAAqB,CAAC,OAAO,EAAE,CAAC;IACtC,OAAO,QAAQ,CAAC;AAClB,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
declare const _default: import("@hile/model").ModelDefinition<Readonly<{
|
|
2
|
+
expectedRevision: number;
|
|
3
|
+
value: {
|
|
4
|
+
profile: {
|
|
5
|
+
displayName: string;
|
|
6
|
+
avatarUrl?: string | undefined;
|
|
7
|
+
headline: string;
|
|
8
|
+
biography: string;
|
|
9
|
+
};
|
|
10
|
+
topics: {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
summary: string;
|
|
14
|
+
href?: string | undefined;
|
|
15
|
+
}[];
|
|
16
|
+
featuredLinks: ({
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
href: string;
|
|
20
|
+
external: false;
|
|
21
|
+
} | {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
href: string;
|
|
25
|
+
external: true;
|
|
26
|
+
})[];
|
|
27
|
+
};
|
|
28
|
+
actor: string;
|
|
29
|
+
}>, Readonly<{
|
|
30
|
+
schemaVersion: 1;
|
|
31
|
+
revision: number;
|
|
32
|
+
value: {
|
|
33
|
+
profile: {
|
|
34
|
+
displayName: string;
|
|
35
|
+
avatarUrl?: string | undefined;
|
|
36
|
+
headline: string;
|
|
37
|
+
biography: string;
|
|
38
|
+
};
|
|
39
|
+
topics: {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
summary: string;
|
|
43
|
+
href?: string | undefined;
|
|
44
|
+
}[];
|
|
45
|
+
featuredLinks: ({
|
|
46
|
+
id: string;
|
|
47
|
+
label: string;
|
|
48
|
+
href: string;
|
|
49
|
+
external: false;
|
|
50
|
+
} | {
|
|
51
|
+
id: string;
|
|
52
|
+
label: string;
|
|
53
|
+
href: string;
|
|
54
|
+
external: true;
|
|
55
|
+
})[];
|
|
56
|
+
};
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
updatedBy: string;
|
|
59
|
+
}>>;
|
|
60
|
+
export default _default;
|
|
61
|
+
//# sourceMappingURL=update-site-profile.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-site-profile.model.d.ts","sourceRoot":"","sources":["../../src/models/update-site-profile.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { loadService } from '@hile/core';
|
|
2
|
+
import { defineModel } from '@hile/model';
|
|
3
|
+
import { globalConfigProfileUpdateCommandSchema, } from '@zlooks.cn/global-config-shared';
|
|
4
|
+
import globalConfigRuntimeService from '../services/global-config-runtime.service.js';
|
|
5
|
+
export default defineModel(async (input, invocation) => {
|
|
6
|
+
invocation.signal.throwIfAborted();
|
|
7
|
+
const command = globalConfigProfileUpdateCommandSchema.parse(input);
|
|
8
|
+
const { profileStore, profilePublisher } = await loadService(globalConfigRuntimeService);
|
|
9
|
+
invocation.signal.throwIfAborted();
|
|
10
|
+
const snapshot = await profileStore.update({
|
|
11
|
+
expectedRevision: command.expectedRevision,
|
|
12
|
+
value: command.value,
|
|
13
|
+
updatedBy: command.actor,
|
|
14
|
+
});
|
|
15
|
+
await profilePublisher.refresh();
|
|
16
|
+
return snapshot;
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=update-site-profile.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-site-profile.model.js","sourceRoot":"","sources":["../../src/models/update-site-profile.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,sCAAsC,GAGvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,0BAA0B,MAAM,8CAA8C,CAAC;AAEtF,eAAe,WAAW,CACxB,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;IAC1B,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,OAAO,GAAG,sCAAsC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,MAAM,WAAW,CAAC,0BAA0B,CAAC,CAAC;IACzF,UAAU,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC;QACzC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;QAC1C,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,KAAK;KACzB,CAAC,CAAC;IACH,MAAM,gBAAgB,CAAC,OAAO,EAAE,CAAC;IACjC,OAAO,QAAQ,CAAC;AAClB,CAAC,CACF,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { Application } from '@hile/micro';
|
|
2
|
-
|
|
1
|
+
import { Application, type MicroBinding } from '@hile/micro';
|
|
2
|
+
import { globalConfigMicroContract } from '@zlooks.cn/global-config-shared';
|
|
3
|
+
declare const _default: import("@hile/core").ServiceRegisterProps<Readonly<{
|
|
4
|
+
application: Application;
|
|
5
|
+
contractBinding: MicroBinding<typeof globalConfigMicroContract>;
|
|
6
|
+
}>>;
|
|
3
7
|
export default _default;
|
|
4
8
|
//# sourceMappingURL=application.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.service.d.ts","sourceRoot":"","sources":["../../src/services/application.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"application.service.d.ts","sourceRoot":"","sources":["../../src/services/application.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAqB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAEL,yBAAyB,EAC1B,MAAM,iCAAiC,CAAC;;iBAQ1B,WAAW;qBACP,YAAY,CAAC,OAAO,yBAAyB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
1
2
|
import { defineService } from '@hile/core';
|
|
2
|
-
import { Application } from '@hile/micro';
|
|
3
|
-
import { GLOBAL_CONFIG_SERVICE_NAMESPACE } from '@zlooks.cn/global-config-shared';
|
|
3
|
+
import { Application, loadMicroContract } from '@hile/micro';
|
|
4
|
+
import { GLOBAL_CONFIG_SERVICE_NAMESPACE, globalConfigMicroContract, } from '@zlooks.cn/global-config-shared';
|
|
4
5
|
import { parseAdvertiseHost, parseRegistryBootstrap, } from '@zlooks.cn/registry-config';
|
|
5
6
|
import { detect } from 'detect-port';
|
|
6
7
|
export default defineService('zlooks.global-config.application', async (shutdown) => {
|
|
@@ -14,8 +15,15 @@ export default defineService('zlooks.global-config.application', async (shutdown
|
|
|
14
15
|
registry,
|
|
15
16
|
...(advertiseHost ? { advertiseHost } : {}),
|
|
16
17
|
});
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const contractBinding = await loadMicroContract(application, globalConfigMicroContract, fileURLToPath(new URL('../messages', import.meta.url)));
|
|
19
|
+
try {
|
|
20
|
+
const microPort = await detect();
|
|
21
|
+
shutdown(await application.listen(microPort));
|
|
22
|
+
return { application, contractBinding };
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
await contractBinding.close();
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
20
28
|
});
|
|
21
29
|
//# sourceMappingURL=application.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.service.js","sourceRoot":"","sources":["../../src/services/application.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"application.service.js","sourceRoot":"","sources":["../../src/services/application.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAqB,MAAM,aAAa,CAAC;AAChF,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAOrC,eAAe,aAAa,CAC1B,kCAAkC,EAClC,KAAK,EAAE,QAAQ,EAAE,EAAE;IACjB,MAAM,QAAQ,GAAG,sBAAsB,CAAC;QACtC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa;QACxC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa;KACzC,CAAC,CAAC;IACH,MAAM,aAAa,GAAG,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC1E,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC;QAClC,SAAS,EAAE,+BAA+B;QAC1C,QAAQ;QACR,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAC,CAAC;IACH,MAAM,eAAe,GAAG,MAAM,iBAAiB,CAC7C,WAAW,EACX,yBAAyB,EACzB,aAAa,CAAC,IAAI,GAAG,CAAC,aAAa,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CACvD,CAAC;IACF,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,MAAM,MAAM,EAAE,CAAC;QACjC,QAAQ,CAAC,MAAM,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QAC9C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAW,CAAC;IACnD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,eAAe,CAAC,KAAK,EAAE,CAAC;QAC9B,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CACF,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { registryConfigTopic, subscribeRegistryConfig } from '@zlooks.cn/registr
|
|
|
4
4
|
import { parseGlobalConfigServerConfig, } from '../config/schema.js';
|
|
5
5
|
import applicationService from './application.service.js';
|
|
6
6
|
export default defineService('zlooks.global-config.config', async (shutdown) => {
|
|
7
|
-
const application = await loadService(applicationService);
|
|
7
|
+
const { application } = await loadService(applicationService);
|
|
8
8
|
const subscriber = await subscribeRegistryConfig(application, {
|
|
9
9
|
sources: {
|
|
10
10
|
postgres: { topic: registryConfigTopic('postgres'), parse: parsePostgresConfig },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.service.js","sourceRoot":"","sources":["../../src/services/config.service.ts"],"names":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U,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -1,152 +1,12 @@
|
|
|
1
|
+
import { TypeOrmSiteProfileStore } from '../config/typeorm-site-profile-store.js';
|
|
2
|
+
import { TypeOrmSitePresentationStore } from '../config/typeorm-site-presentation-store.js';
|
|
3
|
+
import { SiteProfilePublisher } from '../runtime/site-profile-publisher.js';
|
|
4
|
+
import { SitePresentationPublisher } from '../runtime/site-presentation-publisher.js';
|
|
1
5
|
declare const _default: import("@hile/core").ServiceRegisterProps<{
|
|
2
|
-
readonly
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
identity: {
|
|
7
|
-
name: string;
|
|
8
|
-
homeHref: string;
|
|
9
|
-
backgroundVideoUrl?: string | null | undefined;
|
|
10
|
-
logoUrl?: string | undefined;
|
|
11
|
-
faviconUrl?: string | undefined;
|
|
12
|
-
description?: string | undefined;
|
|
13
|
-
};
|
|
14
|
-
linkGroups: {
|
|
15
|
-
id: string;
|
|
16
|
-
label: string;
|
|
17
|
-
links: ({
|
|
18
|
-
id: string;
|
|
19
|
-
label: string;
|
|
20
|
-
href: string;
|
|
21
|
-
external: false;
|
|
22
|
-
} | {
|
|
23
|
-
id: string;
|
|
24
|
-
label: string;
|
|
25
|
-
href: string;
|
|
26
|
-
external: true;
|
|
27
|
-
})[];
|
|
28
|
-
}[];
|
|
29
|
-
legal: {
|
|
30
|
-
copyright?: string | undefined;
|
|
31
|
-
registrations: {
|
|
32
|
-
id: string;
|
|
33
|
-
kind: "icp" | "other" | "public-security";
|
|
34
|
-
number: string;
|
|
35
|
-
verificationUrl?: string | undefined;
|
|
36
|
-
iconUrl?: string | undefined;
|
|
37
|
-
}[];
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
updatedAt: string;
|
|
41
|
-
updatedBy: string;
|
|
42
|
-
}>>;
|
|
43
|
-
readonly updatePresentationFromMcp: (input: unknown & {
|
|
44
|
-
readonly updatedBy?: string;
|
|
45
|
-
}) => Promise<Readonly<{
|
|
46
|
-
schemaVersion: 2;
|
|
47
|
-
revision: number;
|
|
48
|
-
value: {
|
|
49
|
-
identity: {
|
|
50
|
-
name: string;
|
|
51
|
-
homeHref: string;
|
|
52
|
-
backgroundVideoUrl?: string | null | undefined;
|
|
53
|
-
logoUrl?: string | undefined;
|
|
54
|
-
faviconUrl?: string | undefined;
|
|
55
|
-
description?: string | undefined;
|
|
56
|
-
};
|
|
57
|
-
linkGroups: {
|
|
58
|
-
id: string;
|
|
59
|
-
label: string;
|
|
60
|
-
links: ({
|
|
61
|
-
id: string;
|
|
62
|
-
label: string;
|
|
63
|
-
href: string;
|
|
64
|
-
external: false;
|
|
65
|
-
} | {
|
|
66
|
-
id: string;
|
|
67
|
-
label: string;
|
|
68
|
-
href: string;
|
|
69
|
-
external: true;
|
|
70
|
-
})[];
|
|
71
|
-
}[];
|
|
72
|
-
legal: {
|
|
73
|
-
copyright?: string | undefined;
|
|
74
|
-
registrations: {
|
|
75
|
-
id: string;
|
|
76
|
-
kind: "icp" | "other" | "public-security";
|
|
77
|
-
number: string;
|
|
78
|
-
verificationUrl?: string | undefined;
|
|
79
|
-
iconUrl?: string | undefined;
|
|
80
|
-
}[];
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
updatedAt: string;
|
|
84
|
-
updatedBy: string;
|
|
85
|
-
}>>;
|
|
86
|
-
readonly readProfile: () => Promise<Readonly<{
|
|
87
|
-
schemaVersion: 1;
|
|
88
|
-
revision: number;
|
|
89
|
-
value: {
|
|
90
|
-
profile: {
|
|
91
|
-
displayName: string;
|
|
92
|
-
avatarUrl?: string | undefined;
|
|
93
|
-
headline: string;
|
|
94
|
-
biography: string;
|
|
95
|
-
};
|
|
96
|
-
topics: {
|
|
97
|
-
id: string;
|
|
98
|
-
name: string;
|
|
99
|
-
summary: string;
|
|
100
|
-
href?: string | undefined;
|
|
101
|
-
}[];
|
|
102
|
-
featuredLinks: ({
|
|
103
|
-
id: string;
|
|
104
|
-
label: string;
|
|
105
|
-
href: string;
|
|
106
|
-
external: false;
|
|
107
|
-
} | {
|
|
108
|
-
id: string;
|
|
109
|
-
label: string;
|
|
110
|
-
href: string;
|
|
111
|
-
external: true;
|
|
112
|
-
})[];
|
|
113
|
-
};
|
|
114
|
-
updatedAt: string;
|
|
115
|
-
updatedBy: string;
|
|
116
|
-
}>>;
|
|
117
|
-
readonly updateProfileFromMcp: (input: unknown & {
|
|
118
|
-
readonly updatedBy?: string;
|
|
119
|
-
}) => Promise<Readonly<{
|
|
120
|
-
schemaVersion: 1;
|
|
121
|
-
revision: number;
|
|
122
|
-
value: {
|
|
123
|
-
profile: {
|
|
124
|
-
displayName: string;
|
|
125
|
-
avatarUrl?: string | undefined;
|
|
126
|
-
headline: string;
|
|
127
|
-
biography: string;
|
|
128
|
-
};
|
|
129
|
-
topics: {
|
|
130
|
-
id: string;
|
|
131
|
-
name: string;
|
|
132
|
-
summary: string;
|
|
133
|
-
href?: string | undefined;
|
|
134
|
-
}[];
|
|
135
|
-
featuredLinks: ({
|
|
136
|
-
id: string;
|
|
137
|
-
label: string;
|
|
138
|
-
href: string;
|
|
139
|
-
external: false;
|
|
140
|
-
} | {
|
|
141
|
-
id: string;
|
|
142
|
-
label: string;
|
|
143
|
-
href: string;
|
|
144
|
-
external: true;
|
|
145
|
-
})[];
|
|
146
|
-
};
|
|
147
|
-
updatedAt: string;
|
|
148
|
-
updatedBy: string;
|
|
149
|
-
}>>;
|
|
6
|
+
readonly presentationStore: TypeOrmSitePresentationStore;
|
|
7
|
+
readonly presentationPublisher: SitePresentationPublisher;
|
|
8
|
+
readonly profileStore: TypeOrmSiteProfileStore;
|
|
9
|
+
readonly profilePublisher: SiteProfilePublisher;
|
|
150
10
|
}>;
|
|
151
11
|
export default _default;
|
|
152
12
|
//# sourceMappingURL=global-config-runtime.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-config-runtime.service.d.ts","sourceRoot":"","sources":["../../src/services/global-config-runtime.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"global-config-runtime.service.d.ts","sourceRoot":"","sources":["../../src/services/global-config-runtime.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { defineService, loadService } from '@hile/core';
|
|
2
|
-
import { parseGlobalConfigMcpProfileUpdate, parseGlobalConfigMcpUpdate, } from '@zlooks.cn/global-config-shared';
|
|
3
2
|
import { TypeOrmSiteProfileStore } from '../config/typeorm-site-profile-store.js';
|
|
4
3
|
import { TypeOrmSitePresentationStore } from '../config/typeorm-site-presentation-store.js';
|
|
5
4
|
import { SiteProfilePublisher } from '../runtime/site-profile-publisher.js';
|
|
@@ -9,12 +8,13 @@ import configService from './config.service.js';
|
|
|
9
8
|
import databaseService from './database.service.js';
|
|
10
9
|
import loggerService from './logger.service.js';
|
|
11
10
|
export default defineService('zlooks.global-config.runtime', async (shutdown) => {
|
|
12
|
-
const [
|
|
11
|
+
const [applicationRuntime, configs, database, logger] = await Promise.all([
|
|
13
12
|
loadService(applicationService),
|
|
14
13
|
loadService(configService),
|
|
15
14
|
loadService(databaseService),
|
|
16
15
|
loadService(loggerService),
|
|
17
16
|
]);
|
|
17
|
+
const { application } = applicationRuntime;
|
|
18
18
|
const presentationStore = new TypeOrmSitePresentationStore(database);
|
|
19
19
|
const profileStore = new TypeOrmSiteProfileStore(database);
|
|
20
20
|
const presentationPublisher = new SitePresentationPublisher(application, presentationStore, configs.snapshot().publisher.refreshIntervalMs, (error) => logger.error({ err: error, event: 'global-config.publication.failed' }, 'Global configuration publication failed'));
|
|
@@ -27,30 +27,7 @@ export default defineService('zlooks.global-config.runtime', async (shutdown) =>
|
|
|
27
27
|
throw error;
|
|
28
28
|
}
|
|
29
29
|
shutdown(() => closePublishers([presentationPublisher, profilePublisher]));
|
|
30
|
-
return {
|
|
31
|
-
readPresentation: () => presentationStore.read(),
|
|
32
|
-
updatePresentationFromMcp: async (input) => {
|
|
33
|
-
if (typeof input !== 'object' || input === null || typeof input.updatedBy !== 'string') {
|
|
34
|
-
throw new TypeError('Verified MCP actor is required');
|
|
35
|
-
}
|
|
36
|
-
const { updatedBy, ...untrustedRequest } = input;
|
|
37
|
-
const request = parseGlobalConfigMcpUpdate(untrustedRequest);
|
|
38
|
-
const snapshot = await presentationStore.update({ ...request, updatedBy });
|
|
39
|
-
await presentationPublisher.refresh();
|
|
40
|
-
return snapshot;
|
|
41
|
-
},
|
|
42
|
-
readProfile: () => profileStore.read(),
|
|
43
|
-
updateProfileFromMcp: async (input) => {
|
|
44
|
-
if (typeof input !== 'object' || input === null || typeof input.updatedBy !== 'string') {
|
|
45
|
-
throw new TypeError('Verified MCP actor is required');
|
|
46
|
-
}
|
|
47
|
-
const { updatedBy, ...untrustedRequest } = input;
|
|
48
|
-
const request = parseGlobalConfigMcpProfileUpdate(untrustedRequest);
|
|
49
|
-
const snapshot = await profileStore.update({ ...request, updatedBy });
|
|
50
|
-
await profilePublisher.refresh();
|
|
51
|
-
return snapshot;
|
|
52
|
-
},
|
|
53
|
-
};
|
|
30
|
+
return { presentationStore, presentationPublisher, profileStore, profilePublisher };
|
|
54
31
|
});
|
|
55
32
|
async function closePublishers(publishers) {
|
|
56
33
|
const results = await Promise.allSettled(publishers.map((publisher) => publisher.close()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-config-runtime.service.js","sourceRoot":"","sources":["../../src/services/global-config-runtime.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"global-config-runtime.service.js","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G,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC;IACzC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,0CAA0C,CAAC,CAAC;AACtG,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { defineService, loadService } from '@hile/core';
|
|
2
|
+
import applicationService from './application.service.js';
|
|
2
3
|
import globalConfigRuntimeService from './global-config-runtime.service.js';
|
|
3
4
|
import mcpProviderService from './mcp-provider.service.js';
|
|
4
5
|
export default defineService('zlooks.global-config.boot', async () => {
|
|
5
6
|
await loadService(globalConfigRuntimeService);
|
|
7
|
+
const { contractBinding } = await loadService(applicationService);
|
|
8
|
+
contractBinding.activate();
|
|
6
9
|
return loadService(mcpProviderService);
|
|
7
10
|
});
|
|
8
11
|
//# sourceMappingURL=global-config.boot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-config.boot.js","sourceRoot":"","sources":["../../src/services/global-config.boot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,0BAA0B,MAAM,oCAAoC,CAAC;AAC5E,OAAO,kBAAkB,MAAM,2BAA2B,CAAC;AAE3D,eAAe,aAAa,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;IACnE,MAAM,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAC9C,OAAO,WAAW,CAAC,kBAAkB,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"global-config.boot.js","sourceRoot":"","sources":["../../src/services/global-config.boot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,0BAA0B,MAAM,oCAAoC,CAAC;AAC5E,OAAO,kBAAkB,MAAM,2BAA2B,CAAC;AAE3D,eAAe,aAAa,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;IACnE,MAAM,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAC9C,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAClE,eAAe,CAAC,QAAQ,EAAE,CAAC;IAC3B,OAAO,WAAW,CAAC,kBAAkB,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { defineService, loadService } from '@hile/core';
|
|
2
2
|
import { attachMcpProvider } from '@hile/mcp/micro';
|
|
3
|
+
import { createGlobalConfigClient } from '@zlooks.cn/global-config-shared';
|
|
3
4
|
import { createGlobalConfigMcpProvider } from '../mcp/global-config-provider.js';
|
|
4
5
|
import applicationService from './application.service.js';
|
|
5
|
-
import globalConfigRuntimeService from './global-config-runtime.service.js';
|
|
6
6
|
export default defineService('zlooks.global-config.mcp-provider', async (shutdown) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
loadService(globalConfigRuntimeService),
|
|
10
|
-
]);
|
|
11
|
-
const attachment = await attachMcpProvider(application, createGlobalConfigMcpProvider(runtime), {
|
|
7
|
+
const { application, contractBinding } = await loadService(applicationService);
|
|
8
|
+
const attachment = await attachMcpProvider(application, createGlobalConfigMcpProvider(createGlobalConfigClient(contractBinding.local)), {
|
|
12
9
|
// Deployment trust boundary: only fully trusted services can reach the internal
|
|
13
10
|
// Hile Micro mesh, so Provider invocation intentionally requires no shared secret.
|
|
14
11
|
invocationSecurity: { mode: 'trusted-internal' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-provider.service.js","sourceRoot":"","sources":["../../src/services/mcp-provider.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"mcp-provider.service.js","sourceRoot":"","sources":["../../src/services/mcp-provider.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAE1D,eAAe,aAAa,CAAC,mCAAmC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IACnF,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG,MAAM,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAC/E,MAAM,UAAU,GAAG,MAAM,iBAAiB,CACxC,WAAW,EACX,6BAA6B,CAC3B,wBAAwB,CAAC,eAAe,CAAC,KAAK,CAAC,CAChD,EACD;QACE,gFAAgF;QAChF,mFAAmF;QACnF,kBAAkB,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE;KACjD,CACF,CAAC;IACF,QAAQ,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;IACnC,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC,CAAC"}
|