@shipworthy/openapi-generator 0.0.1 → 0.0.2

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 +2 -2
  2. package/package.json +3 -6
package/README.md CHANGED
@@ -12,7 +12,7 @@ bun add @shipworthy/openapi-generator effect @effect/platform-node
12
12
 
13
13
  Requirements:
14
14
 
15
- - **`effect` `^4.0.0`.** This is a peer dependency, so install it yourself. Every package then shares one copy of `effect`, which you use to build, run, and provide services to the returned `Effect`.
15
+ - **`effect` `^4.0.0`.** The package depends on it. Your code uses `effect` to build, run, and provide services to the returned `Effect`, so add a compatible version to your `package.json` so both resolve to one copy.
16
16
  - **`@effect/platform-node` `^4.0.0`**, only because the examples below import `NodeServices` from it. `@shipworthy/openapi-parser` already depends on it, but your own code needs it in your `package.json` to import it.
17
17
  - **A platform layer.** `generate` requires the `FileSystem`, `Path`, and `HttpClient` services. Provide them with `NodeServices.layer` from `@effect/platform-node` or `BunServices.layer` from `@effect/platform-bun`, plus `FetchHttpClient.layer` from `effect/http`. `HttpClient` is required even when the source is inline, because it's part of the effect's type.
18
18
  - **ESM only.** The package is `"type": "module"` and ships compiled ESM JavaScript with `.d.ts` declarations. It has no CommonJS build, and it needs no TypeScript loader or bundler.
@@ -284,7 +284,7 @@ Defects, such as an `Effect.die` inside a plugin's effect, aren't converted to `
284
284
 
285
285
  - Entry point: `import { generate, importPlugin, ModuleLoader, ResolveError, TransformError, MissingPlugin, InvalidPlugin, type Generator, type GenerateOptions, type GenerateError } from "@shipworthy/openapi-generator"`.
286
286
  - `generate({ specifier, exportName, source, cwd?, pluginOptions? })` returns `Effect<unknown, GenerateError, FileSystem | Path | HttpClient>`. It's not a Promise. Run it with `Effect.runPromise` after providing `NodeServices.layer` (or `BunServices.layer`) and `FetchHttpClient.layer`.
287
- - Requires `effect` `^4.0.0` (peer dependency). ESM only, compiled JavaScript. Runs on Node.js `>=22.19.0` or Bun.
287
+ - Depends on `effect` `^4.0.0`. ESM only, compiled JavaScript. Runs on Node.js `>=22.19.0` or Bun.
288
288
  - Pipeline: bundle (`ResolveError`), then decode to `ParsedService` (`TransformError`), then import the plugin (`MissingPlugin` / `InvalidPlugin`), then `plugin.generate(model, pluginOptions ?? {})` (plugin failures become `TransformError`).
289
289
  - File-path strings are parsed as YAML text. Pass `URL` objects for files. Strings starting with `http(s)://` or `file://` are fetched or read.
290
290
  - OpenAPI 3.0 is upgraded to 3.1. Swagger 2.0 is rejected.
package/package.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "name": "@shipworthy/openapi-generator",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
7
7
  "dependencies": {
8
- "@shipworthy/openapi-parser": "0.0.1",
9
- "@shipworthy/openapi-transformer": "0.0.1"
10
- },
11
- "peerDependencies": {
8
+ "@shipworthy/openapi-parser": "0.0.2",
9
+ "@shipworthy/openapi-transformer": "0.0.2",
12
10
  "effect": "^4.0.0"
13
11
  },
14
12
  "description": "Load, resolve, and parse an OpenAPI document, then run one generator plugin.",
@@ -34,7 +32,6 @@
34
32
  "@effect/vitest": "4.0.0",
35
33
  "@shipworthy/typescript-config": "0.0.1",
36
34
  "@types/node": "^24.10.3",
37
- "effect": "^4.0.0",
38
35
  "typescript": "^7.0.2",
39
36
  "vitest": "5.0.3"
40
37
  },