@emseepea/create-soap-backed-server 0.0.8 → 0.0.11
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 +17 -0
- package/initializer-dist/template/.dockerignore +17 -0
- package/initializer-dist/template/Dockerfile +20 -0
- package/initializer-dist/template/README.md +17 -0
- package/initializer-dist/template/package.json +5 -4
- package/initializer-dist/template/src/server.ts +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -75,6 +75,23 @@ Keep service credentials outside the URL and source code. Add authentication
|
|
|
75
75
|
headers inside the server for your provider. Never accept an endpoint, schema
|
|
76
76
|
location, SOAP action, or arbitrary XML from an MCP caller.
|
|
77
77
|
|
|
78
|
+
## Build a production container
|
|
79
|
+
|
|
80
|
+
Run `npm install` first so the project has a lockfile. Then run:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
npm run container:build
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The image includes the local WSDL and XSD contracts required at runtime. It is
|
|
87
|
+
for a production deployment behind a trusted proxy, starts with the fail-closed
|
|
88
|
+
production profile, and needs a runtime-mounted deployment configuration file.
|
|
89
|
+
Keep secrets in your platform's runtime secret store, not in the Dockerfile,
|
|
90
|
+
build arguments, or deployment configuration file.
|
|
91
|
+
|
|
92
|
+
For the production proxy, runtime configuration, and hardening requirements, see
|
|
93
|
+
the [container guide](https://emseepea.github.io/emseepea/examples/#build-a-production-container).
|
|
94
|
+
|
|
78
95
|
## Change the Contract
|
|
79
96
|
|
|
80
97
|
Edit the local files under `contracts/`, then regenerate and review the diff:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
FROM docker.io/library/node:24.21.0-trixie-slim@sha256:db3ae80f5d8df06e04dabdf7b44cbf008d32de168205fa0294444aabbc08c590 AS build
|
|
2
|
+
WORKDIR /app
|
|
3
|
+
COPY . .
|
|
4
|
+
RUN test "$(node --version)" = "v24.21.0" \
|
|
5
|
+
&& test -f package-lock.json \
|
|
6
|
+
&& npm ci --ignore-scripts \
|
|
7
|
+
&& npm run build \
|
|
8
|
+
&& npm prune --omit=dev --ignore-scripts
|
|
9
|
+
|
|
10
|
+
FROM gcr.io/distroless/nodejs24-debian13:nonroot@sha256:7781e8b4fccf59240bd539af6738cccf8dad4be303165c3a1fa065c48699b937
|
|
11
|
+
WORKDIR /app
|
|
12
|
+
ENV EMSEEPEA_DEPLOYMENT_MODE=production-behind-proxy
|
|
13
|
+
COPY --from=build --chown=65532:65532 /app/package.json ./package.json
|
|
14
|
+
COPY --from=build --chown=65532:65532 /app/node_modules ./node_modules
|
|
15
|
+
COPY --from=build --chown=65532:65532 /app/dist ./dist
|
|
16
|
+
COPY --from=build --chown=65532:65532 /app/contracts ./contracts
|
|
17
|
+
USER 65532:65532
|
|
18
|
+
EXPOSE 3000
|
|
19
|
+
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 CMD ["/nodejs/bin/node", "-e", "const port=process.env.PORT||'3000';fetch(`http://127.0.0.1:${port}/healthz`).then((r)=>process.exit(r.ok?0:1),()=>process.exit(1));"]
|
|
20
|
+
CMD ["dist/server.js"]
|
|
@@ -47,6 +47,23 @@ Keep service credentials outside the URL and source code. Add authentication
|
|
|
47
47
|
headers inside the server for your provider. Never accept an endpoint, schema
|
|
48
48
|
location, SOAP action, or arbitrary XML from an MCP caller.
|
|
49
49
|
|
|
50
|
+
## Build a production container
|
|
51
|
+
|
|
52
|
+
Run `npm install` first so the project has a lockfile. Then run:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
npm run container:build
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The image includes the local WSDL and XSD contracts required at runtime. It is
|
|
59
|
+
for a production deployment behind a trusted proxy, starts with the fail-closed
|
|
60
|
+
production profile, and needs a runtime-mounted deployment configuration file.
|
|
61
|
+
Keep secrets in your platform's runtime secret store, not in the Dockerfile,
|
|
62
|
+
build arguments, or deployment configuration file.
|
|
63
|
+
|
|
64
|
+
For the production proxy, runtime configuration, and hardening requirements, see
|
|
65
|
+
the [container guide](https://emseepea.github.io/emseepea/examples/#build-a-production-container).
|
|
66
|
+
|
|
50
67
|
## Change the Contract
|
|
51
68
|
|
|
52
69
|
Edit the local files under `contracts/`, then regenerate and review the diff:
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
"test:built": "node --test test/*.test.mjs",
|
|
14
14
|
"test:llm": "npm run build && npm run test:llm:built",
|
|
15
15
|
"test:llm:built": "emseepea-test eval",
|
|
16
|
-
"lint": "oxlint src test test-types eval scripts test-support"
|
|
16
|
+
"lint": "oxlint src test test-types eval scripts test-support",
|
|
17
|
+
"container:build": "docker build --tag emseepea-server:local ."
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
|
-
"@emseepea/feedback": "0.2.
|
|
20
|
-
"@emseepea/testing": "0.9.
|
|
20
|
+
"@emseepea/feedback": "0.2.7",
|
|
21
|
+
"@emseepea/testing": "0.9.11",
|
|
21
22
|
"@types/node": "24.13.3",
|
|
22
23
|
"typescript": "6.0.3",
|
|
23
24
|
"oxlint": "1.80.0"
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
},
|
|
28
29
|
"private": true,
|
|
29
30
|
"dependencies": {
|
|
30
|
-
"@emseepea/server": "0.
|
|
31
|
+
"@emseepea/server": "0.10.1",
|
|
31
32
|
"@types/sax": "1.2.7",
|
|
32
33
|
"soap": "1.11.0",
|
|
33
34
|
"xml-xsd-engine": "1.7.3",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { serveEmseepea } from "@emseepea/server";
|
|
1
|
+
import { loadDeploymentProfile, serveEmseepea } from "@emseepea/server";
|
|
2
2
|
import { createSoapExample } from "./app.js";
|
|
3
3
|
|
|
4
4
|
const endpoint = process.env.PEA_SOAP_URL ?? "http://127.0.0.1:3999/soap";
|
|
5
|
-
const { app } = await createSoapExample(endpoint);
|
|
5
|
+
const { app } = await createSoapExample(endpoint, { deployment: loadDeploymentProfile() });
|
|
6
6
|
const running = await serveEmseepea(app, {
|
|
7
7
|
port: Number.parseInt(process.env.PORT ?? "3000", 10),
|
|
8
8
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emseepea/create-soap-backed-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Create an Em See Pea server that validates a SOAP service from its XSD contract.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"prepack": "npm run build:initializer"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@emseepea/feedback": "0.2.
|
|
24
|
-
"@emseepea/server": "0.
|
|
23
|
+
"@emseepea/feedback": "0.2.7",
|
|
24
|
+
"@emseepea/server": "0.10.1",
|
|
25
25
|
"soap": "1.11.0",
|
|
26
26
|
"xml-xsd-engine": "1.7.3",
|
|
27
27
|
"zod": "4.4.3",
|
|
28
|
-
"@emseepea/testing": "0.9.
|
|
28
|
+
"@emseepea/testing": "0.9.11",
|
|
29
29
|
"@types/node": "24.13.3",
|
|
30
30
|
"@types/sax": "1.2.7",
|
|
31
31
|
"typescript": "6.0.3",
|