@awsless/awsless 0.0.628 → 0.0.630

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(
@@ -5789,8 +5789,12 @@ var tableFeature = defineFeature({
5789
5789
  [
5790
5790
  props.hash,
5791
5791
  props.sort,
5792
- ...Object.values(props.indexes ?? {}).map((index) => [index.hash, index.sort])
5793
- ].flat().filter((v) => !!v)
5792
+ ...Object.values(props.indexes ?? {}).map((index) => [
5793
+ //
5794
+ index.hash,
5795
+ index.sort
5796
+ ])
5797
+ ].flat(2).filter((v) => !!v)
5794
5798
  );
5795
5799
  const types2 = {
5796
5800
  string: "S",
@@ -5823,9 +5827,17 @@ var tableFeature = defineFeature({
5823
5827
  },
5824
5828
  globalSecondaryIndex: Object.entries(props.indexes ?? {}).map(([name2, index]) => ({
5825
5829
  name: name2,
5826
- hashKey: index.hash,
5827
- rangeKey: index.sort,
5828
- projectionType: constantCase11(index.projection)
5830
+ projectionType: constantCase11(index.projection),
5831
+ keySchema: [
5832
+ ...index.hash.map((name3) => ({
5833
+ keyType: "HASH",
5834
+ attributeName: name3
5835
+ })),
5836
+ ...(index.sort ?? []).map((name3) => ({
5837
+ keyType: "RANGE",
5838
+ attributeName: name3
5839
+ }))
5840
+ ]
5829
5841
  })),
5830
5842
  deletionProtectionEnabled: ctx.appConfig.removal === "retain"
5831
5843
  },
@@ -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