@ontrails/config 1.0.0-beta.39 → 1.0.0-beta.41

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # @ontrails/config
2
2
 
3
+ ## 1.0.0-beta.41
4
+
5
+ ## 1.0.0-beta.40
6
+
7
+ ### Minor Changes
8
+
9
+ - [`5adb995`](https://github.com/outfitter-dev/trails/commit/5adb99551c2dda6190d46cce7f60bb08d63c99aa): Complete the v1 hard cutover from the authored `blaze` field to
10
+ `implementation` across trail contracts, surface projections, tests, examples,
11
+ and public source-analysis helpers. Existing applications must rename authored
12
+ trail behavior fields and direct trail-object access before upgrading.
13
+
3
14
  ## 1.0.0-beta.39
4
15
 
5
16
  ## 1.0.0-beta.38
package/README.md CHANGED
@@ -68,7 +68,7 @@ import { configResource } from '@ontrails/config';
68
68
 
69
69
  export const getStatus = trail('status.get', {
70
70
  resources: [configResource],
71
- blaze: (_input, ctx) => {
71
+ implementation: (_input, ctx) => {
72
72
  const state = configResource.from(ctx);
73
73
  return Result.ok({
74
74
  port: state.resolved.port,
@@ -155,7 +155,7 @@ import { configResource } from '@ontrails/config';
155
155
 
156
156
  export const myTrail = trail('my.trail', {
157
157
  resources: [configResource],
158
- blaze: (_input, ctx) => {
158
+ implementation: (_input, ctx) => {
159
159
  const state = configResource.from(ctx);
160
160
  return Result.ok(state.resolved);
161
161
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ontrails/config",
3
- "version": "1.0.0-beta.39",
3
+ "version": "1.0.0-beta.41",
4
4
  "files": [
5
5
  "src/**/*.ts",
6
6
  "!src/**/__tests__/**",
@@ -22,7 +22,7 @@
22
22
  "clean": "rm -rf dist *.tsbuildinfo"
23
23
  },
24
24
  "peerDependencies": {
25
- "@ontrails/core": "^1.0.0-beta.39",
25
+ "@ontrails/core": "^1.0.0-beta.41",
26
26
  "zod": "^4.3.5"
27
27
  }
28
28
  }
@@ -67,7 +67,13 @@ const redactSecretFields = (
67
67
  };
68
68
 
69
69
  export const configCheck = trail('config.check', {
70
- blaze: (input, ctx) => {
70
+ examples: [
71
+ {
72
+ input: {},
73
+ name: 'Check current config',
74
+ },
75
+ ],
76
+ implementation: (input, ctx) => {
71
77
  const state = configResource.from(ctx);
72
78
  const effective = mergeValues(state.resolved, input.values);
73
79
  const checked = checkConfig(state.schema, effective);
@@ -76,12 +82,6 @@ export const configCheck = trail('config.check', {
76
82
  valid: checked.valid,
77
83
  });
78
84
  },
79
- examples: [
80
- {
81
- input: {},
82
- name: 'Check current config',
83
- },
84
- ],
85
85
  input: z.object({
86
86
  values: z
87
87
  .record(z.string(), z.unknown())
@@ -25,17 +25,17 @@ const outputSchema = z.object({
25
25
  });
26
26
 
27
27
  export const configDescribe = trail('config.describe', {
28
- blaze: (_input, ctx) => {
29
- const state = configResource.from(ctx);
30
- const fields = deriveConfigFields(state.schema);
31
- return Result.ok({ fields: [...fields] });
32
- },
33
28
  examples: [
34
29
  {
35
30
  input: {},
36
31
  name: 'Describe all config fields',
37
32
  },
38
33
  ],
34
+ implementation: (_input, ctx) => {
35
+ const state = configResource.from(ctx);
36
+ const fields = deriveConfigFields(state.schema);
37
+ return Result.ok({ fields: [...fields] });
38
+ },
39
39
  input: z.object({}),
40
40
  intent: 'read',
41
41
  meta: { category: 'infrastructure' },
@@ -67,19 +67,19 @@ const enrichOptions = (
67
67
  };
68
68
 
69
69
  export const configExplain = trail('config.explain', {
70
- blaze: (input, ctx) => {
71
- const state = configResource.from(ctx);
72
- const options = enrichOptions(state, toExplainOptions(state));
73
- const entries = deriveConfigProvenance(options);
74
- const filtered = filterByPath(entries, input.path);
75
- return Result.ok({ entries: [...filtered] });
76
- },
77
70
  examples: [
78
71
  {
79
72
  input: {},
80
73
  name: 'Explain all fields',
81
74
  },
82
75
  ],
76
+ implementation: (input, ctx) => {
77
+ const state = configResource.from(ctx);
78
+ const options = enrichOptions(state, toExplainOptions(state));
79
+ const entries = deriveConfigProvenance(options);
80
+ const filtered = filterByPath(entries, input.path);
81
+ return Result.ok({ entries: [...filtered] });
82
+ },
83
83
  input: z.object({
84
84
  path: z
85
85
  .string()
@@ -62,7 +62,13 @@ const writeArtifacts = async (
62
62
  };
63
63
 
64
64
  export const configInit = trail('config.init', {
65
- blaze: async (input, ctx) => {
65
+ examples: [
66
+ {
67
+ input: {},
68
+ name: 'Generate TOML example',
69
+ },
70
+ ],
71
+ implementation: async (input, ctx) => {
66
72
  const state = configResource.from(ctx);
67
73
  const schema = state.schema as z.ZodObject<Record<string, z.ZodType>>;
68
74
  const content = deriveConfigExample(schema, input.format);
@@ -74,12 +80,6 @@ export const configInit = trail('config.init', {
74
80
 
75
81
  return Result.ok({ content, format: input.format });
76
82
  },
77
- examples: [
78
- {
79
- input: {},
80
- name: 'Generate TOML example',
81
- },
82
- ],
83
83
  input: zod.object({
84
84
  dir: zod
85
85
  .string()