@krak-stack/registry 0.1.35 → 0.1.36
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/README.md +39 -1
- package/dist/components/ui/data-table.js +1 -1
- package/dist/components/ui/effect-form.d.ts +1 -1
- package/dist/components/ui/effect-form.js +62 -59
- package/dist/components/ui/error-component.js +1 -1
- package/dist/components/ui/form.js +61 -58
- package/dist/components/ui/icon-input.js +66 -63
- package/dist/components/ui/sidebar-layout.js +2 -2
- package/dist/components/ui/virtualized-combobox.js +61 -58
- package/dist/lib/docs.js +3 -3
- package/dist/lib/docs.server.js +2 -2
- package/dist/lib/documentation-toolkit.d.ts +1 -1
- package/dist/lib/documentation-toolkit.js +3 -3
- package/dist/lib/httpapi-cli.d.ts +2 -2
- package/dist/lib/httpapi-cli.js +15 -15
- package/dist/lib/httpapi-client.d.ts +3 -3
- package/dist/lib/httpapi-client.js +2 -2
- package/dist/lib/httpapi-helpers.d.ts +1 -1
- package/dist/lib/httpapi-helpers.js +1 -1
- package/dist/lib/httpapi-mcp.d.ts +2 -2
- package/dist/lib/httpapi-mcp.js +4 -4
- package/dist/lib/httpapi-toolkit.d.ts +1 -1
- package/dist/lib/httpapi-toolkit.js +4 -4
- package/dist/lib/query.js +2 -2
- package/dist/lib/webfetch-toolkit.d.ts +2 -2
- package/dist/lib/webfetch-toolkit.js +4 -4
- package/dist/services/agent/client/atom.d.ts +1 -1
- package/dist/services/agent/client/index.js +4 -4
- package/dist/services/agent/index.d.ts +1 -1
- package/dist/services/agent/index.js +1 -1
- package/dist/services/agent/schema.d.ts +1 -1
- package/dist/services/agent/schema.js +3 -3
- package/dist/services/health/api.builder.d.ts +10 -10
- package/dist/services/health/api.group.d.ts +1 -1
- package/dist/services/health/index.js +2 -2
- package/dist/services/notification/channels/ses/index.js +4 -4
- package/dist/services/opentelemetry/api.d.ts +2 -2
- package/dist/services/opentelemetry/api.js +4 -4
- package/dist/services/opentelemetry/browser.d.ts +1 -1
- package/dist/services/opentelemetry/browser.js +2 -2
- package/dist/services/s3/index.js +6 -6
- package/package.json +7 -5
- package/patches/@lucas-barake%2Feffect-form-react@0.26.0-beta.5.patch +66 -0
- package/patches/@lucas-barake%2Feffect-form@0.25.0-beta.6.patch +86 -0
- package/patches/README.md +31 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { HttpRouter } from "effect/
|
|
2
|
-
import { HttpApiBuilder, HttpApiGroup } from "effect/
|
|
1
|
+
import { HttpRouter } from "effect/http";
|
|
2
|
+
import { HttpApiBuilder, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import { HealthApiGroup } from "./api.group.js";
|
|
4
4
|
import { HealthService } from "./index.js";
|
|
5
5
|
export declare const healthHandler: <const Prefix extends HttpRouter.PathInput>(handlers: HttpApiBuilder.Handlers.FromGroup<HttpApiGroup.AddPrefix<typeof HealthApiGroup, Prefix>>) => HttpApiBuilder.Handlers<HttpRouter.Request<"Requires", HealthService>, {
|
|
6
|
-
readonly getHealth: import("effect/
|
|
6
|
+
readonly getHealth: import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getHealth", "GET", `${Prefix}/health`, never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
7
7
|
readonly status: import("effect/Schema").Literal<"UP">;
|
|
8
8
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
9
9
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
@@ -17,8 +17,8 @@ export declare const healthHandler: <const Prefix extends HttpRouter.PathInput>(
|
|
|
17
17
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
18
18
|
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Number]>>>;
|
|
19
19
|
}>>;
|
|
20
|
-
}> | typeof import("effect/
|
|
21
|
-
readonly getLiveness: import("effect/
|
|
20
|
+
}> | typeof import("effect/http-api/HttpApiError").InternalServerError>, never, never>;
|
|
21
|
+
readonly getLiveness: import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getLiveness", "GET", `${Prefix}/health/live`, never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
22
22
|
readonly status: import("effect/Schema").Literal<"UP">;
|
|
23
23
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
24
24
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
@@ -32,8 +32,8 @@ export declare const healthHandler: <const Prefix extends HttpRouter.PathInput>(
|
|
|
32
32
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
33
33
|
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Number]>>>;
|
|
34
34
|
}>>;
|
|
35
|
-
}> | typeof import("effect/
|
|
36
|
-
readonly getReadiness: import("effect/
|
|
35
|
+
}> | typeof import("effect/http-api/HttpApiError").InternalServerError>, never, never>;
|
|
36
|
+
readonly getReadiness: import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getReadiness", "GET", `${Prefix}/health/ready`, never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
37
37
|
readonly status: import("effect/Schema").Literal<"UP">;
|
|
38
38
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
39
39
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
@@ -47,8 +47,8 @@ export declare const healthHandler: <const Prefix extends HttpRouter.PathInput>(
|
|
|
47
47
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
48
48
|
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Number]>>>;
|
|
49
49
|
}>>;
|
|
50
|
-
}> | typeof import("effect/
|
|
51
|
-
readonly getStartup: import("effect/
|
|
50
|
+
}> | typeof import("effect/http-api/HttpApiError").InternalServerError>, never, never>;
|
|
51
|
+
readonly getStartup: import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getStartup", "GET", `${Prefix}/health/started`, never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
52
52
|
readonly status: import("effect/Schema").Literal<"UP">;
|
|
53
53
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
54
54
|
readonly name: import("effect/Schema").NonEmptyString;
|
|
@@ -62,5 +62,5 @@ export declare const healthHandler: <const Prefix extends HttpRouter.PathInput>(
|
|
|
62
62
|
readonly status: import("effect/Schema").Literals<readonly ["UP", "DOWN"]>;
|
|
63
63
|
readonly data: import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").Boolean, import("effect/Schema").Number]>>>;
|
|
64
64
|
}>>;
|
|
65
|
-
}> | typeof import("effect/
|
|
65
|
+
}> | typeof import("effect/http-api/HttpApiError").InternalServerError>, never, never>;
|
|
66
66
|
}, "getHealth" | "getLiveness" | "getReadiness" | "getStartup">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/
|
|
1
|
+
import { HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/http-api";
|
|
2
2
|
export declare const HealthApiGroup: HttpApiGroup.HttpApiGroup<"health", HttpApiEndpoint.HttpApiEndpoint<"getHealth", "GET", "/health", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
3
3
|
readonly status: import("effect/Schema").Literal<"UP">;
|
|
4
4
|
readonly checks: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
HttpApiError,
|
|
12
12
|
HttpApiGroup,
|
|
13
13
|
OpenApi
|
|
14
|
-
} from "effect/
|
|
14
|
+
} from "effect/http-api";
|
|
15
15
|
|
|
16
16
|
// ../../src/services/health/schema.ts
|
|
17
17
|
import { Schema } from "effect";
|
|
18
|
-
import { HttpApiSchema } from "effect/
|
|
18
|
+
import { HttpApiSchema } from "effect/http-api";
|
|
19
19
|
var HealthStatus = Schema.Literals(["UP", "DOWN"]).annotate({
|
|
20
20
|
identifier: "HealthStatus",
|
|
21
21
|
title: "Health Status",
|
|
@@ -67,10 +67,10 @@ var SesEmailNotification = Schema2.Struct({
|
|
|
67
67
|
// ../../src/services/notification/channels/ses/index.ts
|
|
68
68
|
class SesNotificationConfig extends Context.Service()("SesNotificationConfig", {
|
|
69
69
|
make: Effect.gen(function* () {
|
|
70
|
-
const region = yield* Config.
|
|
71
|
-
const id = yield* Config.
|
|
72
|
-
const secret = yield* Config.
|
|
73
|
-
const from = yield* Config.
|
|
70
|
+
const region = yield* Config.String("SES_REGION");
|
|
71
|
+
const id = yield* Config.Redacted("SES_ACCESS_KEY_ID");
|
|
72
|
+
const secret = yield* Config.Redacted("SES_SECRET_ACCESS_KEY");
|
|
73
|
+
const from = yield* Config.String("NOTIFICATION_EMAIL_FROM").pipe(Config.orElse(() => Config.succeed("")));
|
|
74
74
|
return {
|
|
75
75
|
identity: { region, from: from || undefined },
|
|
76
76
|
accessKey: { id, secret }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Config, Layer } from "effect";
|
|
2
|
-
import { HttpRouter } from "effect/
|
|
2
|
+
import { HttpRouter } from "effect/http";
|
|
3
3
|
export declare class HttpApiOtlp {
|
|
4
|
-
static readonly layer: Layer.Layer<import("effect/FileSystem").FileSystem | import("effect/
|
|
4
|
+
static readonly layer: Layer.Layer<import("effect/FileSystem").FileSystem | import("effect/http/Etag").Generator | import("effect/http/HttpPlatform").HttpPlatform | import("effect/Path").Path, Config.ConfigError, HttpRouter.HttpRouter>;
|
|
5
5
|
}
|
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
HttpServer,
|
|
10
10
|
HttpServerRequest,
|
|
11
11
|
HttpServerResponse
|
|
12
|
-
} from "effect/
|
|
13
|
-
import { Otlp, OtlpSerialization } from "effect/
|
|
12
|
+
} from "effect/http";
|
|
13
|
+
import { Otlp, OtlpSerialization } from "effect/observability";
|
|
14
14
|
var OpenTelemetryLive = Otlp.layerFromConfig().pipe(Layer.provide(OtlpSerialization.layerJson), Layer.provide(FetchHttpClient.layer));
|
|
15
15
|
var otlpProxyPaths = [
|
|
16
16
|
"/api/otel/v1/traces",
|
|
17
17
|
"/api/otel/v1/metrics",
|
|
18
18
|
"/api/otel/v1/logs"
|
|
19
19
|
];
|
|
20
|
-
var exporterConfig = (signal) => Config.schema(
|
|
20
|
+
var exporterConfig = (signal) => Config.schema(Schema.Array(Schema.String), `OTEL_${signal}_EXPORTER`).pipe(Config.map((exporters) => exporters.map((exporter) => exporter.toLowerCase().trim())), Config.withDefault([]));
|
|
21
21
|
var proxyOtlp = (baseUrl, signal) => Effect.gen(function* () {
|
|
22
22
|
const incoming = yield* HttpServerRequest.HttpServerRequest;
|
|
23
23
|
const client = yield* HttpClient.HttpClient;
|
|
@@ -35,7 +35,7 @@ var proxyOtlp = (baseUrl, signal) => Effect.gen(function* () {
|
|
|
35
35
|
});
|
|
36
36
|
}).pipe(Effect.withTracerEnabled(false), HttpMiddleware.withLoggerDisabled, Effect.catch((error) => Effect.logError("Failed to proxy browser telemetry", error).pipe(Effect.as(HttpServerResponse.empty({ status: 502 })))), Effect.provide(FetchHttpClient.layer));
|
|
37
37
|
var otlpProxyLayer = Layer.unwrap(Effect.gen(function* () {
|
|
38
|
-
const baseUrl = yield* Config.
|
|
38
|
+
const baseUrl = yield* Config.URL("OTEL_EXPORTER_OTLP_ENDPOINT");
|
|
39
39
|
const exporters = yield* Config.all({
|
|
40
40
|
logs: exporterConfig("LOGS"),
|
|
41
41
|
metrics: exporterConfig("METRICS"),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Layer } from "effect";
|
|
2
|
-
import { type Otlp, OtlpExporter, OtlpLogger, OtlpMetrics, OtlpTracer } from "effect/
|
|
2
|
+
import { type Otlp, OtlpExporter, OtlpLogger, OtlpMetrics, OtlpTracer } from "effect/observability";
|
|
3
3
|
type OtlpOptions = Parameters<typeof Otlp.layerJson>[0];
|
|
4
4
|
type SignalOptions<Options> = Omit<Options, "url" | "resource" | "headers">;
|
|
5
5
|
export interface BrowserOtlpOptions {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// ../../src/services/opentelemetry/browser.ts
|
|
2
2
|
import { Effect, FiberSet, Layer, Predicate, Schema, Stream } from "effect";
|
|
3
|
-
import { FetchHttpClient, HttpClientRequest } from "effect/
|
|
3
|
+
import { FetchHttpClient, HttpClientRequest } from "effect/http";
|
|
4
4
|
import {
|
|
5
5
|
OtlpExporter,
|
|
6
6
|
OtlpLogger,
|
|
7
7
|
OtlpMetrics,
|
|
8
8
|
OtlpSerialization,
|
|
9
9
|
OtlpTracer
|
|
10
|
-
} from "effect/
|
|
10
|
+
} from "effect/observability";
|
|
11
11
|
|
|
12
12
|
class BrowserReportedError extends Schema.TaggedError()("BrowserReportedError", {
|
|
13
13
|
type: Schema.Literals(["window.error", "unhandledrejection"]),
|
|
@@ -37,12 +37,12 @@ class S3ServiceError extends Schema.TaggedError()("S3ServiceError", {
|
|
|
37
37
|
// ../../src/services/s3/index.ts
|
|
38
38
|
class S3ServiceConfig extends Context.Service()("S3ServiceConfig", {
|
|
39
39
|
make: Effect.gen(function* () {
|
|
40
|
-
const accessKeyId = yield* Config.
|
|
41
|
-
const secretAccessKey = yield* Config.
|
|
42
|
-
const bucket = yield* Config.
|
|
43
|
-
const region = yield* Config.
|
|
44
|
-
const endpoint = yield* Config.
|
|
45
|
-
const sessionToken = yield* Config.
|
|
40
|
+
const accessKeyId = yield* Config.Redacted("S3_ACCESS_KEY_ID");
|
|
41
|
+
const secretAccessKey = yield* Config.Redacted("S3_SECRET_ACCESS_KEY");
|
|
42
|
+
const bucket = yield* Config.String("S3_BUCKET");
|
|
43
|
+
const region = yield* Config.String("S3_REGION").pipe(Config.withDefault(""));
|
|
44
|
+
const endpoint = yield* Config.String("S3_ENDPOINT").pipe(Config.withDefault(""));
|
|
45
|
+
const sessionToken = yield* Config.Redacted("S3_SESSION_TOKEN").pipe(Config.orElse(() => Config.succeed(Redacted.make(""))));
|
|
46
46
|
const options = {
|
|
47
47
|
accessKeyId: Redacted.value(accessKeyId),
|
|
48
48
|
secretAccessKey: Redacted.value(secretAccessKey),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krak-stack/registry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
4
4
|
"description": "Tree-shakable KrakStack components and Effect services.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
13
|
"README.md",
|
|
14
|
+
"patches",
|
|
14
15
|
"tailwind.css"
|
|
15
16
|
],
|
|
16
17
|
"type": "module",
|
|
@@ -231,7 +232,8 @@
|
|
|
231
232
|
},
|
|
232
233
|
"scripts": {
|
|
233
234
|
"build": "NODE_ENV=production bun run build.ts",
|
|
234
|
-
"
|
|
235
|
+
"check:release": "bun run build && bun -e 'await import(\"@lucas-barake/effect-form-react\"); await import(\"./dist/components/ui/effect-form.js\")'",
|
|
236
|
+
"prepack": "bun run check:release"
|
|
235
237
|
},
|
|
236
238
|
"dependencies": {
|
|
237
239
|
"@oxlint/plugins": "1.78.0"
|
|
@@ -239,8 +241,8 @@
|
|
|
239
241
|
"peerDependencies": {
|
|
240
242
|
"@aws-sdk/client-sesv2": "^3.1068.0",
|
|
241
243
|
"@base-ui/react": "^1.5.0",
|
|
242
|
-
"@effect/atom-react": "4.0.0
|
|
243
|
-
"@effect/platform-browser": "4.0.0
|
|
244
|
+
"@effect/atom-react": "^4.0.0",
|
|
245
|
+
"@effect/platform-browser": "^4.0.0",
|
|
244
246
|
"@iconify/react": "^6.0.2",
|
|
245
247
|
"@inlang/paraglide-js": "^2.19.0",
|
|
246
248
|
"@lucas-barake/effect-form": "0.25.0-beta.6",
|
|
@@ -254,7 +256,7 @@
|
|
|
254
256
|
"cmdk": "^1.1.1",
|
|
255
257
|
"cn": "^0.3.0",
|
|
256
258
|
"drizzle-orm": "^1.0.0-rc.4-5d5b77c",
|
|
257
|
-
"effect": "4.0.0
|
|
259
|
+
"effect": "^4.0.0",
|
|
258
260
|
"lucide-react": "^1.18.0",
|
|
259
261
|
"react": "^19.2.0",
|
|
260
262
|
"react-dom": "^19.2.0"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
diff --git a/dist/FormReact.d.ts b/dist/FormReact.d.ts
|
|
2
|
+
index 61b65ad3ef858a3d9994d4cfde7e47216d44b549..0431a57a4a27eefa43180fc19f04f887a25ebf24 100644
|
|
3
|
+
--- a/dist/FormReact.d.ts
|
|
4
|
+
+++ b/dist/FormReact.d.ts
|
|
5
|
+
@@ -4,8 +4,8 @@ import type * as FormBuilder from "@lucas-barake/effect-form/FormBuilder";
|
|
6
|
+
import type * as Effect from "effect/Effect";
|
|
7
|
+
import * as Option from "effect/Option";
|
|
8
|
+
import type * as Schema from "effect/Schema";
|
|
9
|
+
-import * as Atom from "effect/unstable/reactivity/Atom";
|
|
10
|
+
-import type * as AtomRegistry from "effect/unstable/reactivity/AtomRegistry";
|
|
11
|
+
+import * as Atom from "effect/reactivity/Atom";
|
|
12
|
+
+import type * as AtomRegistry from "effect/reactivity/AtomRegistry";
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
export type FieldValue<T> = FieldStateModule.FieldValue<T>;
|
|
15
|
+
export type FieldState<E> = FieldStateModule.FieldState<E>;
|
|
16
|
+
diff --git a/dist/FormReact.js b/dist/FormReact.js
|
|
17
|
+
index 03e34ec60b833b4dd220ac6faffe70b9138703cd..f313c18c5e6cdb7138e19180aeb0acd4281857fa 100644
|
|
18
|
+
--- a/dist/FormReact.js
|
|
19
|
+
+++ b/dist/FormReact.js
|
|
20
|
+
@@ -4,7 +4,7 @@ import { Field, FormAtoms } from "@lucas-barake/effect-form";
|
|
21
|
+
import { getNestedValue } from "@lucas-barake/effect-form/Path";
|
|
22
|
+
import * as Layer from "effect/Layer";
|
|
23
|
+
import * as Option from "effect/Option";
|
|
24
|
+
-import * as Atom from "effect/unstable/reactivity/Atom";
|
|
25
|
+
+import * as Atom from "effect/reactivity/Atom";
|
|
26
|
+
import * as React from "react";
|
|
27
|
+
import { createContext, useContext } from "react";
|
|
28
|
+
const ArrayItemContext = /*#__PURE__*/createContext(null);
|
|
29
|
+
diff --git a/package.json b/package.json
|
|
30
|
+
index 416aed4983dfb7dfc1528b3cca636b860ab0986e..048e49b01201623854c1c8f042044d3f5bd64703 100644
|
|
31
|
+
--- a/package.json
|
|
32
|
+
+++ b/package.json
|
|
33
|
+
@@ -41,14 +41,14 @@
|
|
34
|
+
"@lucas-barake/effect-form": "^0.25.0-beta.6"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
- "@effect/atom-react": "4.0.0-beta.52",
|
|
38
|
+
+ "@effect/atom-react": "4.0.0",
|
|
39
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
40
|
+
- "effect": "4.0.0-beta.52",
|
|
41
|
+
+ "effect": "4.0.0",
|
|
42
|
+
"react": "^19.0.0"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
- "@effect/atom-react": ">=4.0.0-beta.52 <4.0.1",
|
|
46
|
+
- "effect": ">=4.0.0-beta.52 <4.0.1",
|
|
47
|
+
+ "@effect/atom-react": "^4.0.0",
|
|
48
|
+
+ "effect": "^4.0.0",
|
|
49
|
+
"react": "^19.0.0"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
diff --git a/src/FormReact.tsx b/src/FormReact.tsx
|
|
53
|
+
index 49c358e92fe04a62a9ef97dbae6665ce53e905a5..dfb2792d4b824d448bf3e8f4b469c0861422bd6f 100644
|
|
54
|
+
--- a/src/FormReact.tsx
|
|
55
|
+
+++ b/src/FormReact.tsx
|
|
56
|
+
@@ -7,8 +7,8 @@ import type * as Effect from "effect/Effect"
|
|
57
|
+
import * as Layer from "effect/Layer"
|
|
58
|
+
import * as Option from "effect/Option"
|
|
59
|
+
import type * as Schema from "effect/Schema"
|
|
60
|
+
-import * as Atom from "effect/unstable/reactivity/Atom"
|
|
61
|
+
-import type * as AtomRegistry from "effect/unstable/reactivity/AtomRegistry"
|
|
62
|
+
+import * as Atom from "effect/reactivity/Atom"
|
|
63
|
+
+import type * as AtomRegistry from "effect/reactivity/AtomRegistry"
|
|
64
|
+
import * as React from "react"
|
|
65
|
+
import { createContext, useContext } from "react"
|
|
66
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
diff --git a/dist/FormAtoms.d.ts b/dist/FormAtoms.d.ts
|
|
2
|
+
index 08d1e4e2e8edf08cecb5b550099c3293cbd10cd7..f7b1fa4a5a7d65e8b8b3785dc9eb5397d24718b4 100644
|
|
3
|
+
--- a/dist/FormAtoms.d.ts
|
|
4
|
+
+++ b/dist/FormAtoms.d.ts
|
|
5
|
+
@@ -1,7 +1,7 @@
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Option from "effect/Option";
|
|
8
|
+
import * as Schema from "effect/Schema";
|
|
9
|
+
-import * as Atom from "effect/unstable/reactivity/Atom";
|
|
10
|
+
+import * as Atom from "effect/reactivity/Atom";
|
|
11
|
+
import * as Field from "./Field.ts";
|
|
12
|
+
import * as FormBuilder from "./FormBuilder.ts";
|
|
13
|
+
import * as Mode from "./Mode.ts";
|
|
14
|
+
diff --git a/dist/FormAtoms.js b/dist/FormAtoms.js
|
|
15
|
+
index 663c4478a08eb17bfb7a11df952ced8f7812cbf8..ebaa1be93c33af0390857e945a9d414094f215ab 100644
|
|
16
|
+
--- a/dist/FormAtoms.js
|
|
17
|
+
+++ b/dist/FormAtoms.js
|
|
18
|
+
@@ -3,8 +3,8 @@ import * as Effect from "effect/Effect";
|
|
19
|
+
import { pipe } from "effect/Function";
|
|
20
|
+
import * as Option from "effect/Option";
|
|
21
|
+
import * as Schema from "effect/Schema";
|
|
22
|
+
-import * as AsyncResult from "effect/unstable/reactivity/AsyncResult";
|
|
23
|
+
-import * as Atom from "effect/unstable/reactivity/Atom";
|
|
24
|
+
+import * as AsyncResult from "effect/reactivity/AsyncResult";
|
|
25
|
+
+import * as Atom from "effect/reactivity/Atom";
|
|
26
|
+
import * as Field from "./Field.js";
|
|
27
|
+
import * as FormBuilder from "./FormBuilder.js";
|
|
28
|
+
import { recalculateDirtyFieldsForArray, recalculateDirtySubtree } from "./internal/dirty.js";
|
|
29
|
+
diff --git a/dist/FormBuilder.d.ts b/dist/FormBuilder.d.ts
|
|
30
|
+
index d42cf00d24b9efea5168831549b85468a64dfcef..16dfc1af6443555454ec7e6219c94eeabce3d724 100644
|
|
31
|
+
--- a/dist/FormBuilder.d.ts
|
|
32
|
+
+++ b/dist/FormBuilder.d.ts
|
|
33
|
+
@@ -1,7 +1,7 @@
|
|
34
|
+
import type * as Effect from "effect/Effect";
|
|
35
|
+
import type * as Option from "effect/Option";
|
|
36
|
+
import * as Schema from "effect/Schema";
|
|
37
|
+
-import type * as AtomRegistry from "effect/unstable/reactivity/AtomRegistry";
|
|
38
|
+
+import type * as AtomRegistry from "effect/reactivity/AtomRegistry";
|
|
39
|
+
import type { ArrayFieldDef, DecodedFromFields, EncodedFromFields, FieldDef, FieldsRecord } from "./Field.ts";
|
|
40
|
+
/**
|
|
41
|
+
* Flattens an intersection of field records into a single object type so that
|
|
42
|
+
diff --git a/package.json b/package.json
|
|
43
|
+
index 96ad0aa1729c64e8378a8cb2ad29f13b5347e568..06ae5ac6312779be749ff867b846c8f3c4ccf5b1 100644
|
|
44
|
+
--- a/package.json
|
|
45
|
+
+++ b/package.json
|
|
46
|
+
@@ -36,10 +36,10 @@
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"sideEffects": [],
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
- "effect": ">=4.0.0-beta.52 <4.0.1"
|
|
51
|
+
+ "effect": "^4.0.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
- "effect": "4.0.0-beta.52"
|
|
55
|
+
+ "effect": "4.0.0"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsc -b tsconfig.json && pnpm babel",
|
|
59
|
+
diff --git a/src/FormAtoms.ts b/src/FormAtoms.ts
|
|
60
|
+
index bc60a7f7b676edf4d1e99f6eb4162335b3247022..60d3dadfe2ef14c0a1b66b5e16886e8870c82681 100644
|
|
61
|
+
--- a/src/FormAtoms.ts
|
|
62
|
+
+++ b/src/FormAtoms.ts
|
|
63
|
+
@@ -3,8 +3,8 @@ import * as Effect from "effect/Effect"
|
|
64
|
+
import { pipe } from "effect/Function"
|
|
65
|
+
import * as Option from "effect/Option"
|
|
66
|
+
import * as Schema from "effect/Schema"
|
|
67
|
+
-import * as AsyncResult from "effect/unstable/reactivity/AsyncResult"
|
|
68
|
+
-import * as Atom from "effect/unstable/reactivity/Atom"
|
|
69
|
+
+import * as AsyncResult from "effect/reactivity/AsyncResult"
|
|
70
|
+
+import * as Atom from "effect/reactivity/Atom"
|
|
71
|
+
import * as Field from "./Field.ts"
|
|
72
|
+
import * as FormBuilder from "./FormBuilder.ts"
|
|
73
|
+
import { recalculateDirtyFieldsForArray, recalculateDirtySubtree } from "./internal/dirty.ts"
|
|
74
|
+
diff --git a/src/FormBuilder.ts b/src/FormBuilder.ts
|
|
75
|
+
index 764de854be6b072967d1140c707ba9565eda9516..6a2d0fe285ae3b2d1afc4bf928897e5b7bfb0a4b 100644
|
|
76
|
+
--- a/src/FormBuilder.ts
|
|
77
|
+
+++ b/src/FormBuilder.ts
|
|
78
|
+
@@ -3,7 +3,7 @@ import type * as Option from "effect/Option"
|
|
79
|
+
import * as Predicate from "effect/Predicate"
|
|
80
|
+
import * as Schema from "effect/Schema"
|
|
81
|
+
import * as SchemaGetter from "effect/SchemaGetter"
|
|
82
|
+
-import type * as AtomRegistry from "effect/unstable/reactivity/AtomRegistry"
|
|
83
|
+
+import type * as AtomRegistry from "effect/reactivity/AtomRegistry"
|
|
84
|
+
|
|
85
|
+
import type {
|
|
86
|
+
AnyFieldDef,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Temporary Effect form compatibility patches
|
|
2
|
+
|
|
3
|
+
These patches backport the stable Effect 4 changes from upstream commit
|
|
4
|
+
[`c10a53e041c9b0b338b26b2af66be5eb24f07d47`](https://github.com/lucas-barake/effect-form/commit/c10a53e041c9b0b338b26b2af66be5eb24f07d47).
|
|
5
|
+
The fixed npm packages are awaiting [release PR #111](https://github.com/lucas-barake/effect-form/pull/111).
|
|
6
|
+
|
|
7
|
+
The patches update reactivity imports in shipped JavaScript, TypeScript
|
|
8
|
+
declarations, and source, and change Effect peer ranges to `^4.0.0`.
|
|
9
|
+
They do not change form behavior or package versions.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
The workspace-root `package.json` configures `patchedDependencies` and exact
|
|
14
|
+
version overrides for both packages. Run `bun install` to apply them; commit
|
|
15
|
+
these patch files, `package.json`, and `bun.lock` together. In a monorepo, configure
|
|
16
|
+
the patches at the workspace root, not inside individual packages.
|
|
17
|
+
|
|
18
|
+
Patches do **not** propagate from a published KrakStack package to a consuming
|
|
19
|
+
application. Every application using the affected form packages must configure
|
|
20
|
+
both patches itself. The interim Auth and Registry packages also ship copies
|
|
21
|
+
under `patches/` for consumers to copy into their application roots.
|
|
22
|
+
|
|
23
|
+
## Removing the workaround
|
|
24
|
+
|
|
25
|
+
After upstream publishes `@lucas-barake/effect-form@0.25.0-beta.7` and
|
|
26
|
+
`@lucas-barake/effect-form-react@0.26.0-beta.6` (or newer compatible releases):
|
|
27
|
+
|
|
28
|
+
1. Update direct dependencies and KrakStack peer requirements to the fixed versions.
|
|
29
|
+
2. Remove the two form overrides and `patchedDependencies` entries.
|
|
30
|
+
3. Remove these two patch files and any copies shipped with KrakStack packages.
|
|
31
|
+
4. Run `bun install`, then the project's type, test, and release checks.
|