@oino-ts/nosql 1.0.3 → 1.0.4

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.
@@ -8,12 +8,10 @@ export type OINONoSqlConstructor = new (params: OINONoSqlParams) => OINONoSql;
8
8
  export type OINONoSqlParams = {
9
9
  /** Name of the nosql class (e.g. OINONoSqlAzureTable) */
10
10
  type: string;
11
- /** Service endpoint URL */
12
- url: string;
13
11
  /** Table name */
14
12
  table: string;
15
- /** Provider-specific connection string (e.g. Azure Storage connection string) */
16
- connectionStr?: string;
13
+ /** Provider-specific credentials (e.g. Azure: { url, connectionStr } / AWS: { region, accessKeyId, secretAccessKey, url? }) */
14
+ credentials?: any;
17
15
  /**
18
16
  * Optional static partition key. When set, all read/write operations are
19
17
  * automatically scoped to this partition key, allowing multiple logical
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oino-ts/nosql",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "OINO TS library package for publishing NoSQL storage as a REST API.",
5
5
  "author": "Matias Kiviniemi (pragmatta)",
6
6
  "license": "MPL-2.0",
@@ -19,13 +19,13 @@
19
19
  "module": "./dist/esm/index.js",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "dependencies": {
22
- "@oino-ts/common": "1.0.3",
22
+ "@oino-ts/common": "1.0.4",
23
23
  "oino-ts": "file:.."
24
24
  },
25
25
  "devDependencies": {
26
- "@oino-ts/types": "1.0.3",
26
+ "@oino-ts/types": "1.0.4",
27
27
  "@types/bun": "^1.1.14",
28
- "@types/node": "^21.0.30",
28
+ "@types/node": "^21.0.40",
29
29
  "typescript": "~5.9.0"
30
30
  },
31
31
  "files": [
@@ -44,18 +44,19 @@ const NOSQL_STORAGES: OINONoSqlStorageParams[] = [
44
44
  {
45
45
  noSqlParams: {
46
46
  type: "OINONoSqlAzureTable",
47
- url: "https://oinocloudteststor.table.core.windows.net",
48
47
  table: "NorthwindOrders",
49
- connectionStr: OINOCLOUD_TEST_BLOB_AZURE_CONSTR
48
+ credentials: {
49
+ url: "https://oinocloudteststor.table.core.windows.net",
50
+ connectionStr: OINOCLOUD_TEST_BLOB_AZURE_CONSTR
51
+ }
50
52
  },
51
53
  apiName: "azure-northwind-nosql"
52
54
  },
53
55
  {
54
56
  noSqlParams: {
55
57
  type: "OINONoSqlAwsDynamo",
56
- url: "",
57
58
  table: "NorthwindOrders",
58
- connectionStr: OINOCLOUD_TEST_BLOB_S3_CONSTR
59
+ credentials: JSON.parse(OINOCLOUD_TEST_BLOB_S3_CONSTR)
59
60
  },
60
61
  apiName: "aws-northwind-nosql"
61
62
  }
@@ -138,7 +139,7 @@ export async function OINOTestNoSql(storageParams: OINONoSqlStorageParams, testP
138
139
 
139
140
  let target_group = "[CONNECTION]"
140
141
 
141
- const wrong_constr_params: OINONoSqlParams = { ...storageParams.noSqlParams, connectionStr: "WRONG_CONNECTION_STRING" }
142
+ const wrong_constr_params: OINONoSqlParams = { ...storageParams.noSqlParams, table: "OINONonExistentTable" }
142
143
  const wrong_nosql: OINONoSql = await OINONoSqlFactory.createNoSql(wrong_constr_params, false, false)
143
144
  const wrong_connect_res = await wrong_nosql.connect()
144
145
  // Azure parses the connection string format and may throw during connect;
@@ -16,12 +16,10 @@ export type OINONoSqlConstructor = new (params: OINONoSqlParams) => OINONoSql
16
16
  export type OINONoSqlParams = {
17
17
  /** Name of the nosql class (e.g. OINONoSqlAzureTable) */
18
18
  type: string
19
- /** Service endpoint URL */
20
- url: string
21
19
  /** Table name */
22
20
  table: string
23
- /** Provider-specific connection string (e.g. Azure Storage connection string) */
24
- connectionStr?: string
21
+ /** Provider-specific credentials (e.g. Azure: { url, connectionStr } / AWS: { region, accessKeyId, secretAccessKey, url? }) */
22
+ credentials?: any
25
23
  /**
26
24
  * Optional static partition key. When set, all read/write operations are
27
25
  * automatically scoped to this partition key, allowing multiple logical