@effect-native/libcrsql 0.16.303 → 4.0.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.
- package/README.md +125 -7
- package/dist/cjs/effect.js.map +1 -1
- package/dist/dts/effect.d.ts +3 -3
- package/dist/dts/effect.d.ts.map +1 -1
- package/dist/esm/effect.js.map +1 -1
- package/dist/lib/darwin-aarch64/libcrsqlite.dylib +0 -0
- package/dist/lib/darwin-x86_64/libcrsqlite.dylib +0 -0
- package/dist/lib/linux-aarch64/libcrsqlite.so +0 -0
- package/dist/lib/linux-x86_64/libcrsqlite.so +0 -0
- package/dist/lib/win-i686/crsqlite.dll +0 -0
- package/dist/lib/win-x86_64/crsqlite.dll +0 -0
- package/package.json +3 -7
- package/src/effect.ts +1 -1
package/README.md
CHANGED
|
@@ -3,39 +3,99 @@
|
|
|
3
3
|
Absolute paths to the cr-sqlite extension binaries for common desktop/server platforms, plus an optional Effect entrypoint.
|
|
4
4
|
|
|
5
5
|
Supported platforms (verified on release):
|
|
6
|
+
|
|
6
7
|
- macOS: darwin-aarch64, darwin-x86_64
|
|
7
8
|
- Linux: linux-aarch64, linux-x86_64
|
|
8
9
|
- Windows: win-x86_64, win-i686
|
|
9
10
|
|
|
10
11
|
## Install
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
```sh
|
|
14
|
+
bun add @effect-native/libcrsql
|
|
15
|
+
```
|
|
13
16
|
|
|
14
17
|
## Usage (no Effect)
|
|
15
18
|
|
|
19
|
+
```ts
|
|
20
|
+
import { getCrSqliteExtensionPathSync, pathToCrSqliteExtension } from "@effect-native/libcrsql"
|
|
16
21
|
import Database from "better-sqlite3"
|
|
17
|
-
import { pathToCrSqliteExtension, getCrSqliteExtensionPathSync } from "@effect-native/libcrsql"
|
|
18
22
|
|
|
19
23
|
const db = new Database(":memory:")
|
|
20
24
|
db.loadExtension(pathToCrSqliteExtension)
|
|
21
25
|
// or explicit
|
|
22
26
|
// db.loadExtension(getCrSqliteExtensionPathSync("linux-x86_64"))
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Using with @effect/sql-sqlite-node
|
|
30
|
+
|
|
31
|
+
Use the Node Sqlite client from Effect and load the CR‑SQLite extension before running queries.
|
|
32
|
+
|
|
33
|
+
Simple usage (Effect):
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { getCrSqliteExtensionPath } from "@effect-native/libcrsql/effect"
|
|
37
|
+
import { SqliteClient } from "@effect/sql-sqlite-node"
|
|
38
|
+
import { Effect, Layer } from "effect"
|
|
39
|
+
|
|
40
|
+
const SqliteBase = SqliteClient.layer({ filename: ":memory:" })
|
|
41
|
+
|
|
42
|
+
const program = Effect.gen(function*() {
|
|
43
|
+
const client = yield* SqliteClient.SqliteClient
|
|
44
|
+
const ext = yield* getCrSqliteExtensionPath
|
|
45
|
+
yield* client.loadExtension(ext)
|
|
46
|
+
const rows = yield* client`SELECT hex(crsql_site_id()) AS site_id`
|
|
47
|
+
console.log(rows[0].site_id)
|
|
48
|
+
}).pipe(Effect.provide(SqliteBase))
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Idiomatic Layer composition for tests:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { getCrSqliteExtensionPath } from "@effect-native/libcrsql/effect"
|
|
55
|
+
import { SqliteClient } from "@effect/sql-sqlite-node"
|
|
56
|
+
import { Effect, Layer } from "effect"
|
|
57
|
+
|
|
58
|
+
const SqliteBase = SqliteClient.layer({ filename: ":memory:" })
|
|
59
|
+
|
|
60
|
+
export const SqliteWithCr = Layer.effect(
|
|
61
|
+
SqliteClient.SqliteClient,
|
|
62
|
+
Effect.gen(function*() {
|
|
63
|
+
const client = yield* SqliteClient.SqliteClient
|
|
64
|
+
const ext = yield* getCrSqliteExtensionPath
|
|
65
|
+
yield* client.loadExtension(ext)
|
|
66
|
+
return client
|
|
67
|
+
})
|
|
68
|
+
).pipe(Layer.provide(SqliteBase))
|
|
69
|
+
|
|
70
|
+
// Use in tests
|
|
71
|
+
// it.scoped("works", () => Effect.provide(SqliteWithCr)(...))
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Notes:
|
|
75
|
+
|
|
76
|
+
- better‑sqlite3 compiles with SQLite built in; you do not need @effect‑native/libsqlite for Node.
|
|
77
|
+
- If you need to control the SQLite binary (e.g. Bun), use @effect‑native/libsqlite and its `Database.setCustomSQLite` APIs.
|
|
23
78
|
|
|
24
79
|
## Absolute constants (no side effects)
|
|
25
80
|
|
|
81
|
+
```ts
|
|
26
82
|
import { linux_x86_64 } from "@effect-native/libcrsql/paths"
|
|
27
83
|
// linux_x86_64 is an absolute string like
|
|
28
84
|
// /.../node_modules/@effect-native/libcrsql/lib/linux-x86_64/libcrsqlite.so
|
|
85
|
+
```
|
|
29
86
|
|
|
30
87
|
## Effect entrypoint (optional)
|
|
31
88
|
|
|
32
|
-
|
|
89
|
+
```ts
|
|
33
90
|
import { getCrSqliteExtensionPath } from "@effect-native/libcrsql/effect"
|
|
91
|
+
import { Effect } from "effect"
|
|
34
92
|
|
|
35
93
|
const program = getCrSqliteExtensionPath()
|
|
36
94
|
Effect.runPromise(program)
|
|
95
|
+
```
|
|
37
96
|
|
|
38
97
|
## Notes
|
|
98
|
+
|
|
39
99
|
- No network or postinstall scripts. Binaries are bundled in `lib/`.
|
|
40
100
|
- Android and iOS are out of scope for this release.
|
|
41
101
|
- Root and paths entrypoints have zero external runtime dependencies.
|
|
@@ -56,21 +116,40 @@ console.log(CRSQLITE_VERSION) // "0.16.3"
|
|
|
56
116
|
## Performance Note
|
|
57
117
|
|
|
58
118
|
The module uses a synchronous file existence check (`fs.accessSync`) to ensure the returned path points to a real binary. This runs once per import/use and is acceptable for this package’s contract. If needed, this can be revisited later with memoization.
|
|
119
|
+
|
|
59
120
|
## Binary Integrity
|
|
60
121
|
|
|
61
122
|
Run a local integrity check to verify bundled binaries match the expected SHA256:
|
|
62
123
|
|
|
63
|
-
```
|
|
64
|
-
|
|
124
|
+
```sh
|
|
125
|
+
bun --filter @effect-native/libcrsql run verify
|
|
65
126
|
```
|
|
66
127
|
|
|
67
128
|
---
|
|
68
129
|
|
|
69
|
-
#
|
|
130
|
+
# Examples
|
|
131
|
+
|
|
132
|
+
## nodejs + better-sqlite3
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
import { pathToCrSqliteExtension } from "@effect-native/libcrsql"
|
|
136
|
+
import Database from "better-sqlite3"
|
|
137
|
+
|
|
138
|
+
const db = new Database(":memory:")
|
|
139
|
+
db.loadExtension(pathToCrSqliteExtension)
|
|
140
|
+
|
|
141
|
+
console.log("LibSqlite loaded successfully?", db.prepare("SELECT sqlite_version() AS sqlite_version").get())
|
|
142
|
+
|
|
143
|
+
console.log("CR-SQLite extension loaded successfully")
|
|
144
|
+
console.log("Site ID:", db.prepare("SELECT hex(crsql_site_id()) as site_id").get())
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## bun build --compile
|
|
148
|
+
|
|
149
|
+
Embed libsqlite and crsqlite extension in a compiled Bun single file executable.
|
|
70
150
|
|
|
71
151
|
```ts
|
|
72
152
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
73
|
-
// GOAL: embed and use libsqlite and crsqlite in a compiled Bun single file executable
|
|
74
153
|
|
|
75
154
|
import { Database } from "bun:sqlite"
|
|
76
155
|
|
|
@@ -89,6 +168,45 @@ if (Bun.embeddedFiles.length) {
|
|
|
89
168
|
Database.setCustomSQLite(embeddedLibSqlitePath)
|
|
90
169
|
}
|
|
91
170
|
|
|
171
|
+
const db = new Database(":memory:")
|
|
172
|
+
console.log("LibSqlite loaded successfully?", db.query("SELECT sqlite_version() AS sqlite_version").get())
|
|
173
|
+
db.loadExtension(embeddedCrSqliteExtensionPath, "sqlite3_crsqlite_init")
|
|
174
|
+
|
|
175
|
+
try {
|
|
176
|
+
} catch (cause) {
|
|
177
|
+
if (!String(cause).includes("no such file")) throw cause
|
|
178
|
+
const embeddedCrSqliteExtensionFile = Bun.file(embeddedCrSqliteExtensionPath)
|
|
179
|
+
const exportedCrSqliteExtensionPath = `./.${embeddedCrSqliteExtensionFile.name}`
|
|
180
|
+
Bun.write(exportedCrSqliteExtensionPath, embeddedCrSqliteExtensionFile)
|
|
181
|
+
db.loadExtension(exportedCrSqliteExtensionPath, "sqlite3_crsqlite_init")
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
console.log("CRSQLite extension loaded successfully?", db.query("SELECT hex(crsql_site_id()) AS siteId").get())
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## bun build --compile
|
|
188
|
+
|
|
189
|
+
Embed libsqlite and crsqlite extension in a compiled Bun single file executable.
|
|
190
|
+
|
|
191
|
+
```ts
|
|
192
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
193
|
+
import { Database } from "bun:sqlite"
|
|
194
|
+
|
|
195
|
+
import { getCrSqliteExtensionPathSync } from "@effect-native/libcrsql" with { type: "macro" }
|
|
196
|
+
import { getLibSqlitePathSync } from "@effect-native/libsqlite" with { type: "macro" }
|
|
197
|
+
|
|
198
|
+
const embeddedLibSqlitePath = String(require(getLibSqlitePathSync()))
|
|
199
|
+
const embeddedCrSqliteExtensionPath = String(require(getCrSqliteExtensionPathSync()))
|
|
200
|
+
|
|
201
|
+
if (Bun.embeddedFiles.length) {
|
|
202
|
+
const embeddedLibSqliteFile = Bun.file(embeddedLibSqlitePath)
|
|
203
|
+
const exportedLibSqlitePath = `./.${embeddedLibSqliteFile.name}`
|
|
204
|
+
Bun.write(exportedLibSqlitePath, embeddedLibSqliteFile)
|
|
205
|
+
Database.setCustomSQLite(exportedLibSqlitePath)
|
|
206
|
+
} else {
|
|
207
|
+
Database.setCustomSQLite(embeddedLibSqlitePath)
|
|
208
|
+
}
|
|
209
|
+
|
|
92
210
|
const db = new Database(":memory:")
|
|
93
211
|
console.log("LibSqlite loaded successfully?", db.query("SELECT sqlite_version() AS sqliteVersion").get())
|
|
94
212
|
|
package/dist/cjs/effect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect.js","names":["_effect","require","fs","_interopRequireWildcard","_nodeUrl","_platform","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PlatformNotSupportedError","Data","TaggedError","message","platform","detectedPlatform","detectedArch","supportedPlatforms","join","exports","ExtensionNotFoundError","ExtensionPath","Brand","nominal","getCrSqliteExtensionPath","Effect","gen","target","detectPlatform","isSupportedPlatform","fail","SUPPORTED_PLATFORMS","process","arch","abs","fileURLToPath","URL","buildRelativeLibraryPath","import","meta","url","exists","sync","accessSync","path","_SUPPORTED_PLATFORMS"],"sources":["../../src/effect.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAKsB,SAAAE,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAbtB;;;;;;AAgBA;;;;AAIM,MAAOkB,yBAA0B,sBAAQC,YAAI,CAACC,WAAW,CAAC,2BAA2B,CAKzF;EACA;;;EAGA,
|
|
1
|
+
{"version":3,"file":"effect.js","names":["_effect","require","fs","_interopRequireWildcard","_nodeUrl","_platform","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PlatformNotSupportedError","Data","TaggedError","message","platform","detectedPlatform","detectedArch","supportedPlatforms","join","exports","ExtensionNotFoundError","ExtensionPath","Brand","nominal","getCrSqliteExtensionPath","Effect","gen","target","detectPlatform","isSupportedPlatform","fail","SUPPORTED_PLATFORMS","process","arch","abs","fileURLToPath","URL","buildRelativeLibraryPath","import","meta","url","exists","sync","accessSync","path","_SUPPORTED_PLATFORMS"],"sources":["../../src/effect.ts"],"sourcesContent":[null],"mappings":";;;;;;AAKA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAKsB,SAAAE,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAA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AAY,mBAAA,GAAGc,6BAAoB","ignoreList":[]}
|
package/dist/dts/effect.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Brand, Effect } from "effect";
|
|
7
7
|
import type { Platform as _Platform } from "./platform.js";
|
|
8
|
-
declare const PlatformNotSupportedError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").
|
|
8
|
+
declare const PlatformNotSupportedError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").MatchRecord<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }, void, { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
9
9
|
readonly _tag: "PlatformNotSupportedError";
|
|
10
10
|
} & Readonly<A>;
|
|
11
11
|
/**
|
|
@@ -23,7 +23,7 @@ export declare class PlatformNotSupportedError extends PlatformNotSupportedError
|
|
|
23
23
|
*/
|
|
24
24
|
get message(): string;
|
|
25
25
|
}
|
|
26
|
-
declare const ExtensionNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").
|
|
26
|
+
declare const ExtensionNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").MatchRecord<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }, void, { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
27
27
|
readonly _tag: "ExtensionNotFoundError";
|
|
28
28
|
} & Readonly<A>;
|
|
29
29
|
/**
|
|
@@ -44,7 +44,7 @@ export type ExtensionPath = string & Brand.Brand<"ExtensionPath">;
|
|
|
44
44
|
* Brand constructor for `ExtensionPath`.
|
|
45
45
|
* @since 0.16.300
|
|
46
46
|
*/
|
|
47
|
-
export declare const ExtensionPath: Brand.
|
|
47
|
+
export declare const ExtensionPath: Brand.Constructor<ExtensionPath>;
|
|
48
48
|
/**
|
|
49
49
|
* Effect-based absolute path resolution with idiomatic TaggedError failures.
|
|
50
50
|
*
|
package/dist/dts/effect.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../../src/effect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,EAAQ,MAAM,EAAE,MAAM,QAAQ,CAAA;AAS5C,OAAO,KAAK,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;;;;AAE1D;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,+BAA8C;IAC3F,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,kBAAkB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAClD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;CAClC,CAAC;IACA;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../../src/effect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,EAAQ,MAAM,EAAE,MAAM,QAAQ,CAAA;AAS5C,OAAO,KAAK,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;;;;AAE1D;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,+BAA8C;IAC3F,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,kBAAkB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAClD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;CAClC,CAAC;IACA;;OAEG;IACH,IAAa,OAAO,WAInB;CACF;;;;AAED;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,4BAA2C;IACrF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B,CAAC;CAAG;AAEL;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;AACjE;;;GAGG;AACH,eAAO,MAAM,aAAa,kCAAiC,CAAA;AAG3D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,GACnC,WAAW,QAAQ,KAClB,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,yBAAyB,GAAG,sBAAsB,CA+B9E,CAAA;AAEJ;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAA;AAEhC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,sBAAuB,CAAA"}
|
package/dist/esm/effect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect.js","names":["Brand","Data","Effect","fs","fileURLToPath","buildRelativeLibraryPath","detectPlatform","isSupportedPlatform","SUPPORTED_PLATFORMS","_SUPPORTED_PLATFORMS","PlatformNotSupportedError","TaggedError","message","platform","detectedPlatform","detectedArch","supportedPlatforms","join","ExtensionNotFoundError","ExtensionPath","nominal","getCrSqliteExtensionPath","gen","target","fail","process","arch","abs","URL","import","meta","url","exists","sync","accessSync","path"],"sources":["../../src/effect.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAKA,SAASA,KAAK,EAAEC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAC5C,OAAO,KAAKC,EAAE,MAAM,SAAS;AAC7B,SAASC,aAAa,QAAQ,UAAU;AACxC,SACEC,wBAAwB,EACxBC,cAAc,EACdC,mBAAmB,EACnBC,mBAAmB,IAAIC,oBAAoB,QACtC,eAAe;AAGtB;;;;AAIA,OAAM,MAAOC,yBAA0B,sBAAQT,IAAI,CAACU,WAAW,CAAC,2BAA2B,CAKzF;EACA;;;EAGA,
|
|
1
|
+
{"version":3,"file":"effect.js","names":["Brand","Data","Effect","fs","fileURLToPath","buildRelativeLibraryPath","detectPlatform","isSupportedPlatform","SUPPORTED_PLATFORMS","_SUPPORTED_PLATFORMS","PlatformNotSupportedError","TaggedError","message","platform","detectedPlatform","detectedArch","supportedPlatforms","join","ExtensionNotFoundError","ExtensionPath","nominal","getCrSqliteExtensionPath","gen","target","fail","process","arch","abs","URL","import","meta","url","exists","sync","accessSync","path"],"sources":["../../src/effect.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAKA,SAASA,KAAK,EAAEC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAC5C,OAAO,KAAKC,EAAE,MAAM,SAAS;AAC7B,SAASC,aAAa,QAAQ,UAAU;AACxC,SACEC,wBAAwB,EACxBC,cAAc,EACdC,mBAAmB,EACnBC,mBAAmB,IAAIC,oBAAoB,QACtC,eAAe;AAGtB;;;;AAIA,OAAM,MAAOC,yBAA0B,sBAAQT,IAAI,CAACU,WAAW,CAAC,2BAA2B,CAKzF;EACA;;;EAGA,IAAaC,OAAOA,CAAA;IAClB,OAAO,aAAa,IAAI,CAACC,QAAQ,iCAAiC,IAAI,CAACC,gBAAgB,IAAI,IAAI,CAACC,YAAY,gBAC1G,IAAI,CAACC,kBAAkB,CAACC,IAAI,CAAC,IAAI,CACnC,EAAE;EACJ;;AAGF;;;;AAIA,OAAM,MAAOC,sBAAuB,sBAAQjB,IAAI,CAACU,WAAW,CAAC,wBAAwB,CAGnF;AAOF;;;;AAIA,OAAO,MAAMQ,aAAa,gBAAGnB,KAAK,CAACoB,OAAO,EAAiB;AAE3D;AACA;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,wBAAwB,GACnCR,QAAmB,IAEnBX,MAAM,CAACoB,GAAG,CAAC,aAAS;EAClB,MAAMC,MAAM,GAAGV,QAAQ,IAAIP,cAAc,EAAE;EAC3C,IAAI,CAACC,mBAAmB,CAACgB,MAAM,CAAC,EAAE;IAChC,OAAO,OAAOrB,MAAM,CAACsB,IAAI,CACvB,IAAId,yBAAyB,CAAC;MAC5BG,QAAQ,EAAEU,MAAM;MAChBP,kBAAkB,EAAER,mBAAmB;MACvCO,YAAY,EAAEU,OAAO,CAACC,IAAI;MAC1BZ,gBAAgB,EAAEW,OAAO,CAACZ;KAC3B,CAAC,CACH;EACH;EACA,MAAMc,GAAG,GAAGvB,aAAa,CAAC,IAAIwB,GAAG,CAAC,MAAMvB,wBAAwB,CAACkB,MAAM,CAAC,EAAE,EAAEM,MAAM,CAACC,IAAI,CAACC,GAAG,CAAC,CAAC;EAE7F,MAAMC,MAAM,GAAG,OAAO9B,MAAM,CAAC+B,IAAI,CAAC,MAAK;IACrC,IAAI;MACF;MACA;MACA9B,EAAE,CAAC+B,UAAU,CAACP,GAAG,CAAC;MAClB,OAAO,IAAI;IACb,CAAC,CAAC,MAAM;MACN,OAAO,KAAK;IACd;EACF,CAAC,CAAC;EAEF,IAAI,CAACK,MAAM,EAAE;IACX,OAAO,OAAO9B,MAAM,CAACsB,IAAI,CAAC,IAAIN,sBAAsB,CAAC;MAAEiB,IAAI,EAAER,GAAG;MAAEd,QAAQ,EAAEU;IAAM,CAAE,CAAC,CAAC;EACxF;EAEA,OAAOJ,aAAa,CAACQ,GAAG,CAAC;AAC3B,CAAC,CAAC;AAQJ;;;;AAIA,OAAO,MAAMnB,mBAAmB,GAAGC,oBAAoB","ignoreList":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-native/libcrsql",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Absolute paths to cr-sqlite extension binaries for Node.js with optional Effect API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/effect-native/effect-native.git",
|
|
9
|
-
"directory": "packages
|
|
9
|
+
"directory": "packages/libcrsql"
|
|
10
10
|
},
|
|
11
11
|
"sideEffects": [
|
|
12
12
|
"./dist/cjs/index.js",
|
|
@@ -18,15 +18,11 @@
|
|
|
18
18
|
],
|
|
19
19
|
"homepage": "https://github.com/effect-native/effect-native",
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"effect": "
|
|
22
|
-
"@effect/platform": "*"
|
|
21
|
+
"effect": "^4.0.0-beta.0"
|
|
23
22
|
},
|
|
24
23
|
"peerDependenciesMeta": {
|
|
25
24
|
"effect": {
|
|
26
25
|
"optional": true
|
|
27
|
-
},
|
|
28
|
-
"@effect/platform": {
|
|
29
|
-
"optional": true
|
|
30
26
|
}
|
|
31
27
|
},
|
|
32
28
|
"publishConfig": {
|
package/src/effect.ts
CHANGED
|
@@ -27,7 +27,7 @@ export class PlatformNotSupportedError extends Data.TaggedError("PlatformNotSupp
|
|
|
27
27
|
/**
|
|
28
28
|
* @since 0.16.300
|
|
29
29
|
*/
|
|
30
|
-
get message() {
|
|
30
|
+
override get message() {
|
|
31
31
|
return `Platform "${this.platform}" is not supported. Detected: ${this.detectedPlatform}-${this.detectedArch}. Supported: ${
|
|
32
32
|
this.supportedPlatforms.join(", ")
|
|
33
33
|
}`
|