@r_masseater/masseater-utils 0.17.0 → 0.18.0

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.
@@ -0,0 +1,6 @@
1
+ /** @stability experimental */
2
+ import { resolveConfigFromFile } from "vite-plus";
3
+ declare global {
4
+ var masseaterResolvedViteConfigs: Map<string, ReturnType<typeof resolveConfigFromFile>> | undefined;
5
+ }
6
+ export declare const resolvedViteConfig: (file: string) => ReturnType<typeof resolveConfigFromFile>;
@@ -0,0 +1,16 @@
1
+ import { layer } from "@effect/platform-node/NodeServices";
2
+ import { Effect, FileSystem } from "effect";
3
+ import { resolveConfigFromFile } from "vite-plus";
4
+ // src/shared/lib/resolved-vite-config.ts
5
+ const sharedResolutions = () => {
6
+ globalThis.masseaterResolvedViteConfigs ??= /* @__PURE__ */ new Map();
7
+ return globalThis.masseaterResolvedViteConfigs;
8
+ };
9
+ const resolution = Effect.fn("resolution")(function* resolution(file) {
10
+ const text = yield* (yield* FileSystem.FileSystem).readFileString(file);
11
+ return yield* Effect.promise(() => sharedResolutions().getOrInsertComputed(`${file}\0${text}`, () => resolveConfigFromFile(file)));
12
+ });
13
+ const resolvedViteConfig = (file) => Effect.runPromise(resolution(file).pipe(Effect.provide(layer)));
14
+ export { resolvedViteConfig };
15
+
16
+ //# sourceMappingURL=vite-config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite-config.mjs","names":["nodeServices"],"sources":["../src/shared/lib/resolved-vite-config.ts"],"sourcesContent":["import { layer as nodeServices } from \"@effect/platform-node/NodeServices\";\nimport { Effect, FileSystem } from \"effect\";\nimport { resolveConfigFromFile } from \"vite-plus\";\n\ndeclare global {\n var masseaterResolvedViteConfigs:\n | Map<string, ReturnType<typeof resolveConfigFromFile>>\n | undefined;\n}\n\nconst sharedResolutions = (): Map<string, ReturnType<typeof resolveConfigFromFile>> => {\n globalThis.masseaterResolvedViteConfigs ??= new Map<\n string,\n ReturnType<typeof resolveConfigFromFile>\n >();\n return globalThis.masseaterResolvedViteConfigs;\n};\n\nconst resolution = Effect.fn(\"resolution\")(function* resolution(file: string) {\n const fileSystem = yield* FileSystem.FileSystem;\n const text = yield* fileSystem.readFileString(file);\n return yield* Effect.promise(() =>\n sharedResolutions().getOrInsertComputed(`${file}\\0${text}`, () => resolveConfigFromFile(file)),\n );\n});\n\nexport const resolvedViteConfig = (file: string): ReturnType<typeof resolveConfigFromFile> =>\n Effect.runPromise(resolution(file).pipe(Effect.provide(nodeServices)));\n"],"mappings":";;;;AAUA,MAAM,0BAAiF;CACrF,WAAW,iDAAiC,IAAI,IAG9C;CACF,OAAO,WAAW;AACpB;AAEA,MAAM,aAAa,OAAO,GAAG,YAAY,CAAC,CAAC,UAAU,WAAW,MAAc;CAE5E,MAAM,OAAO,QAAO,OADM,WAAW,WAAA,CACN,eAAe,IAAI;CAClD,OAAO,OAAO,OAAO,cACnB,kBAAkB,CAAC,CAAC,oBAAoB,GAAG,KAAK,IAAI,cAAc,sBAAsB,IAAI,CAAC,CAC/F;AACF,CAAC;AAED,MAAa,sBAAsB,SACjC,OAAO,WAAW,WAAW,IAAI,CAAC,CAAC,KAAK,OAAO,QAAQA,KAAY,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r_masseater/masseater-utils",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "The small shared libraries of masseater's repositories as subpaths of one package: a chip row for React, Claude Code plugin helpers, Effect entry points for Node.js and GitHub Actions, file import mapping, Node package readers, OTLP assertions for Vitest and Cloudflare Workers tracing, and what the Tauri desktop apps share: OpenTelemetry for the screens, Vite settings, the media-notes screens and the release commands.",
5
5
  "keywords": [
6
6
  "actions",
@@ -104,6 +104,7 @@
104
104
  "./skerm": "./dist/skerm.mjs",
105
105
  "./skerm.css": "./src/app/skerm.css",
106
106
  "./text": "./dist/text.mjs",
107
+ "./vite-config": "./dist/vite-config.mjs",
107
108
  "./ui/backdrop-palette": "./dist/ui/backdrop-palette.mjs",
108
109
  "./ui/badge": "./dist/ui/badge.mjs",
109
110
  "./ui/browser-runtime": "./dist/ui/browser-runtime.mjs",
@@ -8,7 +8,7 @@ description: >
8
8
  metadata:
9
9
  type: core
10
10
  library: "@r_masseater/masseater-utils"
11
- library_version: 0.17.0
11
+ library_version: 0.18.0
12
12
  sources:
13
13
  - src/app
14
14
  - src/features/scroll-chip-row
@@ -8,7 +8,7 @@ description: >
8
8
  metadata:
9
9
  type: core
10
10
  library: "@r_masseater/masseater-utils"
11
- library_version: 0.17.0
11
+ library_version: 0.18.0
12
12
  sources:
13
13
  - src/app
14
14
  - src/features/receive-otlp
@@ -8,7 +8,7 @@ description: >
8
8
  metadata:
9
9
  type: core
10
10
  library: "@r_masseater/masseater-utils"
11
- library_version: 0.17.0
11
+ library_version: 0.18.0
12
12
  sources:
13
13
  - src
14
14
  - bin
@@ -7,7 +7,7 @@ description: >
7
7
  metadata:
8
8
  type: core
9
9
  library: "@r_masseater/masseater-utils"
10
- library_version: 0.17.0
10
+ library_version: 0.18.0
11
11
  sources:
12
12
  - src/app
13
13
  - src/shared/lib/cache.ts
@@ -8,7 +8,7 @@ description: >
8
8
  metadata:
9
9
  type: core
10
10
  library: "@r_masseater/masseater-utils"
11
- library_version: 0.17.0
11
+ library_version: 0.18.0
12
12
  sources:
13
13
  - src/entities/segment
14
14
  - src/features/map-content
@@ -8,7 +8,7 @@ description: >
8
8
  metadata:
9
9
  type: core
10
10
  library: "@r_masseater/masseater-utils"
11
- library_version: 0.17.0
11
+ library_version: 0.18.0
12
12
  sources:
13
13
  - src/app/app-name.ts
14
14
  - src/features/name-app
@@ -8,7 +8,7 @@ description: >
8
8
  metadata:
9
9
  type: core
10
10
  library: "@r_masseater/masseater-utils"
11
- library_version: 0.17.0
11
+ library_version: 0.18.0
12
12
  sources:
13
13
  - src/app
14
14
  - src/features/run-main/model/hook-io.ts
@@ -9,7 +9,7 @@ description: >
9
9
  metadata:
10
10
  type: core
11
11
  library: "@r_masseater/masseater-utils"
12
- library_version: 0.17.0
12
+ library_version: 0.18.0
13
13
  sources:
14
14
  - src/app
15
15
  - src/entities/package-json
@@ -7,7 +7,7 @@ description: >
7
7
  metadata:
8
8
  type: core
9
9
  library: "@r_masseater/masseater-utils"
10
- library_version: 0.17.0
10
+ library_version: 0.18.0
11
11
  sources:
12
12
  - src/app
13
13
  - src/features/run-main
@@ -12,7 +12,7 @@ description: >
12
12
  metadata:
13
13
  type: core
14
14
  library: "@r_masseater/masseater-utils"
15
- library_version: 0.17.0
15
+ library_version: 0.18.0
16
16
  sources:
17
17
  - src/app
18
18
  - src/entities/rust-item
@@ -9,7 +9,7 @@ description: >
9
9
  metadata:
10
10
  type: core
11
11
  library: "@r_masseater/masseater-utils"
12
- library_version: 0.17.0
12
+ library_version: 0.18.0
13
13
  sources:
14
14
  - src/app
15
15
  - src/features/sink-traces
@@ -9,7 +9,7 @@ description: >
9
9
  metadata:
10
10
  type: core
11
11
  library: "@r_masseater/masseater-utils"
12
- library_version: 0.17.0
12
+ library_version: 0.18.0
13
13
  sources:
14
14
  - src/app
15
15
  - src/entities/embedding/model/text.ts
@@ -9,7 +9,7 @@ description: >
9
9
  metadata:
10
10
  type: core
11
11
  library: "@r_masseater/masseater-utils"
12
- library_version: 0.17.0
12
+ library_version: 0.18.0
13
13
  sources:
14
14
  - src/app
15
15
  - src/shared/api/github