@powerlines/plugin-untyped 0.2.631 → 0.2.633

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.
Files changed (2) hide show
  1. package/README.md +39 -0
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -74,6 +74,45 @@ A Powerlines plugin to use [untyped](https://github.com/unjs/untyped) for code g
74
74
 
75
75
  <!-- END doctoc -->
76
76
 
77
+ ## Features
78
+
79
+ - Generates code from [Untyped](https://unjs.io/packages/untyped) schemas
80
+ - Finds schemas matching `{root}/**/{untyped.ts,*.untyped.ts}` by default
81
+ - Writes output files next to each schema file unless `outputPath` is set
82
+ - Runs generation during the `prepare` command through the `prepare` hook
83
+
84
+ ## Usage
85
+
86
+ Install the plugin:
87
+
88
+ ```bash
89
+ pnpm add @powerlines/plugin-untyped
90
+ ```
91
+
92
+ Register it in `powerlines.config.ts`:
93
+
94
+ ```ts
95
+ import { plugin as untyped } from "@powerlines/plugin-untyped";
96
+ import { defineConfig } from "powerlines/config";
97
+
98
+ export default defineConfig({
99
+ plugins: [untyped()]
100
+ });
101
+ ```
102
+
103
+ Run the `prepare` command to generate from schemas. To set schema paths:
104
+
105
+ ```ts
106
+ export default defineConfig({
107
+ plugins: [
108
+ untyped({
109
+ schema: "src/config/*.untyped.ts",
110
+ outputPath: "dist/generated"
111
+ })
112
+ ]
113
+ });
114
+ ```
115
+
77
116
  ## Installing
78
117
 
79
118
  Using [pnpm](http://pnpm.io):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-untyped",
3
- "version": "0.2.631",
3
+ "version": "0.2.633",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to use Untyped for code generation based on user-defined schemas.",
6
6
  "repository": {
@@ -89,16 +89,16 @@
89
89
  "files": ["dist"],
90
90
  "keywords": ["untyped", "powerlines", "powerlines-plugin"],
91
91
  "dependencies": {
92
- "@storm-software/untyped": "^0.24.293",
92
+ "@storm-software/untyped": "^0.24.296",
93
93
  "@stryke/convert": "^0.7.47",
94
- "powerlines": "^0.47.215",
94
+ "powerlines": "^0.47.217",
95
95
  "untyped": "^1.5.2"
96
96
  },
97
97
  "devDependencies": {
98
- "@powerlines/plugin-plugin": "^0.12.628",
98
+ "@powerlines/plugin-plugin": "^0.12.630",
99
99
  "@types/node": "^25.9.9"
100
100
  },
101
101
  "publishConfig": { "access": "public" },
102
102
  "types": "./dist/index.d.cts",
103
- "gitHead": "810bc635d1503594d09d9f0c8c93ea413745a9df"
103
+ "gitHead": "bb4e1f2b32a8bb9d20559ca7c3df3a2f30a0d14e"
104
104
  }