@open-operational-state/oos 0.2.0

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 ADDED
@@ -0,0 +1,77 @@
1
+ # @open-operational-state/oos
2
+
3
+ The developer-facing package for [Open Operational State](https://github.com/open-operational-state). Install this one package to get the CLI and the programmatic API.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@open-operational-state/oos)](https://www.npmjs.com/package/@open-operational-state/oos)
6
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue)](../../LICENSE)
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install @open-operational-state/oos
12
+ ```
13
+
14
+ ## CLI
15
+
16
+ After local install, the `oos` binary is available:
17
+
18
+ ```bash
19
+ npx oos probe https://api.example.com/health
20
+ npx oos validate snapshot.json
21
+ npx oos fixtures ./conformance-fixtures --format=table
22
+ npx oos inspect snapshot.json
23
+ ```
24
+
25
+ Or run without installing:
26
+
27
+ ```bash
28
+ npx @open-operational-state/oos probe https://api.example.com/health
29
+ ```
30
+
31
+ Or install globally:
32
+
33
+ ```bash
34
+ npm i -g @open-operational-state/oos
35
+ oos probe https://api.example.com/health
36
+ ```
37
+
38
+ ### Commands
39
+
40
+ | Command | Description |
41
+ |---|---|
42
+ | `probe <url>` | Fetch a URL, auto-detect format, parse to core model |
43
+ | `validate <file>` | Validate a JSON file against conformance levels |
44
+ | `fixtures <dir>` | Run all conformance fixtures in a directory |
45
+ | `inspect <file>` | Parse a JSON file, pretty-print core model |
46
+
47
+ ### Options
48
+
49
+ | Option | Description |
50
+ |---|---|
51
+ | `--format=json\|table` | Output format (default: json) |
52
+ | `--help` | Show help |
53
+
54
+ ## Programmatic API
55
+
56
+ ```js
57
+ import { probe } from '@open-operational-state/oos';
58
+
59
+ const result = await probe( 'https://api.example.com/health' );
60
+
61
+ console.log( result.snapshot.condition ); // 'operational'
62
+ console.log( result.httpStatus ); // 200
63
+ console.log( result.validation.valid ); // true
64
+ ```
65
+
66
+ ## What this package includes
67
+
68
+ `@open-operational-state/oos` is an umbrella package that bundles:
69
+
70
+ - **`probe`** — programmatic endpoint probing
71
+ - **`validator`** — conformance validation, fixture runner, CLI implementation
72
+
73
+ You don't need to install the lower-level packages separately.
74
+
75
+ ## License
76
+
77
+ Licensed under [Apache 2.0](../../LICENSE).
package/dist/cli.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * OOS CLI entrypoint.
4
+ *
5
+ * This is the executable that `npx @open-operational-state/oos` resolves to.
6
+ * All CLI implementation logic lives in @open-operational-state/validator —
7
+ * this file is a thin delegation layer.
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG"}
package/dist/cli.js ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * OOS CLI entrypoint.
4
+ *
5
+ * This is the executable that `npx @open-operational-state/oos` resolves to.
6
+ * All CLI implementation logic lives in @open-operational-state/validator —
7
+ * this file is a thin delegation layer.
8
+ */
9
+ import { runCli } from '@open-operational-state/validator';
10
+ runCli().catch((err) => {
11
+ console.error(err);
12
+ process.exit(1);
13
+ });
14
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAE3D,MAAM,EAAE,CAAC,KAAK,CAAE,CAAE,GAAY,EAAG,EAAE;IAC/B,OAAO,CAAC,KAAK,CAAE,GAAG,CAAE,CAAC;IACrB,OAAO,CAAC,IAAI,CAAE,CAAC,CAAE,CAAC;AACtB,CAAC,CAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @open-operational-state/oos
3
+ *
4
+ * The developer-facing package for Open Operational State.
5
+ *
6
+ * Curated re-exports — small, opinionated, stable.
7
+ */
8
+ export { probe } from '@open-operational-state/probe';
9
+ export type { ProbeResult, ProbeOptions } from '@open-operational-state/probe';
10
+ export type { Snapshot, Subject, Evidence, Timing, CheckEntry, ValidationResult, ValidationError, ValidationWarning, DiscoveryDocument, } from '@open-operational-state/types';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG/E,YAAY,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,GACpB,MAAM,+BAA+B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @open-operational-state/oos
3
+ *
4
+ * The developer-facing package for Open Operational State.
5
+ *
6
+ * Curated re-exports — small, opinionated, stable.
7
+ */
8
+ // ── Probe (primary API) ───────────────────────────────────────────────
9
+ export { probe } from '@open-operational-state/probe';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yEAAyE;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC"}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@open-operational-state/oos",
3
+ "version": "0.2.0",
4
+ "description": "Open Operational State — developer-facing package and CLI",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "bin": {
16
+ "oos": "./dist/cli.js"
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/open-operational-state/status-tooling-js.git",
27
+ "directory": "packages/oos"
28
+ },
29
+ "scripts": {
30
+ "build": "tsc",
31
+ "clean": "rm -rf dist",
32
+ "typecheck": "tsc --noEmit",
33
+ "test": "echo 'No tests — thin entrypoint'"
34
+ },
35
+ "dependencies": {
36
+ "@open-operational-state/probe": "^0.2.0",
37
+ "@open-operational-state/types": "^0.2.0",
38
+ "@open-operational-state/validator": "^0.2.0"
39
+ },
40
+ "devDependencies": {
41
+ "typescript": "^5.8.0"
42
+ }
43
+ }