@tomflow/proflow-dev-tunnel 0.1.4 → 0.1.6
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/CONFIGURATION.md +25 -0
- package/dist/deployment/adapter.d.ts +2 -2
- package/dist/deployment/adapter.js +12 -21
- package/dist/deployment/descriptor.d.ts +5 -2
- package/dist/deployment/descriptor.js +10 -3
- package/dist/src/resource-adapter.js +1 -1
- package/package.json +4 -11
- package/proflow.module.json +6 -2
- package/CHANGELOG.md +0 -25
- package/self-install.mjs +0 -29
package/CONFIGURATION.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# dev-tunnel configuration
|
|
2
|
+
|
|
3
|
+
Canonical public config: `.proflow/config/dev-tunnel.json`
|
|
4
|
+
|
|
5
|
+
This file is Workspace-owned data. `platform uninstall` does not delete it. Values are JSON strings. Raw secrets must not be stored here; `secretRef` fields contain opaque references only.
|
|
6
|
+
|
|
7
|
+
## Fields
|
|
8
|
+
|
|
9
|
+
| Key | Type | Required | Sensitive | Source | Meaning |
|
|
10
|
+
|---|---|---:|---:|---|---|
|
|
11
|
+
| `publicBaseUrl` | `url` | yes | no | User or owning external/runtime Module supplies the reachable endpoint URL. | Public HTTPS URL supplied by the dev-tunnel resource |
|
|
12
|
+
| `tunnelId` | `string` | no | no | User or owning Module supplies this value according to the field description. | Persistent Microsoft Dev Tunnel identifier used when this adapter owns lifecycle start/stop |
|
|
13
|
+
| `verificationEvidenceFile` | `path` | no | no | User or owning Module supplies an absolute/local path that exists on this Workspace. | JSON evidence for real file-relay and 429/5xx verification behind the configured public ingress |
|
|
14
|
+
|
|
15
|
+
## Materialize
|
|
16
|
+
|
|
17
|
+
Create or update the canonical JSON object at:
|
|
18
|
+
|
|
19
|
+
`.proflow/config/dev-tunnel.json`
|
|
20
|
+
|
|
21
|
+
Use only declared keys and string values. Do not create a second Platform configuration database.
|
|
22
|
+
|
|
23
|
+
## Base completion check
|
|
24
|
+
|
|
25
|
+
Run `platform modules`. This Module should no longer report required keys in `missingConfig`. `platform start` performs the authoritative Module-owned validation before starting anything.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ModuleOperationResult } from "@tomflow/proflow-module-contract";
|
|
2
2
|
import type { DevTunnelRuntime, ErrorSemanticsProof, FileRelayProof } from "../src/resource-adapter.ts";
|
|
3
3
|
type DevTunnelVerificationEvidence = {
|
|
4
4
|
contract: "proflow.dev-tunnel-verification.v1";
|
|
@@ -13,7 +13,7 @@ export declare function createBehaviorAdapter(input?: {
|
|
|
13
13
|
runtime: DevTunnelRuntime;
|
|
14
14
|
verifyErrorSemantics?: () => Promise<ErrorSemanticsProof>;
|
|
15
15
|
verifyFileRelay?: () => Promise<FileRelayProof>;
|
|
16
|
-
}): {
|
|
16
|
+
}, config?: Record<string, string>): {
|
|
17
17
|
describe: () => {
|
|
18
18
|
result: ModuleOperationResult;
|
|
19
19
|
observedEffects: never[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
+
import { observeDeclaredModuleStatus, } from "@tomflow/proflow-module-contract";
|
|
3
4
|
import { verifyPublicIngress } from "../src/resource-adapter.js";
|
|
4
5
|
import { descriptor } from "./descriptor.js";
|
|
5
6
|
const success = (data) => ({
|
|
@@ -44,7 +45,7 @@ export async function readDevTunnelVerificationEvidence(file, publicBaseUrl) {
|
|
|
44
45
|
return undefined;
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
|
-
export function createBehaviorAdapter(input) {
|
|
48
|
+
export function createBehaviorAdapter(input, config) {
|
|
48
49
|
return {
|
|
49
50
|
describe: () => ({
|
|
50
51
|
result: success({
|
|
@@ -59,26 +60,16 @@ export function createBehaviorAdapter(input) {
|
|
|
59
60
|
observedEffects: [],
|
|
60
61
|
}),
|
|
61
62
|
status: async () => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
const observation = input ? await input.runtime.status() : undefined;
|
|
64
|
+
const runtimeStatus = observation?.state === "RUNNING"
|
|
65
|
+
? "RUNNING"
|
|
66
|
+
: observation?.state === "STOPPED"
|
|
67
|
+
? "STOPPED"
|
|
68
|
+
: input
|
|
69
|
+
? "FAILED"
|
|
70
|
+
: "UNKNOWN";
|
|
69
71
|
return {
|
|
70
|
-
result:
|
|
71
|
-
...success(),
|
|
72
|
-
checks: [
|
|
73
|
-
{
|
|
74
|
-
id: "tunnel-status",
|
|
75
|
-
status: observation.state === "RUNNING"
|
|
76
|
-
? "PASS"
|
|
77
|
-
: "WARN",
|
|
78
|
-
message: `dev-tunnel state is ${observation.state}`,
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
},
|
|
72
|
+
result: success(observeDeclaredModuleStatus(descriptor, config, runtimeStatus)),
|
|
82
73
|
observedEffects: [],
|
|
83
74
|
};
|
|
84
75
|
},
|
|
@@ -302,6 +293,6 @@ export async function createProductionBinding(input) {
|
|
|
302
293
|
server5xxVerified: false,
|
|
303
294
|
message: "dev-tunnel verification evidence is missing, stale, or invalid",
|
|
304
295
|
},
|
|
305
|
-
}),
|
|
296
|
+
}, input.config),
|
|
306
297
|
};
|
|
307
298
|
}
|
|
@@ -3,11 +3,10 @@ export declare const descriptor: {
|
|
|
3
3
|
readonly contractVersion: "1.0.0";
|
|
4
4
|
readonly moduleRef: "dev-tunnel";
|
|
5
5
|
readonly packageName: "@tomflow/proflow-dev-tunnel";
|
|
6
|
-
readonly moduleVersion: "0.1.
|
|
6
|
+
readonly moduleVersion: "0.1.6";
|
|
7
7
|
readonly kind: "external-resource";
|
|
8
8
|
readonly templateVersion: "1.0.0";
|
|
9
9
|
readonly platformCompatibility: ">=1.0.0 <2.0.0";
|
|
10
|
-
readonly installClass: "core";
|
|
11
10
|
readonly identity: {
|
|
12
11
|
readonly domain: "deployment-governance";
|
|
13
12
|
readonly summary: "Governs the Microsoft Dev Tunnel public HTTPS ingress resource and its managed local host process.";
|
|
@@ -76,5 +75,9 @@ export declare const descriptor: {
|
|
|
76
75
|
readonly id: "overview";
|
|
77
76
|
readonly path: "./README.md";
|
|
78
77
|
readonly description: "Dev Tunnel module overview";
|
|
78
|
+
}, {
|
|
79
|
+
readonly id: "configuration";
|
|
80
|
+
readonly path: "./CONFIGURATION.md";
|
|
81
|
+
readonly description: "Module configuration fields, sources and materialization instructions";
|
|
79
82
|
}];
|
|
80
83
|
};
|
|
@@ -3,11 +3,10 @@ export const descriptor = {
|
|
|
3
3
|
contractVersion: "1.0.0",
|
|
4
4
|
moduleRef: "dev-tunnel",
|
|
5
5
|
packageName: "@tomflow/proflow-dev-tunnel",
|
|
6
|
-
moduleVersion: "0.1.
|
|
6
|
+
moduleVersion: "0.1.6",
|
|
7
7
|
kind: "external-resource",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
|
10
|
-
installClass: "core",
|
|
11
10
|
identity: {
|
|
12
11
|
domain: "deployment-governance",
|
|
13
12
|
summary: "Governs the Microsoft Dev Tunnel public HTTPS ingress resource and its managed local host process.",
|
|
@@ -15,7 +14,10 @@ export const descriptor = {
|
|
|
15
14
|
provides: [],
|
|
16
15
|
requires: [],
|
|
17
16
|
requirements: [
|
|
18
|
-
{
|
|
17
|
+
{
|
|
18
|
+
kind: "executable",
|
|
19
|
+
command: "devtunnel",
|
|
20
|
+
},
|
|
19
21
|
{
|
|
20
22
|
kind: "human",
|
|
21
23
|
action: "Complete Microsoft Dev Tunnel login when required",
|
|
@@ -101,5 +103,10 @@ export const descriptor = {
|
|
|
101
103
|
path: "./README.md",
|
|
102
104
|
description: "Dev Tunnel module overview",
|
|
103
105
|
},
|
|
106
|
+
{
|
|
107
|
+
id: "configuration",
|
|
108
|
+
path: "./CONFIGURATION.md",
|
|
109
|
+
description: "Module configuration fields, sources and materialization instructions",
|
|
110
|
+
},
|
|
104
111
|
],
|
|
105
112
|
};
|
|
@@ -223,7 +223,7 @@ export function createDevTunnelRuntime(input) {
|
|
|
223
223
|
if (processStateFile)
|
|
224
224
|
await rm(processStateFile, { force: true });
|
|
225
225
|
child = undefined;
|
|
226
|
-
return observe("
|
|
226
|
+
return observe("STOPPED");
|
|
227
227
|
}
|
|
228
228
|
try {
|
|
229
229
|
process.kill(pid, "SIGTERM");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomflow/proflow-dev-tunnel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"proflow.module.json",
|
|
16
16
|
"conformance.json",
|
|
17
17
|
"README.md",
|
|
18
|
-
"
|
|
18
|
+
"CONFIGURATION.md"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@tomflow/proflow-module-contract": "^0.1.
|
|
21
|
+
"@tomflow/proflow-module-contract": "^0.1.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@tomflow/proflow-deployment-conformance": "^0.1.
|
|
24
|
+
"@tomflow/proflow-deployment-conformance": "^0.1.3"
|
|
25
25
|
},
|
|
26
26
|
"description": "Governs the Microsoft Dev Tunnel public HTTPS ingress resource and its managed local host process.",
|
|
27
27
|
"keywords": [
|
|
@@ -31,16 +31,9 @@
|
|
|
31
31
|
],
|
|
32
32
|
"proflow": {
|
|
33
33
|
"module": true,
|
|
34
|
-
"installClass": "core",
|
|
35
|
-
"installRequires": [
|
|
36
|
-
"@tomflow/proflow-module-contract"
|
|
37
|
-
],
|
|
38
34
|
"descriptor": "./dist/deployment/descriptor.js",
|
|
39
35
|
"manifest": "./proflow.module.json"
|
|
40
36
|
},
|
|
41
|
-
"bin": {
|
|
42
|
-
"proflow-dev-tunnel": "./self-install.mjs"
|
|
43
|
-
},
|
|
44
37
|
"scripts": {
|
|
45
38
|
"test": "node --test tests/**/*.test.ts",
|
|
46
39
|
"typecheck": "tsc --noEmit"
|
package/proflow.module.json
CHANGED
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
"contractVersion": "1.0.0",
|
|
4
4
|
"moduleRef": "dev-tunnel",
|
|
5
5
|
"packageName": "@tomflow/proflow-dev-tunnel",
|
|
6
|
-
"moduleVersion": "0.1.
|
|
6
|
+
"moduleVersion": "0.1.6",
|
|
7
7
|
"kind": "external-resource",
|
|
8
8
|
"templateVersion": "1.0.0",
|
|
9
9
|
"platformCompatibility": ">=1.0.0 <2.0.0",
|
|
10
|
-
"installClass": "core",
|
|
11
10
|
"identity": {
|
|
12
11
|
"domain": "deployment-governance",
|
|
13
12
|
"summary": "Governs the Microsoft Dev Tunnel public HTTPS ingress resource and its managed local host process."
|
|
@@ -103,6 +102,11 @@
|
|
|
103
102
|
"id": "overview",
|
|
104
103
|
"path": "./README.md",
|
|
105
104
|
"description": "Dev Tunnel module overview"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "configuration",
|
|
108
|
+
"path": "./CONFIGURATION.md",
|
|
109
|
+
"description": "Module configuration fields, sources and materialization instructions"
|
|
106
110
|
}
|
|
107
111
|
]
|
|
108
112
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# @tomflow/proflow-dev-tunnel
|
|
2
|
-
|
|
3
|
-
## 0.1.4
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Detach the managed dev-tunnel host from the short-lived Platform CLI process and persist an ownership-checked process record so later status/stop/restart invocations can manage the same tunnel without turning `platform start` into a daemon.
|
|
8
|
-
|
|
9
|
-
## 0.1.3
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- Bind production dev-tunnel verification to an explicit evidence file for the frozen file-relay and 429/5xx proofs, while retaining live HTTPS/TLS/latency/size checks.
|
|
14
|
-
|
|
15
|
-
## 0.1.2
|
|
16
|
-
|
|
17
|
-
### Patch Changes
|
|
18
|
-
|
|
19
|
-
- Real-1 final remediation and black-box release closure
|
|
20
|
-
|
|
21
|
-
## 0.1.1
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- Close the Real-1 global Platform control-plane contract across every published ProFlow package. Platform CLI now owns one durable global Workspace binding with canonical identity, cross-process operation locking, cwd/`--workspace` install targeting, cross-directory instance commands, whole-instance uninstall/rebind, and deterministic npm/yarn/pnpm Workspace package-manager selection. Every package-owned install entry, including newly generated Module Template packages, delegates to the Shell-global `platform` command and fails closed when that global CLI is unavailable; Deployment Conformance and the formal test plans mechanically enforce the same rule across all 24 packages.
|
package/self-install.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { spawnSync } from "node:child_process";
|
|
3
|
-
|
|
4
|
-
const [command, ...rest] = process.argv.slice(2);
|
|
5
|
-
const usage = "Usage: npx @tomflow/proflow-dev-tunnel install\n";
|
|
6
|
-
if (command === "--help" || command === "-h") {
|
|
7
|
-
process.stdout.write(usage);
|
|
8
|
-
process.exit(0);
|
|
9
|
-
}
|
|
10
|
-
if (command !== "install" || rest.length > 0) {
|
|
11
|
-
process.stderr.write(usage);
|
|
12
|
-
process.exit(2);
|
|
13
|
-
}
|
|
14
|
-
const executable = process.platform === "win32" ? "platform.cmd" : "platform";
|
|
15
|
-
const result = spawnSync(
|
|
16
|
-
executable,
|
|
17
|
-
["install", "@tomflow/proflow-dev-tunnel", "--workspace", process.cwd()],
|
|
18
|
-
{ cwd: process.cwd(), env: process.env, stdio: "inherit" },
|
|
19
|
-
);
|
|
20
|
-
if (result.error) {
|
|
21
|
-
if (result.error.code === "ENOENT") {
|
|
22
|
-
process.stderr.write(
|
|
23
|
-
"GLOBAL_PLATFORM_CLI_REQUIRED: install @tomflow/proflow-platform-cli globally before package-owned install\n",
|
|
24
|
-
);
|
|
25
|
-
process.exit(127);
|
|
26
|
-
}
|
|
27
|
-
throw result.error;
|
|
28
|
-
}
|
|
29
|
-
process.exit(result.status ?? 1);
|