@fulmenhq/tsfulmen 0.3.1 → 0.3.3
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/CHANGELOG.md +23 -0
- package/config/crucible-ts/repository/app-identity/app-identity.example.yaml +8 -0
- package/config/crucible-ts/repository/app-identity/fixtures/valid/typescript-package.yaml +17 -0
- package/config/crucible-ts/repository/app-identity/parity-snapshot.json +28 -0
- package/config/crucible-ts/taxonomy/metrics.yaml +1 -1
- package/dist/appidentity/index.d.ts +15 -5
- package/dist/appidentity/index.js +12 -7
- package/dist/appidentity/index.js.map +1 -1
- package/dist/bin/prometheus-cli.js +12 -7
- package/dist/bin/prometheus-cli.js.map +1 -1
- package/dist/bin/schema-cli.js.map +1 -1
- package/dist/config/index.d.ts +69 -11
- package/dist/config/index.js +18 -7
- package/dist/config/index.js.map +1 -1
- package/dist/foundry/index.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -8
- package/dist/index.js.map +1 -1
- package/dist/reports/license-inventory.csv +1 -1
- package/dist/schema/index.js.map +1 -1
- package/dist/signals/index.d.ts +1 -1
- package/dist/telemetry/http/index.js.map +1 -1
- package/dist/telemetry/prometheus/index.js +12 -7
- package/dist/telemetry/prometheus/index.js.map +1 -1
- package/dist/{types-Dv5TERCM.d.ts → types-CHDvDRCf.d.ts} +17 -1
- package/package.json +1 -1
- package/schemas/crucible-ts/config/repository/app-identity/v1.0.0/app-identity.schema.json +34 -0
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,29 @@ _No unreleased changes._
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
## [0.3.3] - 2026-06-17
|
|
18
|
+
|
|
19
|
+
> **Patch — compile-safety ergonomics.** Two purely-additive API options that let `bun --compile` single-file binary consumers register a build-embedded identity and load embedded config without per-consumer workarounds — ahead of the larger v0.4.0 SSOT-asset-embedding work. No breaking changes; the existing exported `LoadConfigOptions` shape is unchanged; engine floor unchanged (`>=22.12.0`). Full details in `docs/releases/v0.3.3.md`.
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **`skipValidation` on `registerEmbeddedIdentity(data, options?)`** — symmetric with the existing `loadIdentity({ skipValidation })`. Lets a `bun --compile` binary register a CI-validated embedded identity without hitting the filesystem-backed schema registry (absent in a single-file binary). Parse / first-wins / deep-freeze semantics are unchanged; only schema validation is gated. New `RegisterEmbeddedIdentityOptions` type exported from `appidentity`.
|
|
24
|
+
- **Inline `defaults` / `schema` on `loadConfig`** — provide a pre-parsed `defaults` object and/or an inline `schema` string instead of file paths, so consumers embedding config at build time needn't write content to a temp file just to pass a path. Exposed via a new `LoadInlineConfigOptions` shape and a `loadConfig` overload; `defaults` is `structuredClone`'d so callers' embedded objects are never mutated.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **`loadConfig` options split into path-based and inline shapes** (additive). `LoadConfigOptions` keeps `defaultsPath: string` (required) exactly as before; the new `LoadInlineConfigOptions` carries `defaults` (required). Both extend a shared `BaseLoadConfigOptions` and are mutually exclusive at the type level (`?: never`); `loadConfig` is overloaded over the two. The existing exported `LoadConfigOptions` is unchanged — patch-compatible for strict TypeScript consumers.
|
|
29
|
+
- **`ConfigMetadata` diagnostics** — adds optional `defaultsSource: "path" | "inline"` and `schema.source: "path" | "inline" | null`. `defaultsPath` stays typed `string` (reports `""` for inline). Fixes a bug where, when both inline `schema` and `schemaPath` were given, `schema.path` mis-reported the unused `schemaPath` — inline now correctly reports `path: null`.
|
|
30
|
+
|
|
31
|
+
## [0.3.2] - 2026-06-17
|
|
32
|
+
|
|
33
|
+
> **Patch — app-identity follow-up.** Syncs the Crucible SSOT to v0.4.14 (which adds the formal `metadata.typescript` app-identity section) and promotes tsfulmen's interim custom `metadata.console_scripts` field to it. No code or behavior change; the only published delta is the refreshed bundled `crucible-ts` schemas. Full details in `docs/releases/v0.3.2.md`.
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- **Synced Crucible SSOT `v0.4.13 → v0.4.14`** (`.goneat/ssot-consumer.yaml` ref). Refreshes the bundled app-identity assets under `schemas/crucible-ts`, `config/crucible-ts`, and `docs/crucible-ts` — the schema now carries the optional `metadata.typescript` object (npm analogue of `metadata.python`: `package_name` + `console_scripts → package.json bin`), plus the `typescript-package` fixture and parity case.
|
|
38
|
+
- **Promoted `.fulmen/app.yaml` to `metadata.typescript`** — the package's three bins (`tsfulmen-schema`, `tsfulmen-signals`, `tsfulmen-prometheus`) move from the interim custom `metadata.console_scripts` field to the first-class `metadata.typescript` section now that Crucible defines it. (`.fulmen/app.yaml` is the repo's own identity and is not in the npm `files` payload.)
|
|
39
|
+
|
|
17
40
|
## [0.3.1] - 2026-06-15
|
|
18
41
|
|
|
19
42
|
> **Patch — compile-safety.** Makes tsfulmen safe to embed in `bun build --compile` single-file binaries. Fixes two blockers surfaced downstream by `forge-workhorse-tuvan`: the embedded CLIs shadowed the consumer's own program on import, and an eager WASM load crashed compiled binaries at startup. No breaking changes; Node engine floor unchanged (`>=22.12.0`). Shipped as five reviewed PRs (#13, #14, #15, #16, #17). Full details in `docs/releases/v0.3.1.md`.
|
|
@@ -37,6 +37,14 @@ metadata:
|
|
|
37
37
|
entry_point: percheron.cli:main
|
|
38
38
|
- name: percheron-validate
|
|
39
39
|
entry_point: percheron.validation:cli
|
|
40
|
+
# TypeScript/npm packaging metadata (for npm projects — alternative to python)
|
|
41
|
+
# typescript:
|
|
42
|
+
# # npm package name (scoped or unscoped)
|
|
43
|
+
# package_name: "@fulmenhq/tsfulmen"
|
|
44
|
+
# # Executable bin entries — map to package.json `bin`
|
|
45
|
+
# console_scripts:
|
|
46
|
+
# - name: tsfulmen-schema
|
|
47
|
+
# entry_point: ./dist/bin/schema-cli.js
|
|
40
48
|
|
|
41
49
|
# Additional custom fields allowed for extensibility
|
|
42
50
|
# custom_field: value
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Valid application identity exercising metadata.typescript (npm packaging)
|
|
2
|
+
app:
|
|
3
|
+
binary_name: tsfulmen
|
|
4
|
+
vendor: fulmenhq
|
|
5
|
+
env_prefix: TSFULMEN_
|
|
6
|
+
config_name: tsfulmen
|
|
7
|
+
description: TypeScript Fulmen SDK with developer CLIs
|
|
8
|
+
metadata:
|
|
9
|
+
license: MIT
|
|
10
|
+
repository_category: sdk
|
|
11
|
+
typescript:
|
|
12
|
+
package_name: "@fulmenhq/tsfulmen"
|
|
13
|
+
console_scripts:
|
|
14
|
+
- name: tsfulmen-schema
|
|
15
|
+
entry_point: ./dist/bin/schema-cli.js
|
|
16
|
+
- name: tsfulmen-signals
|
|
17
|
+
entry_point: ./dist/bin/signals-cli.js
|
|
@@ -73,6 +73,34 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"validation_result": "pass"
|
|
76
|
+
},
|
|
77
|
+
"typescript_package": {
|
|
78
|
+
"input_file": "fixtures/valid/typescript-package.yaml",
|
|
79
|
+
"expected_output": {
|
|
80
|
+
"binary_name": "tsfulmen",
|
|
81
|
+
"vendor": "fulmenhq",
|
|
82
|
+
"env_prefix": "TSFULMEN_",
|
|
83
|
+
"config_name": "tsfulmen",
|
|
84
|
+
"description": "TypeScript Fulmen SDK with developer CLIs",
|
|
85
|
+
"metadata": {
|
|
86
|
+
"license": "MIT",
|
|
87
|
+
"repository_category": "sdk",
|
|
88
|
+
"typescript": {
|
|
89
|
+
"package_name": "@fulmenhq/tsfulmen",
|
|
90
|
+
"console_scripts": [
|
|
91
|
+
{
|
|
92
|
+
"name": "tsfulmen-schema",
|
|
93
|
+
"entry_point": "./dist/bin/schema-cli.js"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "tsfulmen-signals",
|
|
97
|
+
"entry_point": "./dist/bin/signals-cli.js"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"validation_result": "pass"
|
|
76
104
|
}
|
|
77
105
|
},
|
|
78
106
|
"invalid": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as Identity, L as LoadIdentityOptions } from '../types-
|
|
2
|
-
export { A as AppIdentity, a as IdentityMetadata, P as PythonMetadata,
|
|
1
|
+
import { I as Identity, R as RegisterEmbeddedIdentityOptions, L as LoadIdentityOptions } from '../types-CHDvDRCf.js';
|
|
2
|
+
export { A as AppIdentity, a as IdentityMetadata, P as PythonMetadata, b as RepositoryCategory } from '../types-CHDvDRCf.js';
|
|
3
3
|
import { F as FulmenError } from '../fulmen-error-B_kX8jSC.js';
|
|
4
4
|
import { b as SchemaValidationDiagnostic } from '../types-DdoeE7F5.js';
|
|
5
5
|
|
|
@@ -50,10 +50,11 @@ declare const MAX_ANCESTOR_SEARCH_DEPTH = 20;
|
|
|
50
50
|
*
|
|
51
51
|
* Semantics:
|
|
52
52
|
* - First registration wins (subsequent calls throw error)
|
|
53
|
-
* - Validates against schema on registration
|
|
53
|
+
* - Validates against schema on registration (unless `skipValidation`)
|
|
54
54
|
* - Stores as immutable process-level fallback
|
|
55
55
|
*
|
|
56
56
|
* @param data - YAML string or pre-parsed Identity object
|
|
57
|
+
* @param options - Optional registration options (see {@link RegisterEmbeddedIdentityOptions})
|
|
57
58
|
* @throws {AppIdentityError} If already registered or validation fails
|
|
58
59
|
*
|
|
59
60
|
* @example
|
|
@@ -75,8 +76,17 @@ declare const MAX_ANCESTOR_SEARCH_DEPTH = 20;
|
|
|
75
76
|
* // Embedded identity not available - discovery will use filesystem
|
|
76
77
|
* }
|
|
77
78
|
* ```
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* // In a `bun --compile` single-file binary, the FS-backed schema registry
|
|
83
|
+
* // is unavailable. Register a build-time-embedded, CI-validated identity
|
|
84
|
+
* // without re-validating against the (absent) schema registry:
|
|
85
|
+
* import embeddedYaml from "./app-identity.embedded.js"; // inlined at build
|
|
86
|
+
* registerEmbeddedIdentity(embeddedYaml, { skipValidation: true });
|
|
87
|
+
* ```
|
|
78
88
|
*/
|
|
79
|
-
declare function registerEmbeddedIdentity(data: string | Identity): Promise<void>;
|
|
89
|
+
declare function registerEmbeddedIdentity(data: string | Identity, options?: RegisterEmbeddedIdentityOptions): Promise<void>;
|
|
80
90
|
/**
|
|
81
91
|
* Check if embedded identity has been registered
|
|
82
92
|
*
|
|
@@ -305,4 +315,4 @@ interface BuildRuntimeInfoOptions {
|
|
|
305
315
|
*/
|
|
306
316
|
declare function buildRuntimeInfo(options?: BuildRuntimeInfoOptions): RuntimeInfo;
|
|
307
317
|
|
|
308
|
-
export { APP_IDENTITY_DIR, APP_IDENTITY_ENV_VAR, APP_IDENTITY_FILENAME, APP_IDENTITY_SCHEMA_ID, AppIdentityError, type BuildRuntimeInfoOptions, type ConfigIdentifiers, Identity, LoadIdentityOptions, MAX_ANCESTOR_SEARCH_DEPTH, type RuntimeInfo, type RuntimeName, buildEnvVar, buildRuntimeInfo, clearEmbeddedIdentity, clearIdentityCache, getBinaryName, getCachedIdentity, getConfigIdentifiers, getConfigName, getEmbeddedIdentity, getEnvPrefix, getEnvVar, getTelemetryNamespace, getVendor, hasEmbeddedIdentity, loadIdentity, registerEmbeddedIdentity };
|
|
318
|
+
export { APP_IDENTITY_DIR, APP_IDENTITY_ENV_VAR, APP_IDENTITY_FILENAME, APP_IDENTITY_SCHEMA_ID, AppIdentityError, type BuildRuntimeInfoOptions, type ConfigIdentifiers, Identity, LoadIdentityOptions, MAX_ANCESTOR_SEARCH_DEPTH, RegisterEmbeddedIdentityOptions, type RuntimeInfo, type RuntimeName, buildEnvVar, buildRuntimeInfo, clearEmbeddedIdentity, clearIdentityCache, getBinaryName, getCachedIdentity, getConfigIdentifiers, getConfigName, getEmbeddedIdentity, getEnvPrefix, getEnvVar, getTelemetryNamespace, getVendor, hasEmbeddedIdentity, loadIdentity, registerEmbeddedIdentity };
|
|
@@ -1915,10 +1915,11 @@ function deepFreeze(obj) {
|
|
|
1915
1915
|
});
|
|
1916
1916
|
return obj;
|
|
1917
1917
|
}
|
|
1918
|
-
async function registerEmbeddedIdentity(data) {
|
|
1918
|
+
async function registerEmbeddedIdentity(data, options) {
|
|
1919
1919
|
if (isRegistered) {
|
|
1920
1920
|
throw AppIdentityError.alreadyRegistered();
|
|
1921
1921
|
}
|
|
1922
|
+
const skipValidation = options?.skipValidation ?? false;
|
|
1922
1923
|
let identity;
|
|
1923
1924
|
if (typeof data === "string") {
|
|
1924
1925
|
let parsed;
|
|
@@ -1929,15 +1930,19 @@ async function registerEmbeddedIdentity(data) {
|
|
|
1929
1930
|
error instanceof Error ? error : new Error(String(error))
|
|
1930
1931
|
);
|
|
1931
1932
|
}
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1933
|
+
if (!skipValidation) {
|
|
1934
|
+
const result = await validateDataBySchemaId(parsed, APP_IDENTITY_SCHEMA_ID);
|
|
1935
|
+
if (!result.valid) {
|
|
1936
|
+
throw AppIdentityError.embeddedValidationFailed(result.diagnostics);
|
|
1937
|
+
}
|
|
1935
1938
|
}
|
|
1936
1939
|
identity = parsed;
|
|
1937
1940
|
} else {
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
+
if (!skipValidation) {
|
|
1942
|
+
const result = await validateDataBySchemaId(data, APP_IDENTITY_SCHEMA_ID);
|
|
1943
|
+
if (!result.valid) {
|
|
1944
|
+
throw AppIdentityError.embeddedValidationFailed(result.diagnostics);
|
|
1945
|
+
}
|
|
1941
1946
|
}
|
|
1942
1947
|
identity = data;
|
|
1943
1948
|
}
|