@awsless/awsless 0.0.628 → 0.0.629

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/dist/bin.js CHANGED
@@ -2434,10 +2434,10 @@ var TablesSchema = z41.record(
2434
2434
  indexes: z41.record(
2435
2435
  z41.string(),
2436
2436
  z41.object({
2437
- hash: KeySchema.describe(
2437
+ hash: z41.union([KeySchema.transform((v) => [v]), KeySchema.array()]).describe(
2438
2438
  "Specifies the name of the partition / hash key that makes up the primary key for the global secondary index."
2439
2439
  ),
2440
- sort: KeySchema.optional().describe(
2440
+ sort: z41.union([KeySchema.transform((v) => [v]), KeySchema.array()]).optional().describe(
2441
2441
  "Specifies the name of the range / sort key that makes up the primary key for the global secondary index."
2442
2442
  ),
2443
2443
  projection: z41.enum(["all", "keys-only"]).default("all").describe(
@@ -5823,9 +5823,17 @@ var tableFeature = defineFeature({
5823
5823
  },
5824
5824
  globalSecondaryIndex: Object.entries(props.indexes ?? {}).map(([name2, index]) => ({
5825
5825
  name: name2,
5826
- hashKey: index.hash,
5827
- rangeKey: index.sort,
5828
- projectionType: constantCase11(index.projection)
5826
+ projectionType: constantCase11(index.projection),
5827
+ keySchema: [
5828
+ ...index.hash.map((name3) => ({
5829
+ keyType: "HASH",
5830
+ attributeName: name3
5831
+ })),
5832
+ ...(index.sort ?? []).map((name3) => ({
5833
+ keyType: "RANGE",
5834
+ attributeName: name3
5835
+ }))
5836
+ ]
5829
5837
  })),
5830
5838
  deletionProtectionEnabled: ctx.appConfig.removal === "retain"
5831
5839
  },
@@ -1749,10 +1749,10 @@ var TablesSchema = z37.record(
1749
1749
  indexes: z37.record(
1750
1750
  z37.string(),
1751
1751
  z37.object({
1752
- hash: KeySchema.describe(
1752
+ hash: z37.union([KeySchema.transform((v) => [v]), KeySchema.array()]).describe(
1753
1753
  "Specifies the name of the partition / hash key that makes up the primary key for the global secondary index."
1754
1754
  ),
1755
- sort: KeySchema.optional().describe(
1755
+ sort: z37.union([KeySchema.transform((v) => [v]), KeySchema.array()]).optional().describe(
1756
1756
  "Specifies the name of the range / sort key that makes up the primary key for the global secondary index."
1757
1757
  ),
1758
1758
  projection: z37.enum(["all", "keys-only"]).default("all").describe(
Binary file
Binary file
Binary file