asphodelos 0.3.0 → 0.3.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.
@@ -1,4 +1,3 @@
1
- //#region src/vite-plugin/index.d.ts
2
1
  /**
3
2
  * The Vite plugin: regenerates on every change to `asphodelos.config.ts` or to the documents it
4
3
  * names, and reloads the browser when the output actually changed.
@@ -6,6 +5,4 @@
6
5
  * Every pass — the first one, a config edit, a document edit — goes through one queue, so no two
7
6
  * passes ever interleave their cleanup with each other's writes.
8
7
  */
9
- declare function asphodelosVite(): any;
10
- //#endregion
11
- export { asphodelosVite };
8
+ export declare function asphodelosVite(): any;
@@ -1,19 +1,13 @@
1
- import { parseConfig } from "../index.mjs";
2
- import { t as FormatOptions } from "../format-B0W7HIAg.mjs";
3
- import { a as makeJob, c as fileSystemLayer, i as jobTargets, n as isInsideDirectory, o as outsideSources, r as isUserCodeJob, t as cleanSplitOutputs } from "../shared-Becl66EY.mjs";
4
- import { n as parseOpenAPI } from "../openapi-C8b6Ibiu.mjs";
1
+ import { INPUT_EXTENSIONS, parseConfig } from "../index.mjs";
2
+ import { t as FormatOptions } from "../format-DC258z--.mjs";
3
+ import { a as makeJob, c as fileSystemLayer, i as jobTargets, n as isInsideDirectory, o as outsideSources, r as isUserCodeJob, t as cleanSplitOutputs } from "../shared-nkpRcjdg.mjs";
4
+ import { n as parseOpenAPI } from "../openapi-4yNuDK_n.mjs";
5
5
  import { Effect, FileSystem, Result } from "effect";
6
6
  import path from "node:path";
7
7
  import crypto from "node:crypto";
8
- //#region src/vite-plugin/index.ts
8
+ // src/vite-plugin/index.ts
9
9
  /** The config file the plugin reads, from the directory Vite was started in. */
10
10
  const CONFIG_FILE = "asphodelos.config.ts";
11
- /** Extensions a change has to carry to be worth regenerating for — the set `--watch` reacts to. */
12
- const INPUT_EXTENSIONS = [
13
- ".yaml",
14
- ".json",
15
- ".tsp"
16
- ];
17
11
  /**
18
12
  * How long a burst of filesystem events is let settle before a pass runs.
19
13
  *
@@ -127,7 +121,7 @@ function hashInputs(directory, outside) {
127
121
  return Effect.gen(function* () {
128
122
  const fs = yield* FileSystem.FileSystem;
129
123
  const inside = (yield* listFiles(directory)).filter(isInputFile);
130
- const files = [...new Set([...inside, ...outside])].toSorted();
124
+ const files = [.../* @__PURE__ */ new Set([...inside, ...outside])].toSorted();
131
125
  if (files.length === 0) return null;
132
126
  const contents = yield* Effect.all(files.map((file) => fs.readFileString(file).pipe(Effect.orElseSucceed(() => null))), { concurrency: "unbounded" });
133
127
  if (contents.includes(null)) return null;
@@ -351,5 +345,4 @@ function asphodelosVite() {
351
345
  }
352
346
  };
353
347
  }
354
- //#endregion
355
348
  export { asphodelosVite };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asphodelos",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Asphodelos is a code generator from OpenAPI to Elysia",
5
5
  "keywords": [
6
6
  "elysia",
@@ -42,25 +42,25 @@
42
42
  "typecheck": "tsc --noEmit"
43
43
  },
44
44
  "dependencies": {
45
- "@apidevtools/swagger-parser": "^12.1.0",
46
- "@effect/platform-node": "4.0.0",
47
- "@effect/platform-node-shared": "4.0.0",
48
- "@typespec/compiler": "^1.16.0",
49
- "@typespec/openapi3": "^1.16.0",
50
- "effect": "4.0.0",
51
- "oxfmt": "^0.67.0",
52
- "ts-morph": "^28.0.0"
45
+ "@apidevtools/swagger-parser": "^13.1.0",
46
+ "@effect/platform-node": "4.0.6",
47
+ "@effect/platform-node-shared": "4.0.6",
48
+ "@typespec/compiler": "^1.17.0",
49
+ "@typespec/openapi3": "^1.17.0",
50
+ "effect": "4.0.6",
51
+ "oxc-parser": "^0.155.0",
52
+ "oxfmt": "^0.74.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@faker-js/faker": "^10.6.0",
56
- "@sinclair/typebox": "^0.34.49",
56
+ "@sinclair/typebox": "^0.34.52",
57
57
  "@types/bun": "latest",
58
- "@typespec/http": "^1.16.0",
59
- "@typespec/rest": "^0.86.0",
60
- "@typespec/versioning": "^0.86.0",
61
- "elysia": "^1.4.28",
62
- "oxlint": "^1.82.0",
63
- "oxlint-tsgolint": "^7.0.2001",
64
- "tsdown": "^0.21.10"
58
+ "@typespec/http": "^1.17.0",
59
+ "@typespec/rest": "^0.87.0",
60
+ "@typespec/versioning": "^0.87.0",
61
+ "elysia": "^1.4.30",
62
+ "oxlint": "^1.89.0",
63
+ "oxlint-tsgolint": "^7.0.2005",
64
+ "tsdown": "^0.23.1"
65
65
  }
66
66
  }