@distilled.cloud/typesense 1.0.0-rc.1 → 1.0.0-rc.10
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/LICENSE +201 -0
- package/lib/credentials.js +2 -2
- package/lib/errors.js +2 -2
- package/lib/errors.js.map +1 -1
- package/lib/services/typesense.d.ts +983 -971
- package/lib/services/typesense.d.ts.map +1 -1
- package/lib/services/typesense.js +823 -826
- package/lib/services/typesense.js.map +1 -1
- package/package.json +28 -12
- package/src/credentials.ts +2 -2
- package/src/errors.ts +2 -2
- package/src/services/typesense.ts +2902 -2917
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/typesense",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.10",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/alchemy-run/distilled",
|
|
@@ -49,22 +49,38 @@
|
|
|
49
49
|
"bun": "./src/services/*.ts",
|
|
50
50
|
"worker": "./src/services/*.ts",
|
|
51
51
|
"default": "./lib/services/*.js"
|
|
52
|
+
},
|
|
53
|
+
"./Protocol": {
|
|
54
|
+
"types": "./lib/protocol.d.ts",
|
|
55
|
+
"bun": "./src/protocol.ts",
|
|
56
|
+
"worker": "./src/protocol.ts",
|
|
57
|
+
"default": "./lib/protocol.js"
|
|
58
|
+
},
|
|
59
|
+
"./Retry": {
|
|
60
|
+
"types": "./lib/retry.d.ts",
|
|
61
|
+
"bun": "./src/retry.ts",
|
|
62
|
+
"worker": "./src/retry.ts",
|
|
63
|
+
"default": "./lib/retry.js"
|
|
52
64
|
}
|
|
53
65
|
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@distilled.cloud/core": "1.0.0-rc.10"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@types/bun": "1.3.14",
|
|
71
|
+
"@types/node": "26.2.0",
|
|
72
|
+
"@effect/platform-bun": ">=4.0.0-rc.115 || >=4.0.0"
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"effect": ">=4.0.0-rc.115 || >=4.0.0"
|
|
76
|
+
},
|
|
54
77
|
"scripts": {
|
|
55
78
|
"build": "tsc -b",
|
|
56
79
|
"convert": "bun scripts/convert.ts",
|
|
57
80
|
"generate": "bun scripts/generate.ts",
|
|
58
81
|
"typecheck": "tsc -p tsconfig.json",
|
|
59
|
-
"typecheck:strict": "tsc -p tsconfig.strict.json"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"@distilled.cloud/core": "1.0.0-rc.1",
|
|
63
|
-
"@effect/platform-bun": ">=4.0.0-beta.102 || >=4.0.0",
|
|
64
|
-
"effect": ">=4.0.0-beta.102 || >=4.0.0"
|
|
65
|
-
},
|
|
66
|
-
"devDependencies": {
|
|
67
|
-
"@types/bun": "latest",
|
|
68
|
-
"@types/node": "latest"
|
|
82
|
+
"typecheck:strict": "tsc -p tsconfig.strict.json",
|
|
83
|
+
"specs:fetch": "git submodule update --force --init --depth=1 specs/spec-mirror-typesense",
|
|
84
|
+
"specs:update": "git submodule update --remote --force --depth=1 specs/spec-mirror-typesense"
|
|
69
85
|
}
|
|
70
|
-
}
|
|
86
|
+
}
|
package/src/credentials.ts
CHANGED
|
@@ -31,8 +31,8 @@ export class Credentials extends Context.Service<
|
|
|
31
31
|
>()("TypesenseCredentials") {}
|
|
32
32
|
|
|
33
33
|
const envConfig = EffectConfig.all({
|
|
34
|
-
apiKey: EffectConfig.
|
|
35
|
-
apiBaseUrl: EffectConfig.
|
|
34
|
+
apiKey: EffectConfig.String("TYPESENSE_API_KEY"),
|
|
35
|
+
apiBaseUrl: EffectConfig.String("TYPESENSE_API_URL"),
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
export const CredentialsFromEnv = Layer.succeed(
|
package/src/errors.ts
CHANGED
|
@@ -29,7 +29,7 @@ import * as Schema from "effect/Schema";
|
|
|
29
29
|
import * as Category from "@distilled.cloud/core/category";
|
|
30
30
|
|
|
31
31
|
// Unknown Typesense error - returned when an error code is not recognized
|
|
32
|
-
export class UnknownTypesenseError extends Schema.
|
|
32
|
+
export class UnknownTypesenseError extends Schema.TaggedError<UnknownTypesenseError>()(
|
|
33
33
|
"UnknownTypesenseError",
|
|
34
34
|
{
|
|
35
35
|
code: Schema.optional(Schema.String),
|
|
@@ -39,7 +39,7 @@ export class UnknownTypesenseError extends Schema.TaggedErrorClass<UnknownTypese
|
|
|
39
39
|
).pipe(Category.withServerError) {}
|
|
40
40
|
|
|
41
41
|
// Schema parse error wrapper
|
|
42
|
-
export class TypesenseParseError extends Schema.
|
|
42
|
+
export class TypesenseParseError extends Schema.TaggedError<TypesenseParseError>()(
|
|
43
43
|
"TypesenseParseError",
|
|
44
44
|
{
|
|
45
45
|
body: Schema.Unknown,
|