@ontrails/core 0.2.2 → 0.2.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ontrails/core
2
2
 
3
+ ## 0.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`06b53ef`](https://github.com/outfitter-dev/trails/commit/06b53ef053b4dab5ac8cdcc7ffcf260a9f1260e8): Derive CLI flags and structured input channels from defaulted top-level object schemas, so scaffolded `hello --name` and other optional-input trails accept their declared fields.
8
+
3
9
  ## 0.2.2
4
10
 
5
11
  No changes in this release.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ontrails/core",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/outfitter-dev/trails.git",
package/src/derive.ts CHANGED
@@ -466,7 +466,7 @@ export const deriveFields = (
466
466
  schema: z.ZodType,
467
467
  overrides?: Record<string, FieldOverride>
468
468
  ): Field[] => {
469
- const s = schema as unknown as ZodInternals;
469
+ const { inner: s } = unwrap(schema as unknown as ZodInternals);
470
470
  if ((s._zod.def['type'] as string) !== 'object') {
471
471
  return [];
472
472
  }