@deterministic-code/datasources-dynamodb 0.0.0-stage → 0.1.2

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,8 @@
1
+ import { type Cell, type DatasourceOptions, type ICommand, type IConnection, type IDriver, type ITransaction, type IsolationLevel, type TypeConverter } from "@deterministic-code/datasources";
2
+ export declare class DynamoDbDriver implements IDriver {
3
+ rowTypeConverters: Record<string, TypeConverter<Cell, Cell>>;
4
+ columnType: (name: string) => string;
5
+ connection: (options?: DatasourceOptions) => IConnection;
6
+ command: (connection: IConnection) => ICommand;
7
+ transaction: (connection: IConnection, _isolation?: IsolationLevel) => ITransaction;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { columnType as identityColumnType, StubTransaction, } from "@deterministic-code/datasources";
2
+ import { DynamoDbConnection } from "./connection.js";
3
+ export class DynamoDbDriver {
4
+ rowTypeConverters = {};
5
+ columnType = identityColumnType;
6
+ connection = (options) => DynamoDbConnection.from(options);
7
+ command = (connection) => connection.createCommand();
8
+ transaction = (connection, _isolation) => new StubTransaction(connection.provider, connection);
9
+ }
@@ -0,0 +1,6 @@
1
+ import { StubConnection, type DatasourceOptions, type ICommand } from "@deterministic-code/datasources";
2
+ export declare class DynamoDbConnection extends StubConnection {
3
+ constructor(_options?: DatasourceOptions);
4
+ createCommand: () => ICommand;
5
+ static from: (options?: DatasourceOptions) => DynamoDbConnection;
6
+ }
@@ -0,0 +1,8 @@
1
+ import { StubCommand, StubConnection, } from "@deterministic-code/datasources";
2
+ export class DynamoDbConnection extends StubConnection {
3
+ constructor(_options) {
4
+ super("dynamodb");
5
+ }
6
+ createCommand = () => new StubCommand(this.provider, this);
7
+ static from = (options) => new DynamoDbConnection(options);
8
+ }
@@ -0,0 +1 @@
1
+ export { DynamoDbDriver } from "./DynamoDbDriver.js";
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { DynamoDbDriver } from "./DynamoDbDriver.js";
package/package.json CHANGED
@@ -1,6 +1,23 @@
1
1
  {
2
2
  "name": "@deterministic-code/datasources-dynamodb",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.2",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.js",
10
+ "import": "./dist/index.js",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "dependencies": {
21
+ "@deterministic-code/datasources": "^0.1.2"
22
+ }
23
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.