dyno-table 0.1.8 → 0.2.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 +570 -147
- package/dist/builder-types-C_PDZhnP.d.ts +118 -0
- package/dist/builder-types-DtwbqMeF.d.cts +118 -0
- package/dist/builders/condition-check-builder.cjs +1 -1
- package/dist/builders/condition-check-builder.cjs.map +1 -1
- package/dist/builders/condition-check-builder.d.cts +157 -0
- package/dist/builders/condition-check-builder.d.ts +157 -0
- package/dist/builders/condition-check-builder.js +1 -1
- package/dist/builders/condition-check-builder.js.map +1 -1
- package/dist/builders/delete-builder.cjs +0 -17
- package/dist/builders/delete-builder.cjs.map +1 -1
- package/dist/builders/delete-builder.d.cts +166 -0
- package/dist/builders/delete-builder.d.ts +166 -0
- package/dist/builders/delete-builder.js +0 -17
- package/dist/builders/delete-builder.js.map +1 -1
- package/dist/builders/paginator.cjs.map +1 -1
- package/dist/builders/paginator.d.cts +179 -0
- package/dist/builders/paginator.d.ts +179 -0
- package/dist/builders/paginator.js.map +1 -1
- package/dist/builders/put-builder.cjs +8 -0
- package/dist/builders/put-builder.cjs.map +1 -1
- package/dist/builders/put-builder.d.cts +274 -0
- package/dist/builders/put-builder.d.ts +274 -0
- package/dist/builders/put-builder.js +8 -0
- package/dist/builders/put-builder.js.map +1 -1
- package/dist/builders/query-builder.cjs.map +1 -1
- package/dist/builders/query-builder.d.cts +6 -0
- package/dist/builders/query-builder.d.ts +6 -0
- package/dist/builders/query-builder.js.map +1 -1
- package/dist/builders/transaction-builder.cjs +40 -22
- package/dist/builders/transaction-builder.cjs.map +1 -1
- package/dist/builders/transaction-builder.d.cts +511 -0
- package/dist/builders/transaction-builder.d.ts +511 -0
- package/dist/builders/transaction-builder.js +40 -22
- package/dist/builders/transaction-builder.js.map +1 -1
- package/dist/builders/update-builder.cjs +3 -38
- package/dist/builders/update-builder.cjs.map +1 -1
- package/dist/builders/update-builder.d.cts +365 -0
- package/dist/builders/update-builder.d.ts +365 -0
- package/dist/builders/update-builder.js +3 -38
- package/dist/builders/update-builder.js.map +1 -1
- package/dist/conditions--ld9a78i.d.ts +331 -0
- package/dist/conditions-ChhQWd6z.d.cts +331 -0
- package/dist/conditions.cjs.map +1 -1
- package/dist/conditions.d.cts +3 -0
- package/dist/conditions.d.ts +3 -0
- package/dist/conditions.js.map +1 -1
- package/dist/entity.cjs +156 -97
- package/dist/entity.cjs.map +1 -1
- package/dist/entity.d.cts +149 -0
- package/dist/entity.d.ts +149 -0
- package/dist/entity.js +156 -97
- package/dist/entity.js.map +1 -1
- package/dist/query-builder-Csror9Iu.d.ts +507 -0
- package/dist/query-builder-D2FM9rsu.d.cts +507 -0
- package/dist/standard-schema.d.cts +57 -0
- package/dist/standard-schema.d.ts +57 -0
- package/dist/table-BEhBPy2G.d.cts +364 -0
- package/dist/table-BW3cmUqr.d.ts +364 -0
- package/dist/table.cjs +82 -102
- package/dist/table.cjs.map +1 -1
- package/dist/table.d.cts +12 -0
- package/dist/table.d.ts +12 -0
- package/dist/table.js +82 -102
- package/dist/table.js.map +1 -1
- package/dist/types.d.cts +22 -0
- package/dist/types.d.ts +22 -0
- package/dist/utils/{key-template.cjs → partition-key-template.cjs} +3 -3
- package/dist/utils/partition-key-template.cjs.map +1 -0
- package/dist/utils/partition-key-template.d.cts +32 -0
- package/dist/utils/partition-key-template.d.ts +32 -0
- package/dist/utils/{key-template.js → partition-key-template.js} +3 -3
- package/dist/utils/partition-key-template.js.map +1 -0
- package/dist/utils/sort-key-template.d.cts +35 -0
- package/dist/utils/sort-key-template.d.ts +35 -0
- package/package.json +86 -9
- package/dist/index.cjs +0 -3333
- package/dist/index.d.cts +0 -2971
- package/dist/index.d.ts +0 -2971
- package/dist/index.js +0 -3284
- package/dist/utils/key-template.cjs.map +0 -1
- package/dist/utils/key-template.js.map +0 -1
package/dist/types.d.cts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DynamoDBDocument } from '@aws-sdk/lib-dynamodb';
|
|
2
|
+
|
|
3
|
+
type DynamoItem = {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
interface Index {
|
|
7
|
+
partitionKey: string;
|
|
8
|
+
sortKey?: string;
|
|
9
|
+
}
|
|
10
|
+
interface IndexConfig {
|
|
11
|
+
partitionKey: string;
|
|
12
|
+
sortKey?: string;
|
|
13
|
+
gsis?: Record<string, Index>;
|
|
14
|
+
}
|
|
15
|
+
interface TableConfig {
|
|
16
|
+
client: DynamoDBDocument;
|
|
17
|
+
tableName: string;
|
|
18
|
+
indexes: IndexConfig;
|
|
19
|
+
}
|
|
20
|
+
type GSINames<T extends TableConfig> = keyof NonNullable<T["indexes"]["gsis"]>;
|
|
21
|
+
|
|
22
|
+
export type { DynamoItem, GSINames, Index, TableConfig };
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DynamoDBDocument } from '@aws-sdk/lib-dynamodb';
|
|
2
|
+
|
|
3
|
+
type DynamoItem = {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
interface Index {
|
|
7
|
+
partitionKey: string;
|
|
8
|
+
sortKey?: string;
|
|
9
|
+
}
|
|
10
|
+
interface IndexConfig {
|
|
11
|
+
partitionKey: string;
|
|
12
|
+
sortKey?: string;
|
|
13
|
+
gsis?: Record<string, Index>;
|
|
14
|
+
}
|
|
15
|
+
interface TableConfig {
|
|
16
|
+
client: DynamoDBDocument;
|
|
17
|
+
tableName: string;
|
|
18
|
+
indexes: IndexConfig;
|
|
19
|
+
}
|
|
20
|
+
type GSINames<T extends TableConfig> = keyof NonNullable<T["indexes"]["gsis"]>;
|
|
21
|
+
|
|
22
|
+
export type { DynamoItem, GSINames, Index, TableConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
// src/utils/key-template.ts
|
|
3
|
+
// src/utils/partition-key-template.ts
|
|
4
4
|
function partitionKey(strings, ...keys) {
|
|
5
5
|
return (params) => {
|
|
6
6
|
let result = strings[0] ?? "";
|
|
@@ -15,5 +15,5 @@ function partitionKey(strings, ...keys) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
exports.partitionKey = partitionKey;
|
|
18
|
-
//# sourceMappingURL=key-template.cjs.map
|
|
19
|
-
//# sourceMappingURL=key-template.cjs.map
|
|
18
|
+
//# sourceMappingURL=partition-key-template.cjs.map
|
|
19
|
+
//# sourceMappingURL=partition-key-template.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/partition-key-template.ts"],"names":[],"mappings":";;;AA8BO,SAAS,YAAA,CACd,YACG,IACwC,EAAA;AAC3C,EAAA,OAAO,CAAC,MAAW,KAAA;AACjB,IAAI,IAAA,MAAA,GAAS,OAAQ,CAAA,CAAC,CAAK,IAAA,EAAA;AAE3B,IAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,IAAA,CAAK,QAAQ,CAAK,EAAA,EAAA;AACpC,MAAM,MAAA,GAAA,GAAM,KAAK,CAAC,CAAA;AAClB,MAAA,IAAI,GAAK,EAAA;AACP,QAAA,MAAA,IAAU,OAAO,GAAgB,CAAA,IAAK,OAAQ,CAAA,CAAA,GAAI,CAAC,CAAK,IAAA,EAAA,CAAA;AAAA;AAC1D;AAGF,IAAO,OAAA,MAAA;AAAA,GACT;AACF","file":"partition-key-template.cjs","sourcesContent":["export type StrictGenerateType<T extends readonly string[]> = {\n [K in T[number]]: string;\n};\n\n/**\n * Creates a template function for generating DynamoDB partition keys with dynamic values.\n * Use this function when you need to:\n * - Create consistent partition key patterns with variable parts\n * - Generate partition keys that follow a specific format\n * - Ensure type safety for partition key parameters\n * - Require all parameters to be provided\n *\n * @example\n * ```ts\n * // Define a partition key template\n * const pk = partitionKey`country#${\"country\"}#enclosure#${\"enclosure\"}`;\n *\n * // Generate a partition key (all parameters required)\n * const key = pk({ country: \"NZ\", enclosure: \"A1\" });\n * // Result: \"country#NZ#enclosure#A1\"\n *\n * // Type checking ensures all parameters are provided\n * const invalidKey = pk({ country: \"NZ\" }); // TypeScript error\n * ```\n *\n * @param strings - The static parts of the template string\n * @param keys - The dynamic parts of the template string that will be replaced with values\n *\n * @returns A function that accepts an object with the dynamic values and returns the formatted partition key\n */\nexport function partitionKey<T extends readonly string[]>(\n strings: TemplateStringsArray,\n ...keys: T\n): (params: StrictGenerateType<T>) => string {\n return (params) => {\n let result = strings[0] ?? \"\";\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key) {\n result += params[key as T[number]] + (strings[i + 1] ?? \"\");\n }\n }\n\n return result;\n };\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
type StrictGenerateType<T extends readonly string[]> = {
|
|
2
|
+
[K in T[number]]: string;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Creates a template function for generating DynamoDB partition keys with dynamic values.
|
|
6
|
+
* Use this function when you need to:
|
|
7
|
+
* - Create consistent partition key patterns with variable parts
|
|
8
|
+
* - Generate partition keys that follow a specific format
|
|
9
|
+
* - Ensure type safety for partition key parameters
|
|
10
|
+
* - Require all parameters to be provided
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Define a partition key template
|
|
15
|
+
* const pk = partitionKey`country#${"country"}#enclosure#${"enclosure"}`;
|
|
16
|
+
*
|
|
17
|
+
* // Generate a partition key (all parameters required)
|
|
18
|
+
* const key = pk({ country: "NZ", enclosure: "A1" });
|
|
19
|
+
* // Result: "country#NZ#enclosure#A1"
|
|
20
|
+
*
|
|
21
|
+
* // Type checking ensures all parameters are provided
|
|
22
|
+
* const invalidKey = pk({ country: "NZ" }); // TypeScript error
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param strings - The static parts of the template string
|
|
26
|
+
* @param keys - The dynamic parts of the template string that will be replaced with values
|
|
27
|
+
*
|
|
28
|
+
* @returns A function that accepts an object with the dynamic values and returns the formatted partition key
|
|
29
|
+
*/
|
|
30
|
+
declare function partitionKey<T extends readonly string[]>(strings: TemplateStringsArray, ...keys: T): (params: StrictGenerateType<T>) => string;
|
|
31
|
+
|
|
32
|
+
export { type StrictGenerateType, partitionKey };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
type StrictGenerateType<T extends readonly string[]> = {
|
|
2
|
+
[K in T[number]]: string;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Creates a template function for generating DynamoDB partition keys with dynamic values.
|
|
6
|
+
* Use this function when you need to:
|
|
7
|
+
* - Create consistent partition key patterns with variable parts
|
|
8
|
+
* - Generate partition keys that follow a specific format
|
|
9
|
+
* - Ensure type safety for partition key parameters
|
|
10
|
+
* - Require all parameters to be provided
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Define a partition key template
|
|
15
|
+
* const pk = partitionKey`country#${"country"}#enclosure#${"enclosure"}`;
|
|
16
|
+
*
|
|
17
|
+
* // Generate a partition key (all parameters required)
|
|
18
|
+
* const key = pk({ country: "NZ", enclosure: "A1" });
|
|
19
|
+
* // Result: "country#NZ#enclosure#A1"
|
|
20
|
+
*
|
|
21
|
+
* // Type checking ensures all parameters are provided
|
|
22
|
+
* const invalidKey = pk({ country: "NZ" }); // TypeScript error
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param strings - The static parts of the template string
|
|
26
|
+
* @param keys - The dynamic parts of the template string that will be replaced with values
|
|
27
|
+
*
|
|
28
|
+
* @returns A function that accepts an object with the dynamic values and returns the formatted partition key
|
|
29
|
+
*/
|
|
30
|
+
declare function partitionKey<T extends readonly string[]>(strings: TemplateStringsArray, ...keys: T): (params: StrictGenerateType<T>) => string;
|
|
31
|
+
|
|
32
|
+
export { type StrictGenerateType, partitionKey };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/utils/key-template.ts
|
|
1
|
+
// src/utils/partition-key-template.ts
|
|
2
2
|
function partitionKey(strings, ...keys) {
|
|
3
3
|
return (params) => {
|
|
4
4
|
let result = strings[0] ?? "";
|
|
@@ -13,5 +13,5 @@ function partitionKey(strings, ...keys) {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export { partitionKey };
|
|
16
|
-
//# sourceMappingURL=key-template.js.map
|
|
17
|
-
//# sourceMappingURL=key-template.js.map
|
|
16
|
+
//# sourceMappingURL=partition-key-template.js.map
|
|
17
|
+
//# sourceMappingURL=partition-key-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/partition-key-template.ts"],"names":[],"mappings":";AA8BO,SAAS,YAAA,CACd,YACG,IACwC,EAAA;AAC3C,EAAA,OAAO,CAAC,MAAW,KAAA;AACjB,IAAI,IAAA,MAAA,GAAS,OAAQ,CAAA,CAAC,CAAK,IAAA,EAAA;AAE3B,IAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,IAAA,CAAK,QAAQ,CAAK,EAAA,EAAA;AACpC,MAAM,MAAA,GAAA,GAAM,KAAK,CAAC,CAAA;AAClB,MAAA,IAAI,GAAK,EAAA;AACP,QAAA,MAAA,IAAU,OAAO,GAAgB,CAAA,IAAK,OAAQ,CAAA,CAAA,GAAI,CAAC,CAAK,IAAA,EAAA,CAAA;AAAA;AAC1D;AAGF,IAAO,OAAA,MAAA;AAAA,GACT;AACF","file":"partition-key-template.js","sourcesContent":["export type StrictGenerateType<T extends readonly string[]> = {\n [K in T[number]]: string;\n};\n\n/**\n * Creates a template function for generating DynamoDB partition keys with dynamic values.\n * Use this function when you need to:\n * - Create consistent partition key patterns with variable parts\n * - Generate partition keys that follow a specific format\n * - Ensure type safety for partition key parameters\n * - Require all parameters to be provided\n *\n * @example\n * ```ts\n * // Define a partition key template\n * const pk = partitionKey`country#${\"country\"}#enclosure#${\"enclosure\"}`;\n *\n * // Generate a partition key (all parameters required)\n * const key = pk({ country: \"NZ\", enclosure: \"A1\" });\n * // Result: \"country#NZ#enclosure#A1\"\n *\n * // Type checking ensures all parameters are provided\n * const invalidKey = pk({ country: \"NZ\" }); // TypeScript error\n * ```\n *\n * @param strings - The static parts of the template string\n * @param keys - The dynamic parts of the template string that will be replaced with values\n *\n * @returns A function that accepts an object with the dynamic values and returns the formatted partition key\n */\nexport function partitionKey<T extends readonly string[]>(\n strings: TemplateStringsArray,\n ...keys: T\n): (params: StrictGenerateType<T>) => string {\n return (params) => {\n let result = strings[0] ?? \"\";\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key) {\n result += params[key as T[number]] + (strings[i + 1] ?? \"\");\n }\n }\n\n return result;\n };\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
type GenerateType<T extends readonly string[], U extends string = never> = T extends [infer F, ...infer R] ? F extends string ? R extends string[] ? ({
|
|
2
|
+
[K in F | U]: string | number;
|
|
3
|
+
} & Partial<Record<Exclude<T[number], F | U>, never>>) | GenerateType<R, F | U> : never : never : never;
|
|
4
|
+
/**
|
|
5
|
+
* Creates a template function for generating DynamoDB sort keys with dynamic values.
|
|
6
|
+
* Use this function when you need to:
|
|
7
|
+
* - Create consistent sort key patterns with variable parts
|
|
8
|
+
* - Generate sort keys that follow a specific format
|
|
9
|
+
* - Ensure type safety for sort key parameters
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* // Define a sort key template
|
|
14
|
+
* const sk = sortKey`country#${"country"}#enclosure#${"enclosure"}#diet#${"diet"}`;
|
|
15
|
+
*
|
|
16
|
+
* // Generate a sort key with partial parameters
|
|
17
|
+
* const templatedString = sk({ country: "NZ", enclosure: "A1" });
|
|
18
|
+
* // Result: "country#NZ#enclosure#A1#diet#"
|
|
19
|
+
*
|
|
20
|
+
* // Generate a complete sort key
|
|
21
|
+
* const fullKey = sk({ country: "NZ", enclosure: "A1", diet: "carnivore" });
|
|
22
|
+
* // Result: "country#NZ#enclosure#A1#diet#carnivore"
|
|
23
|
+
*
|
|
24
|
+
* // Type checking ensures only valid parameters are used
|
|
25
|
+
* const invalidKey = sk({ country: "NZ", invalid: "value" }); // TypeScript error
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param strings - The static parts of the template string
|
|
29
|
+
* @param keys - The dynamic parts of the template string that will be replaced with values
|
|
30
|
+
*
|
|
31
|
+
* @returns A function that accepts an object with the dynamic values and returns the formatted sort key
|
|
32
|
+
*/
|
|
33
|
+
declare function sortKey<T extends readonly string[]>(strings: TemplateStringsArray, ...keys: T): (params: GenerateType<T>) => string;
|
|
34
|
+
|
|
35
|
+
export { type GenerateType, sortKey };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
type GenerateType<T extends readonly string[], U extends string = never> = T extends [infer F, ...infer R] ? F extends string ? R extends string[] ? ({
|
|
2
|
+
[K in F | U]: string | number;
|
|
3
|
+
} & Partial<Record<Exclude<T[number], F | U>, never>>) | GenerateType<R, F | U> : never : never : never;
|
|
4
|
+
/**
|
|
5
|
+
* Creates a template function for generating DynamoDB sort keys with dynamic values.
|
|
6
|
+
* Use this function when you need to:
|
|
7
|
+
* - Create consistent sort key patterns with variable parts
|
|
8
|
+
* - Generate sort keys that follow a specific format
|
|
9
|
+
* - Ensure type safety for sort key parameters
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* // Define a sort key template
|
|
14
|
+
* const sk = sortKey`country#${"country"}#enclosure#${"enclosure"}#diet#${"diet"}`;
|
|
15
|
+
*
|
|
16
|
+
* // Generate a sort key with partial parameters
|
|
17
|
+
* const templatedString = sk({ country: "NZ", enclosure: "A1" });
|
|
18
|
+
* // Result: "country#NZ#enclosure#A1#diet#"
|
|
19
|
+
*
|
|
20
|
+
* // Generate a complete sort key
|
|
21
|
+
* const fullKey = sk({ country: "NZ", enclosure: "A1", diet: "carnivore" });
|
|
22
|
+
* // Result: "country#NZ#enclosure#A1#diet#carnivore"
|
|
23
|
+
*
|
|
24
|
+
* // Type checking ensures only valid parameters are used
|
|
25
|
+
* const invalidKey = sk({ country: "NZ", invalid: "value" }); // TypeScript error
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param strings - The static parts of the template string
|
|
29
|
+
* @param keys - The dynamic parts of the template string that will be replaced with values
|
|
30
|
+
*
|
|
31
|
+
* @returns A function that accepts an object with the dynamic values and returns the formatted sort key
|
|
32
|
+
*/
|
|
33
|
+
declare function sortKey<T extends readonly string[]>(strings: TemplateStringsArray, ...keys: T): (params: GenerateType<T>) => string;
|
|
34
|
+
|
|
35
|
+
export { type GenerateType, sortKey };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dyno-table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-0",
|
|
4
4
|
"description": "A TypeScript library to simplify working with DynamoDB",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -11,10 +11,80 @@
|
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"import": "./dist/index.js",
|
|
13
13
|
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./table": {
|
|
16
|
+
"types": "./dist/table.d.ts",
|
|
17
|
+
"import": "./dist/table.js",
|
|
18
|
+
"require": "./dist/table.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./entity": {
|
|
21
|
+
"types": "./dist/entity.d.ts",
|
|
22
|
+
"import": "./dist/entity.js",
|
|
23
|
+
"require": "./dist/entity.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./conditions": {
|
|
26
|
+
"types": "./dist/conditions.d.ts",
|
|
27
|
+
"import": "./dist/conditions.js",
|
|
28
|
+
"require": "./dist/conditions.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./types": {
|
|
31
|
+
"types": "./dist/types.d.ts",
|
|
32
|
+
"import": "./dist/types.js",
|
|
33
|
+
"require": "./dist/types.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./standard-schema": {
|
|
36
|
+
"types": "./dist/standard-schema.d.ts",
|
|
37
|
+
"import": "./dist/standard-schema.js",
|
|
38
|
+
"require": "./dist/standard-schema.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./utils/partition-key-template": {
|
|
41
|
+
"types": "./dist/utils/partition-key-template.d.ts",
|
|
42
|
+
"import": "./dist/utils/partition-key-template.js",
|
|
43
|
+
"require": "./dist/utils/partition-key-template.cjs"
|
|
44
|
+
},
|
|
45
|
+
"./utils/sort-key-template": {
|
|
46
|
+
"types": "./dist/utils/sort-key-template.d.ts",
|
|
47
|
+
"import": "./dist/utils/sort-key-template.js",
|
|
48
|
+
"require": "./dist/utils/sort-key-template.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./builders/query-builder": {
|
|
51
|
+
"types": "./dist/builders/query-builder.d.ts",
|
|
52
|
+
"import": "./dist/builders/query-builder.js",
|
|
53
|
+
"require": "./dist/builders/query-builder.cjs"
|
|
54
|
+
},
|
|
55
|
+
"./builders/paginator": {
|
|
56
|
+
"types": "./dist/builders/paginator.d.ts",
|
|
57
|
+
"import": "./dist/builders/paginator.js",
|
|
58
|
+
"require": "./dist/builders/paginator.cjs"
|
|
59
|
+
},
|
|
60
|
+
"./builders/put-builder": {
|
|
61
|
+
"types": "./dist/builders/put-builder.d.ts",
|
|
62
|
+
"import": "./dist/builders/put-builder.js",
|
|
63
|
+
"require": "./dist/builders/put-builder.cjs"
|
|
64
|
+
},
|
|
65
|
+
"./builders/update-builder": {
|
|
66
|
+
"types": "./dist/builders/update-builder.d.ts",
|
|
67
|
+
"import": "./dist/builders/update-builder.js",
|
|
68
|
+
"require": "./dist/builders/update-builder.cjs"
|
|
69
|
+
},
|
|
70
|
+
"./builders/delete-builder": {
|
|
71
|
+
"types": "./dist/builders/delete-builder.d.ts",
|
|
72
|
+
"import": "./dist/builders/delete-builder.js",
|
|
73
|
+
"require": "./dist/builders/delete-builder.cjs"
|
|
74
|
+
},
|
|
75
|
+
"./builders/transaction-builder": {
|
|
76
|
+
"types": "./dist/builders/transaction-builder.d.ts",
|
|
77
|
+
"import": "./dist/builders/transaction-builder.js",
|
|
78
|
+
"require": "./dist/builders/transaction-builder.cjs"
|
|
79
|
+
},
|
|
80
|
+
"./builders/condition-check-builder": {
|
|
81
|
+
"types": "./dist/builders/condition-check-builder.d.ts",
|
|
82
|
+
"import": "./dist/builders/condition-check-builder.js",
|
|
83
|
+
"require": "./dist/builders/condition-check-builder.cjs"
|
|
14
84
|
}
|
|
15
85
|
},
|
|
16
86
|
"scripts": {
|
|
17
|
-
"build": "tsup
|
|
87
|
+
"build": "tsup --config tsup.config.ts",
|
|
18
88
|
"clean": "rm -rf dist",
|
|
19
89
|
"test": "vitest run",
|
|
20
90
|
"test:w": "vitest watch",
|
|
@@ -26,7 +96,12 @@
|
|
|
26
96
|
"ddb:start": "docker compose up -d",
|
|
27
97
|
"circular": "npx madge --circular --ts-config ./tsconfig.json --extensions ts,tsx src/"
|
|
28
98
|
},
|
|
29
|
-
"keywords": [
|
|
99
|
+
"keywords": [
|
|
100
|
+
"dynamodb",
|
|
101
|
+
"aws",
|
|
102
|
+
"typescript",
|
|
103
|
+
"database"
|
|
104
|
+
],
|
|
30
105
|
"author": "Maunder",
|
|
31
106
|
"license": "ISC",
|
|
32
107
|
"repository": {
|
|
@@ -36,16 +111,18 @@
|
|
|
36
111
|
"devDependencies": {
|
|
37
112
|
"@babel/preset-typescript": "^7.26.0",
|
|
38
113
|
"@biomejs/biome": "1.9.4",
|
|
39
|
-
"@types/node": "^20.
|
|
40
|
-
"rimraf": "^5.0.
|
|
41
|
-
"tsup": "^8.
|
|
42
|
-
"typescript": "^5.
|
|
43
|
-
"vitest": "
|
|
114
|
+
"@types/node": "^20.17.11",
|
|
115
|
+
"rimraf": "^5.0.10",
|
|
116
|
+
"tsup": "^8.3.5",
|
|
117
|
+
"typescript": "^5.7.2",
|
|
118
|
+
"vitest": "3.0.5"
|
|
44
119
|
},
|
|
45
120
|
"peerDependencies": {
|
|
46
121
|
"@aws-sdk/client-dynamodb": "^3.0.0",
|
|
47
122
|
"@aws-sdk/lib-dynamodb": "^3.0.0"
|
|
48
123
|
},
|
|
49
|
-
"files": [
|
|
124
|
+
"files": [
|
|
125
|
+
"dist"
|
|
126
|
+
],
|
|
50
127
|
"packageManager": "pnpm@10.5.2"
|
|
51
128
|
}
|