@maria_rcks/t1code 0.0.4 → 0.0.6
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 +24 -0
- package/bin/t1code.js +38 -4
- package/dist/index.mjs +879 -29527
- package/dist/server/{BunPTY-BulfMn1P.cjs → BunPTY-3FAOkA1C.cjs} +4 -5
- package/dist/server/BunPTY-3FAOkA1C.cjs.map +1 -0
- package/dist/server/{BunPTY-Cueq2gzZ.mjs → BunPTY-B9Pc7ndx.mjs} +5 -6
- package/dist/server/BunPTY-B9Pc7ndx.mjs.map +1 -0
- package/dist/server/{NodePTY-AdcStdsu.mjs → NodePTY-CZNVLBpq.mjs} +15 -16
- package/dist/server/NodePTY-CZNVLBpq.mjs.map +1 -0
- package/dist/server/{NodePTY-DmqnQV86.cjs → NodePTY-CbnaoLlj.cjs} +14 -15
- package/dist/server/NodePTY-CbnaoLlj.cjs.map +1 -0
- package/dist/server/NodeSqliteClient-C5fYhtpO.cjs +147 -0
- package/dist/server/NodeSqliteClient-C5fYhtpO.cjs.map +1 -0
- package/dist/server/NodeSqliteClient-COEUidVC.mjs +143 -0
- package/dist/server/NodeSqliteClient-COEUidVC.mjs.map +1 -0
- package/dist/server/SqlError-7DUB2NkG.mjs +43 -0
- package/dist/server/SqlError-7DUB2NkG.mjs.map +1 -0
- package/dist/server/SqlError-CAzXmpza.cjs +48 -0
- package/dist/server/SqlError-CAzXmpza.cjs.map +1 -0
- package/dist/server/SqliteClient-BMlcF9O1.cjs +133 -0
- package/dist/server/SqliteClient-BMlcF9O1.cjs.map +1 -0
- package/dist/server/SqliteClient-MZci3yRi.mjs +129 -0
- package/dist/server/SqliteClient-MZci3yRi.mjs.map +1 -0
- package/dist/server/index.cjs +96505 -14779
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.mjs +96491 -14777
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/open-BGXDmMPQ.cjs +501 -0
- package/dist/server/open-BGXDmMPQ.cjs.map +1 -0
- package/dist/server/open-BvXvp1QV.mjs +492 -0
- package/dist/server/open-BvXvp1QV.mjs.map +1 -0
- package/package.json +9 -2
- package/dist/server/BunPTY-BulfMn1P.cjs.map +0 -1
- package/dist/server/BunPTY-Cueq2gzZ.mjs.map +0 -1
- package/dist/server/NodePTY-AdcStdsu.mjs.map +0 -1
- package/dist/server/NodePTY-DmqnQV86.cjs.map +0 -1
- package/dist/server/NodeSqliteClient-BTK-dUey.mjs +0 -156
- package/dist/server/NodeSqliteClient-BTK-dUey.mjs.map +0 -1
- package/dist/server/NodeSqliteClient-ViK8pcdH.cjs +0 -174
- package/dist/server/NodeSqliteClient-ViK8pcdH.cjs.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { d as Defect, f as Number, h as optional, m as TaggedErrorClass, p as String } from "./index.mjs";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/unstable/sql/SqlError.js
|
|
6
|
+
/**
|
|
7
|
+
* @since 4.0.0
|
|
8
|
+
*/
|
|
9
|
+
const TypeId = "~effect/sql/SqlError";
|
|
10
|
+
/**
|
|
11
|
+
* @since 4.0.0
|
|
12
|
+
*/
|
|
13
|
+
var SqlError = class extends TaggedErrorClass("effect/sql/SqlError")("SqlError", {
|
|
14
|
+
cause: Defect,
|
|
15
|
+
message: /* @__PURE__ */ optional(String)
|
|
16
|
+
}) {
|
|
17
|
+
/**
|
|
18
|
+
* @since 4.0.0
|
|
19
|
+
*/
|
|
20
|
+
[TypeId] = TypeId;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @since 4.0.0
|
|
24
|
+
*/
|
|
25
|
+
var ResultLengthMismatch = class extends TaggedErrorClass("effect/sql/ResultLengthMismatch")("ResultLengthMismatch", {
|
|
26
|
+
expected: Number,
|
|
27
|
+
actual: Number
|
|
28
|
+
}) {
|
|
29
|
+
/**
|
|
30
|
+
* @since 4.0.0
|
|
31
|
+
*/
|
|
32
|
+
[TypeId] = TypeId;
|
|
33
|
+
/**
|
|
34
|
+
* @since 4.0.0
|
|
35
|
+
*/
|
|
36
|
+
get message() {
|
|
37
|
+
return `Expected ${this.expected} results but got ${this.actual}`;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { SqlError as t };
|
|
43
|
+
//# sourceMappingURL=SqlError-7DUB2NkG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SqlError-7DUB2NkG.mjs","names":["Schema.TaggedErrorClass","Schema.Defect","Schema.String","Schema.Number"],"sources":["../../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/unstable/sql/SqlError.js"],"sourcesContent":["/**\n * @since 4.0.0\n */\nimport * as Schema from \"../../Schema.js\";\nconst TypeId = \"~effect/sql/SqlError\";\n/**\n * @since 4.0.0\n */\nexport class SqlError extends /*#__PURE__*/Schema.TaggedErrorClass(\"effect/sql/SqlError\")(\"SqlError\", {\n cause: Schema.Defect,\n message: /*#__PURE__*/Schema.optional(Schema.String)\n}) {\n /**\n * @since 4.0.0\n */\n [TypeId] = TypeId;\n}\n/**\n * @since 4.0.0\n */\nexport class ResultLengthMismatch extends /*#__PURE__*/Schema.TaggedErrorClass(\"effect/sql/ResultLengthMismatch\")(\"ResultLengthMismatch\", {\n expected: Schema.Number,\n actual: Schema.Number\n}) {\n /**\n * @since 4.0.0\n */\n [TypeId] = TypeId;\n /**\n * @since 4.0.0\n */\n get message() {\n return `Expected ${this.expected} results but got ${this.actual}`;\n }\n}\n//# sourceMappingURL=SqlError.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAIA,MAAM,SAAS;;;;AAIf,IAAa,WAAb,cAA2CA,iBAAwB,sBAAsB,CAAC,YAAY;CACpG,OAAOC;CACP,SAAsB,yBAAgBC,OAAc;CACrD,CAAC,CAAC;;;;CAID,CAAC,UAAU;;;;;AAKb,IAAa,uBAAb,cAAuDF,iBAAwB,kCAAkC,CAAC,wBAAwB;CACxI,UAAUG;CACV,QAAQA;CACT,CAAC,CAAC;;;;CAID,CAAC,UAAU;;;;CAIX,IAAI,UAAU;AACZ,SAAO,YAAY,KAAK,SAAS,mBAAmB,KAAK"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const require_index = require('./index.cjs');
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/unstable/sql/SqlError.js
|
|
6
|
+
/**
|
|
7
|
+
* @since 4.0.0
|
|
8
|
+
*/
|
|
9
|
+
const TypeId = "~effect/sql/SqlError";
|
|
10
|
+
/**
|
|
11
|
+
* @since 4.0.0
|
|
12
|
+
*/
|
|
13
|
+
var SqlError = class extends require_index.TaggedErrorClass("effect/sql/SqlError")("SqlError", {
|
|
14
|
+
cause: require_index.Defect,
|
|
15
|
+
message: /* @__PURE__ */ require_index.optional(require_index.String)
|
|
16
|
+
}) {
|
|
17
|
+
/**
|
|
18
|
+
* @since 4.0.0
|
|
19
|
+
*/
|
|
20
|
+
[TypeId] = TypeId;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @since 4.0.0
|
|
24
|
+
*/
|
|
25
|
+
var ResultLengthMismatch = class extends require_index.TaggedErrorClass("effect/sql/ResultLengthMismatch")("ResultLengthMismatch", {
|
|
26
|
+
expected: require_index.Number,
|
|
27
|
+
actual: require_index.Number
|
|
28
|
+
}) {
|
|
29
|
+
/**
|
|
30
|
+
* @since 4.0.0
|
|
31
|
+
*/
|
|
32
|
+
[TypeId] = TypeId;
|
|
33
|
+
/**
|
|
34
|
+
* @since 4.0.0
|
|
35
|
+
*/
|
|
36
|
+
get message() {
|
|
37
|
+
return `Expected ${this.expected} results but got ${this.actual}`;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
Object.defineProperty(exports, 'SqlError', {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return SqlError;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=SqlError-CAzXmpza.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SqlError-CAzXmpza.cjs","names":[],"sources":["../../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/unstable/sql/SqlError.js"],"sourcesContent":["/**\n * @since 4.0.0\n */\nimport * as Schema from \"../../Schema.js\";\nconst TypeId = \"~effect/sql/SqlError\";\n/**\n * @since 4.0.0\n */\nexport class SqlError extends /*#__PURE__*/Schema.TaggedErrorClass(\"effect/sql/SqlError\")(\"SqlError\", {\n cause: Schema.Defect,\n message: /*#__PURE__*/Schema.optional(Schema.String)\n}) {\n /**\n * @since 4.0.0\n */\n [TypeId] = TypeId;\n}\n/**\n * @since 4.0.0\n */\nexport class ResultLengthMismatch extends /*#__PURE__*/Schema.TaggedErrorClass(\"effect/sql/ResultLengthMismatch\")(\"ResultLengthMismatch\", {\n expected: Schema.Number,\n actual: Schema.Number\n}) {\n /**\n * @since 4.0.0\n */\n [TypeId] = TypeId;\n /**\n * @since 4.0.0\n */\n get message() {\n return `Expected ${this.expected} results but got ${this.actual}`;\n }\n}\n//# sourceMappingURL=SqlError.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAIA,MAAM,SAAS;;;;AAIf,IAAa,WAAb,6CAAmE,sBAAsB,CAAC,YAAY;CACpG;CACA,SAAsB,4DAA8B;CACrD,CAAC,CAAC;;;;CAID,CAAC,UAAU;;;;;AAKb,IAAa,uBAAb,6CAA+E,kCAAkC,CAAC,wBAAwB;CACxI;CACA;CACD,CAAC,CAAC;;;;CAID,CAAC,UAAU;;;;CAIX,IAAI,UAAU;AACZ,SAAO,YAAY,KAAK,SAAS,mBAAmB,KAAK"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const require_index = require('./index.cjs');
|
|
4
|
+
const require_SqlError = require('./SqlError-CAzXmpza.cjs');
|
|
5
|
+
let bun_sqlite = require("bun:sqlite");
|
|
6
|
+
|
|
7
|
+
//#region ../../node_modules/.bun/@effect+sql-sqlite-bun@https+++pkg.pr.new+Effect-TS+effect-smol+@effect+sql-sqlite-bun@8881a9b+eecd35a1726d7096/node_modules/@effect/sql-sqlite-bun/dist/SqliteClient.js
|
|
8
|
+
/**
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
*/
|
|
11
|
+
const ATTR_DB_SYSTEM_NAME = "db.system.name";
|
|
12
|
+
/**
|
|
13
|
+
* @category type ids
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
*/
|
|
16
|
+
const TypeId = "~@effect/sql-sqlite-bun/SqliteClient";
|
|
17
|
+
/**
|
|
18
|
+
* @category tags
|
|
19
|
+
* @since 1.0.0
|
|
20
|
+
*/
|
|
21
|
+
const SqliteClient = /* @__PURE__ */ require_index.Service("@effect/sql-sqlite-bun/Client");
|
|
22
|
+
/**
|
|
23
|
+
* @category constructor
|
|
24
|
+
* @since 1.0.0
|
|
25
|
+
*/
|
|
26
|
+
const make = (options) => require_index.gen(function* () {
|
|
27
|
+
const compiler = require_index.makeCompilerSqlite(options.transformQueryNames);
|
|
28
|
+
const transformRows = options.transformResultNames ? require_index.defaultTransforms(options.transformResultNames).array : void 0;
|
|
29
|
+
const makeConnection = require_index.gen(function* () {
|
|
30
|
+
const db = new bun_sqlite.Database(options.filename, {
|
|
31
|
+
readonly: options.readonly,
|
|
32
|
+
readwrite: options.readwrite ?? true,
|
|
33
|
+
create: options.create ?? true
|
|
34
|
+
});
|
|
35
|
+
yield* require_index.addFinalizer(() => require_index.sync(() => db.close()));
|
|
36
|
+
if (options.disableWAL !== true) db.run("PRAGMA journal_mode = WAL;");
|
|
37
|
+
const run = (sql, params = []) => require_index.withFiber((fiber) => {
|
|
38
|
+
const statement = db.query(sql);
|
|
39
|
+
const useSafeIntegers = require_index.get$1(fiber.services, require_index.SafeIntegers);
|
|
40
|
+
statement.safeIntegers(useSafeIntegers);
|
|
41
|
+
try {
|
|
42
|
+
return require_index.succeed(statement.all(...params) ?? []);
|
|
43
|
+
} catch (cause) {
|
|
44
|
+
return require_index.fail(new require_SqlError.SqlError({
|
|
45
|
+
cause,
|
|
46
|
+
message: "Failed to execute statement"
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const runValues = (sql, params = []) => require_index.withFiber((fiber) => {
|
|
51
|
+
const statement = db.query(sql);
|
|
52
|
+
const useSafeIntegers = require_index.get$1(fiber.services, require_index.SafeIntegers);
|
|
53
|
+
statement.safeIntegers(useSafeIntegers);
|
|
54
|
+
try {
|
|
55
|
+
return require_index.succeed(statement.values(...params) ?? []);
|
|
56
|
+
} catch (cause) {
|
|
57
|
+
return require_index.fail(new require_SqlError.SqlError({
|
|
58
|
+
cause,
|
|
59
|
+
message: "Failed to execute statement"
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return require_index.identity({
|
|
64
|
+
execute(sql, params, transformRows) {
|
|
65
|
+
return transformRows ? require_index.map(run(sql, params), transformRows) : run(sql, params);
|
|
66
|
+
},
|
|
67
|
+
executeRaw(sql, params) {
|
|
68
|
+
return run(sql, params);
|
|
69
|
+
},
|
|
70
|
+
executeValues(sql, params) {
|
|
71
|
+
return runValues(sql, params);
|
|
72
|
+
},
|
|
73
|
+
executeUnprepared(sql, params, transformRows) {
|
|
74
|
+
return this.execute(sql, params, transformRows);
|
|
75
|
+
},
|
|
76
|
+
executeStream(_sql, _params) {
|
|
77
|
+
return require_index.die("executeStream not implemented");
|
|
78
|
+
},
|
|
79
|
+
export: require_index.try_({
|
|
80
|
+
try: () => db.serialize(),
|
|
81
|
+
catch: (cause) => new require_SqlError.SqlError({
|
|
82
|
+
cause,
|
|
83
|
+
message: "Failed to export database"
|
|
84
|
+
})
|
|
85
|
+
}),
|
|
86
|
+
loadExtension: (path) => require_index.try_({
|
|
87
|
+
try: () => db.loadExtension(path),
|
|
88
|
+
catch: (cause) => new require_SqlError.SqlError({
|
|
89
|
+
cause,
|
|
90
|
+
message: "Failed to load extension"
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
const semaphore = yield* require_index.make$2(1);
|
|
96
|
+
const connection = yield* makeConnection;
|
|
97
|
+
const acquirer = semaphore.withPermits(1)(require_index.succeed(connection));
|
|
98
|
+
const transactionAcquirer = require_index.uninterruptibleMask((restore) => {
|
|
99
|
+
const fiber = require_index.getCurrent();
|
|
100
|
+
const scope = require_index.getUnsafe(fiber.services, require_index.Scope);
|
|
101
|
+
return require_index.as(require_index.tap(restore(semaphore.take(1)), () => require_index.addFinalizer$1(scope, semaphore.release(1))), connection);
|
|
102
|
+
});
|
|
103
|
+
return Object.assign(yield* require_index.make({
|
|
104
|
+
acquirer,
|
|
105
|
+
compiler,
|
|
106
|
+
transactionAcquirer,
|
|
107
|
+
spanAttributes: [...options.spanAttributes ? Object.entries(options.spanAttributes) : [], [ATTR_DB_SYSTEM_NAME, "sqlite"]],
|
|
108
|
+
transformRows
|
|
109
|
+
}), {
|
|
110
|
+
[TypeId]: TypeId,
|
|
111
|
+
config: options,
|
|
112
|
+
export: require_index.flatMap(acquirer, (_) => _.export),
|
|
113
|
+
loadExtension: (path) => require_index.flatMap(acquirer, (_) => _.loadExtension(path))
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
/**
|
|
117
|
+
* @category layers
|
|
118
|
+
* @since 1.0.0
|
|
119
|
+
*/
|
|
120
|
+
const layerConfig = (config) => require_index.effectServices(require_index.unwrap(config).asEffect().pipe(require_index.flatMap(make), require_index.map((client) => require_index.make$3(SqliteClient, client).pipe(require_index.add(require_index.SqlClient, client))))).pipe(require_index.provide(require_index.layer));
|
|
121
|
+
/**
|
|
122
|
+
* @category layers
|
|
123
|
+
* @since 1.0.0
|
|
124
|
+
*/
|
|
125
|
+
const layer = (config) => require_index.effectServices(require_index.map(make(config), (client) => require_index.make$3(SqliteClient, client).pipe(require_index.add(require_index.SqlClient, client)))).pipe(require_index.provide(require_index.layer));
|
|
126
|
+
|
|
127
|
+
//#endregion
|
|
128
|
+
exports.SqliteClient = SqliteClient;
|
|
129
|
+
exports.TypeId = TypeId;
|
|
130
|
+
exports.layer = layer;
|
|
131
|
+
exports.layerConfig = layerConfig;
|
|
132
|
+
exports.make = make;
|
|
133
|
+
//# sourceMappingURL=SqliteClient-BMlcF9O1.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SqliteClient-BMlcF9O1.cjs","names":["Database","SqlError","identity"],"sources":["../../../node_modules/.bun/@effect+sql-sqlite-bun@https+++pkg.pr.new+Effect-TS+effect-smol+@effect+sql-sqlite-bun@8881a9b+eecd35a1726d7096/node_modules/@effect/sql-sqlite-bun/dist/SqliteClient.js"],"sourcesContent":["/**\n * @since 1.0.0\n */\nimport { Database } from \"bun:sqlite\";\nimport * as Config from \"effect/Config\";\nimport * as Effect from \"effect/Effect\";\nimport * as Fiber from \"effect/Fiber\";\nimport { identity } from \"effect/Function\";\nimport * as Layer from \"effect/Layer\";\nimport * as Scope from \"effect/Scope\";\nimport * as Semaphore from \"effect/Semaphore\";\nimport * as ServiceMap from \"effect/ServiceMap\";\nimport * as Stream from \"effect/Stream\";\nimport * as Reactivity from \"effect/unstable/reactivity/Reactivity\";\nimport * as Client from \"effect/unstable/sql/SqlClient\";\nimport { SqlError } from \"effect/unstable/sql/SqlError\";\nimport * as Statement from \"effect/unstable/sql/Statement\";\nconst ATTR_DB_SYSTEM_NAME = \"db.system.name\";\n/**\n * @category type ids\n * @since 1.0.0\n */\nexport const TypeId = \"~@effect/sql-sqlite-bun/SqliteClient\";\n/**\n * @category tags\n * @since 1.0.0\n */\nexport const SqliteClient = /*#__PURE__*/ServiceMap.Service(\"@effect/sql-sqlite-bun/Client\");\n/**\n * @category constructor\n * @since 1.0.0\n */\nexport const make = options => Effect.gen(function* () {\n const compiler = Statement.makeCompilerSqlite(options.transformQueryNames);\n const transformRows = options.transformResultNames ? Statement.defaultTransforms(options.transformResultNames).array : undefined;\n const makeConnection = Effect.gen(function* () {\n const db = new Database(options.filename, {\n readonly: options.readonly,\n readwrite: options.readwrite ?? true,\n create: options.create ?? true\n });\n yield* Effect.addFinalizer(() => Effect.sync(() => db.close()));\n if (options.disableWAL !== true) {\n db.run(\"PRAGMA journal_mode = WAL;\");\n }\n const run = (sql, params = []) => Effect.withFiber(fiber => {\n const statement = db.query(sql);\n const useSafeIntegers = ServiceMap.get(fiber.services, Client.SafeIntegers);\n // @ts-ignore bun-types missing safeIntegers method, fixed in https://github.com/oven-sh/bun/pull/26627\n statement.safeIntegers(useSafeIntegers);\n try {\n return Effect.succeed(statement.all(...params) ?? []);\n } catch (cause) {\n return Effect.fail(new SqlError({\n cause,\n message: \"Failed to execute statement\"\n }));\n }\n });\n const runValues = (sql, params = []) => Effect.withFiber(fiber => {\n const statement = db.query(sql);\n const useSafeIntegers = ServiceMap.get(fiber.services, Client.SafeIntegers);\n // @ts-ignore bun-types missing safeIntegers method, fixed in https://github.com/oven-sh/bun/pull/26627\n statement.safeIntegers(useSafeIntegers);\n try {\n return Effect.succeed(statement.values(...params) ?? []);\n } catch (cause) {\n return Effect.fail(new SqlError({\n cause,\n message: \"Failed to execute statement\"\n }));\n }\n });\n return identity({\n execute(sql, params, transformRows) {\n return transformRows ? Effect.map(run(sql, params), transformRows) : run(sql, params);\n },\n executeRaw(sql, params) {\n return run(sql, params);\n },\n executeValues(sql, params) {\n return runValues(sql, params);\n },\n executeUnprepared(sql, params, transformRows) {\n return this.execute(sql, params, transformRows);\n },\n executeStream(_sql, _params) {\n return Stream.die(\"executeStream not implemented\");\n },\n export: Effect.try({\n try: () => db.serialize(),\n catch: cause => new SqlError({\n cause,\n message: \"Failed to export database\"\n })\n }),\n loadExtension: path => Effect.try({\n try: () => db.loadExtension(path),\n catch: cause => new SqlError({\n cause,\n message: \"Failed to load extension\"\n })\n })\n });\n });\n const semaphore = yield* Semaphore.make(1);\n const connection = yield* makeConnection;\n const acquirer = semaphore.withPermits(1)(Effect.succeed(connection));\n const transactionAcquirer = Effect.uninterruptibleMask(restore => {\n const fiber = Fiber.getCurrent();\n const scope = ServiceMap.getUnsafe(fiber.services, Scope.Scope);\n return Effect.as(Effect.tap(restore(semaphore.take(1)), () => Scope.addFinalizer(scope, semaphore.release(1))), connection);\n });\n return Object.assign(yield* Client.make({\n acquirer,\n compiler,\n transactionAcquirer,\n spanAttributes: [...(options.spanAttributes ? Object.entries(options.spanAttributes) : []), [ATTR_DB_SYSTEM_NAME, \"sqlite\"]],\n transformRows\n }), {\n [TypeId]: TypeId,\n config: options,\n export: Effect.flatMap(acquirer, _ => _.export),\n loadExtension: path => Effect.flatMap(acquirer, _ => _.loadExtension(path))\n });\n});\n/**\n * @category layers\n * @since 1.0.0\n */\nexport const layerConfig = config => Layer.effectServices(Config.unwrap(config).asEffect().pipe(Effect.flatMap(make), Effect.map(client => ServiceMap.make(SqliteClient, client).pipe(ServiceMap.add(Client.SqlClient, client))))).pipe(Layer.provide(Reactivity.layer));\n/**\n * @category layers\n * @since 1.0.0\n */\nexport const layer = config => Layer.effectServices(Effect.map(make(config), client => ServiceMap.make(SqliteClient, client).pipe(ServiceMap.add(Client.SqlClient, client)))).pipe(Layer.provide(Reactivity.layer));\n//# sourceMappingURL=SqliteClient.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAiBA,MAAM,sBAAsB;;;;;AAK5B,MAAa,SAAS;;;;;AAKtB,MAAa,eAA4B,sCAAmB,gCAAgC;;;;;AAK5F,M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CAAC,gDAAsC,OAAO,CAAC,CAAC,CAAC,CAAC,+CAAoC,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { $ as identity, A as map, C as as, D as flatMap, E as fail, F as succeed, G as Scope, I as sync, J as add, K as addFinalizer$1, L as tap, R as try_, S as addFinalizer, U as effectServices, V as withFiber, W as provide, X as getUnsafe, Y as get, Z as make$3, a as defaultTransforms, b as getCurrent, c as unwrap, i as make$2, k as gen, n as SafeIntegers, o as makeCompilerSqlite, q as Service, r as SqlClient, s as layer$1, v as die, y as make$1, z as uninterruptibleMask } from "./index.mjs";
|
|
4
|
+
import { t as SqlError } from "./SqlError-7DUB2NkG.mjs";
|
|
5
|
+
import { Database } from "bun:sqlite";
|
|
6
|
+
|
|
7
|
+
//#region ../../node_modules/.bun/@effect+sql-sqlite-bun@https+++pkg.pr.new+Effect-TS+effect-smol+@effect+sql-sqlite-bun@8881a9b+eecd35a1726d7096/node_modules/@effect/sql-sqlite-bun/dist/SqliteClient.js
|
|
8
|
+
/**
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
*/
|
|
11
|
+
const ATTR_DB_SYSTEM_NAME = "db.system.name";
|
|
12
|
+
/**
|
|
13
|
+
* @category type ids
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
*/
|
|
16
|
+
const TypeId = "~@effect/sql-sqlite-bun/SqliteClient";
|
|
17
|
+
/**
|
|
18
|
+
* @category tags
|
|
19
|
+
* @since 1.0.0
|
|
20
|
+
*/
|
|
21
|
+
const SqliteClient = /* @__PURE__ */ Service("@effect/sql-sqlite-bun/Client");
|
|
22
|
+
/**
|
|
23
|
+
* @category constructor
|
|
24
|
+
* @since 1.0.0
|
|
25
|
+
*/
|
|
26
|
+
const make = (options) => gen(function* () {
|
|
27
|
+
const compiler = makeCompilerSqlite(options.transformQueryNames);
|
|
28
|
+
const transformRows = options.transformResultNames ? defaultTransforms(options.transformResultNames).array : void 0;
|
|
29
|
+
const makeConnection = gen(function* () {
|
|
30
|
+
const db = new Database(options.filename, {
|
|
31
|
+
readonly: options.readonly,
|
|
32
|
+
readwrite: options.readwrite ?? true,
|
|
33
|
+
create: options.create ?? true
|
|
34
|
+
});
|
|
35
|
+
yield* addFinalizer(() => sync(() => db.close()));
|
|
36
|
+
if (options.disableWAL !== true) db.run("PRAGMA journal_mode = WAL;");
|
|
37
|
+
const run = (sql, params = []) => withFiber((fiber) => {
|
|
38
|
+
const statement = db.query(sql);
|
|
39
|
+
const useSafeIntegers = get(fiber.services, SafeIntegers);
|
|
40
|
+
statement.safeIntegers(useSafeIntegers);
|
|
41
|
+
try {
|
|
42
|
+
return succeed(statement.all(...params) ?? []);
|
|
43
|
+
} catch (cause) {
|
|
44
|
+
return fail(new SqlError({
|
|
45
|
+
cause,
|
|
46
|
+
message: "Failed to execute statement"
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const runValues = (sql, params = []) => withFiber((fiber) => {
|
|
51
|
+
const statement = db.query(sql);
|
|
52
|
+
const useSafeIntegers = get(fiber.services, SafeIntegers);
|
|
53
|
+
statement.safeIntegers(useSafeIntegers);
|
|
54
|
+
try {
|
|
55
|
+
return succeed(statement.values(...params) ?? []);
|
|
56
|
+
} catch (cause) {
|
|
57
|
+
return fail(new SqlError({
|
|
58
|
+
cause,
|
|
59
|
+
message: "Failed to execute statement"
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return identity({
|
|
64
|
+
execute(sql, params, transformRows) {
|
|
65
|
+
return transformRows ? map(run(sql, params), transformRows) : run(sql, params);
|
|
66
|
+
},
|
|
67
|
+
executeRaw(sql, params) {
|
|
68
|
+
return run(sql, params);
|
|
69
|
+
},
|
|
70
|
+
executeValues(sql, params) {
|
|
71
|
+
return runValues(sql, params);
|
|
72
|
+
},
|
|
73
|
+
executeUnprepared(sql, params, transformRows) {
|
|
74
|
+
return this.execute(sql, params, transformRows);
|
|
75
|
+
},
|
|
76
|
+
executeStream(_sql, _params) {
|
|
77
|
+
return die("executeStream not implemented");
|
|
78
|
+
},
|
|
79
|
+
export: try_({
|
|
80
|
+
try: () => db.serialize(),
|
|
81
|
+
catch: (cause) => new SqlError({
|
|
82
|
+
cause,
|
|
83
|
+
message: "Failed to export database"
|
|
84
|
+
})
|
|
85
|
+
}),
|
|
86
|
+
loadExtension: (path) => try_({
|
|
87
|
+
try: () => db.loadExtension(path),
|
|
88
|
+
catch: (cause) => new SqlError({
|
|
89
|
+
cause,
|
|
90
|
+
message: "Failed to load extension"
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
const semaphore = yield* make$1(1);
|
|
96
|
+
const connection = yield* makeConnection;
|
|
97
|
+
const acquirer = semaphore.withPermits(1)(succeed(connection));
|
|
98
|
+
const transactionAcquirer = uninterruptibleMask((restore) => {
|
|
99
|
+
const fiber = getCurrent();
|
|
100
|
+
const scope = getUnsafe(fiber.services, Scope);
|
|
101
|
+
return as(tap(restore(semaphore.take(1)), () => addFinalizer$1(scope, semaphore.release(1))), connection);
|
|
102
|
+
});
|
|
103
|
+
return Object.assign(yield* make$2({
|
|
104
|
+
acquirer,
|
|
105
|
+
compiler,
|
|
106
|
+
transactionAcquirer,
|
|
107
|
+
spanAttributes: [...options.spanAttributes ? Object.entries(options.spanAttributes) : [], [ATTR_DB_SYSTEM_NAME, "sqlite"]],
|
|
108
|
+
transformRows
|
|
109
|
+
}), {
|
|
110
|
+
[TypeId]: TypeId,
|
|
111
|
+
config: options,
|
|
112
|
+
export: flatMap(acquirer, (_) => _.export),
|
|
113
|
+
loadExtension: (path) => flatMap(acquirer, (_) => _.loadExtension(path))
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
/**
|
|
117
|
+
* @category layers
|
|
118
|
+
* @since 1.0.0
|
|
119
|
+
*/
|
|
120
|
+
const layerConfig = (config) => effectServices(unwrap(config).asEffect().pipe(flatMap(make), map((client) => make$3(SqliteClient, client).pipe(add(SqlClient, client))))).pipe(provide(layer$1));
|
|
121
|
+
/**
|
|
122
|
+
* @category layers
|
|
123
|
+
* @since 1.0.0
|
|
124
|
+
*/
|
|
125
|
+
const layer = (config) => effectServices(map(make(config), (client) => make$3(SqliteClient, client).pipe(add(SqlClient, client)))).pipe(provide(layer$1));
|
|
126
|
+
|
|
127
|
+
//#endregion
|
|
128
|
+
export { SqliteClient, TypeId, layer, layerConfig, make };
|
|
129
|
+
//# sourceMappingURL=SqliteClient-MZci3yRi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SqliteClient-MZci3yRi.mjs","names":["Effect.gen","Statement.makeCompilerSqlite","Statement.defaultTransforms","Effect.addFinalizer","Effect.sync","Effect.withFiber","ServiceMap.get","Client.SafeIntegers","Effect.succeed","Effect.fail","Effect.map","Stream.die","Effect.try","Semaphore.make","Effect.uninterruptibleMask","Fiber.getCurrent","ServiceMap.getUnsafe","Scope.Scope","Effect.as","Effect.tap","Scope.addFinalizer","Client.make","Effect.flatMap","Layer.effectServices","Config.unwrap","ServiceMap.make","ServiceMap.add","Client.SqlClient","Layer.provide","Reactivity.layer"],"sources":["../../../node_modules/.bun/@effect+sql-sqlite-bun@https+++pkg.pr.new+Effect-TS+effect-smol+@effect+sql-sqlite-bun@8881a9b+eecd35a1726d7096/node_modules/@effect/sql-sqlite-bun/dist/SqliteClient.js"],"sourcesContent":["/**\n * @since 1.0.0\n */\nimport { Database } from \"bun:sqlite\";\nimport * as Config from \"effect/Config\";\nimport * as Effect from \"effect/Effect\";\nimport * as Fiber from \"effect/Fiber\";\nimport { identity } from \"effect/Function\";\nimport * as Layer from \"effect/Layer\";\nimport * as Scope from \"effect/Scope\";\nimport * as Semaphore from \"effect/Semaphore\";\nimport * as ServiceMap from \"effect/ServiceMap\";\nimport * as Stream from \"effect/Stream\";\nimport * as Reactivity from \"effect/unstable/reactivity/Reactivity\";\nimport * as Client from \"effect/unstable/sql/SqlClient\";\nimport { SqlError } from \"effect/unstable/sql/SqlError\";\nimport * as Statement from \"effect/unstable/sql/Statement\";\nconst ATTR_DB_SYSTEM_NAME = \"db.system.name\";\n/**\n * @category type ids\n * @since 1.0.0\n */\nexport const TypeId = \"~@effect/sql-sqlite-bun/SqliteClient\";\n/**\n * @category tags\n * @since 1.0.0\n */\nexport const SqliteClient = /*#__PURE__*/ServiceMap.Service(\"@effect/sql-sqlite-bun/Client\");\n/**\n * @category constructor\n * @since 1.0.0\n */\nexport const make = options => Effect.gen(function* () {\n const compiler = Statement.makeCompilerSqlite(options.transformQueryNames);\n const transformRows = options.transformResultNames ? Statement.defaultTransforms(options.transformResultNames).array : undefined;\n const makeConnection = Effect.gen(function* () {\n const db = new Database(options.filename, {\n readonly: options.readonly,\n readwrite: options.readwrite ?? true,\n create: options.create ?? true\n });\n yield* Effect.addFinalizer(() => Effect.sync(() => db.close()));\n if (options.disableWAL !== true) {\n db.run(\"PRAGMA journal_mode = WAL;\");\n }\n const run = (sql, params = []) => Effect.withFiber(fiber => {\n const statement = db.query(sql);\n const useSafeIntegers = ServiceMap.get(fiber.services, Client.SafeIntegers);\n // @ts-ignore bun-types missing safeIntegers method, fixed in https://github.com/oven-sh/bun/pull/26627\n statement.safeIntegers(useSafeIntegers);\n try {\n return Effect.succeed(statement.all(...params) ?? []);\n } catch (cause) {\n return Effect.fail(new SqlError({\n cause,\n message: \"Failed to execute statement\"\n }));\n }\n });\n const runValues = (sql, params = []) => Effect.withFiber(fiber => {\n const statement = db.query(sql);\n const useSafeIntegers = ServiceMap.get(fiber.services, Client.SafeIntegers);\n // @ts-ignore bun-types missing safeIntegers method, fixed in https://github.com/oven-sh/bun/pull/26627\n statement.safeIntegers(useSafeIntegers);\n try {\n return Effect.succeed(statement.values(...params) ?? []);\n } catch (cause) {\n return Effect.fail(new SqlError({\n cause,\n message: \"Failed to execute statement\"\n }));\n }\n });\n return identity({\n execute(sql, params, transformRows) {\n return transformRows ? Effect.map(run(sql, params), transformRows) : run(sql, params);\n },\n executeRaw(sql, params) {\n return run(sql, params);\n },\n executeValues(sql, params) {\n return runValues(sql, params);\n },\n executeUnprepared(sql, params, transformRows) {\n return this.execute(sql, params, transformRows);\n },\n executeStream(_sql, _params) {\n return Stream.die(\"executeStream not implemented\");\n },\n export: Effect.try({\n try: () => db.serialize(),\n catch: cause => new SqlError({\n cause,\n message: \"Failed to export database\"\n })\n }),\n loadExtension: path => Effect.try({\n try: () => db.loadExtension(path),\n catch: cause => new SqlError({\n cause,\n message: \"Failed to load extension\"\n })\n })\n });\n });\n const semaphore = yield* Semaphore.make(1);\n const connection = yield* makeConnection;\n const acquirer = semaphore.withPermits(1)(Effect.succeed(connection));\n const transactionAcquirer = Effect.uninterruptibleMask(restore => {\n const fiber = Fiber.getCurrent();\n const scope = ServiceMap.getUnsafe(fiber.services, Scope.Scope);\n return Effect.as(Effect.tap(restore(semaphore.take(1)), () => Scope.addFinalizer(scope, semaphore.release(1))), connection);\n });\n return Object.assign(yield* Client.make({\n acquirer,\n compiler,\n transactionAcquirer,\n spanAttributes: [...(options.spanAttributes ? Object.entries(options.spanAttributes) : []), [ATTR_DB_SYSTEM_NAME, \"sqlite\"]],\n transformRows\n }), {\n [TypeId]: TypeId,\n config: options,\n export: Effect.flatMap(acquirer, _ => _.export),\n loadExtension: path => Effect.flatMap(acquirer, _ => _.loadExtension(path))\n });\n});\n/**\n * @category layers\n * @since 1.0.0\n */\nexport const layerConfig = config => Layer.effectServices(Config.unwrap(config).asEffect().pipe(Effect.flatMap(make), Effect.map(client => ServiceMap.make(SqliteClient, client).pipe(ServiceMap.add(Client.SqlClient, client))))).pipe(Layer.provide(Reactivity.layer));\n/**\n * @category layers\n * @since 1.0.0\n */\nexport const layer = config => Layer.effectServices(Effect.map(make(config), client => ServiceMap.make(SqliteClient, client).pipe(ServiceMap.add(Client.SqlClient, client)))).pipe(Layer.provide(Reactivity.layer));\n//# sourceMappingURL=SqliteClient.js.map"],"x_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