@awsless/awsless 0.0.198 → 0.0.200

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
@@ -3000,9 +3000,10 @@ var pubsubFeature = defineFeature({
3000
3000
  onStack(ctx) {
3001
3001
  for (const [id, props] of Object.entries(ctx.stackConfig.pubsub ?? {})) {
3002
3002
  const group = new Node8(ctx.stack, "pubsub", id);
3003
- const { lambda } = createLambdaFunction(group, ctx, `pubsub`, "function", props.consumer);
3003
+ const { lambda } = createLambdaFunction(group, ctx, `pubsub`, id, props.consumer);
3004
+ const name = formatLocalResourceName(ctx.app.name, ctx.stack.name, "pubsub", id);
3004
3005
  const topic = new aws8.iot.TopicRule(group, "rule", {
3005
- name: formatLocalResourceName(ctx.app.name, ctx.stack.name, "pubsub", id).replaceAll("-", "_"),
3006
+ name: name.replaceAll("-", "_"),
3006
3007
  sql: props.sql,
3007
3008
  sqlVersion: props.sqlVersion,
3008
3009
  actions: [{ lambda: { functionArn: lambda.arn } }]
@@ -3627,24 +3628,6 @@ var httpFeature = defineFeature({
3627
3628
  // src/feature/search/index.ts
3628
3629
  import { Node as Node16, aws as aws16 } from "@awsless/formation";
3629
3630
  import { constantCase as constantCase5 } from "change-case";
3630
- var typeGenCode6 = `
3631
- import {
3632
- migrate as sMigrate,
3633
- search as sSearch,
3634
- indexItem as sIndexItem,
3635
- updateItem as sUpdateItem,
3636
- deleteItem as sDeleteItem,
3637
- } from '@awsless/open-search'
3638
-
3639
- type Store<Name extends string> = {
3640
- readonly name: Name
3641
- readonly migrate: (...args: Parameters<typeof sMigrate>) => ReturnType<typeof sMigrate>
3642
- readonly search: (...args: Parameters<typeof sMigrate>) => ReturnType<typeof sSearch>
3643
- readonly indexItem: (...args: Parameters<typeof sIndexItem>) => ReturnType<typeof sIndexItem>
3644
- readonly updateItem: (...args: Parameters<typeof sUpdateItem>) => ReturnType<typeof sUpdateItem>
3645
- readonly deleteItem: (...args: Parameters<typeof sDeleteItem>) => ReturnType<typeof sDeleteItem>
3646
- }
3647
- `;
3648
3631
  var searchFeature = defineFeature({
3649
3632
  name: "search",
3650
3633
  async onTypeGen(ctx) {
@@ -3658,7 +3641,6 @@ var searchFeature = defineFeature({
3658
3641
  }
3659
3642
  resources.addType(stack.name, list4);
3660
3643
  }
3661
- gen.addCode(typeGenCode6);
3662
3644
  gen.addInterface("SearchResources", resources);
3663
3645
  await ctx.write("search.d.ts", gen, true);
3664
3646
  },
@@ -3677,7 +3659,7 @@ var searchFeature = defineFeature({
3677
3659
  statements: [
3678
3660
  {
3679
3661
  principal: "lambda.amazonaws.com",
3680
- sourceArn: `arn:aws:lambda:${ctx.appConfig.region}:${ctx.accountId}:function:${ctx.app.name}--${ctx.stack.name}--*`
3662
+ sourceArn: `arn:aws:lambfa:${ctx.appConfig.region}:${ctx.accountId}:function:${ctx.app.name}--${ctx.stack.name}--*`
3681
3663
  }
3682
3664
  ]
3683
3665
  }
package/dist/server.js CHANGED
@@ -263,14 +263,7 @@ var Config = /* @__PURE__ */ new Proxy(
263
263
 
264
264
  // src/lib/resource/search.ts
265
265
  import { constantCase as constantCase4 } from "change-case";
266
- import {
267
- searchClient,
268
- migrate as sMigrate,
269
- search as sSearch,
270
- indexItem as sIndexItem,
271
- updateItem as sUpdateItem,
272
- deleteItem as sDeleteItem
273
- } from "@awsless/open-search";
266
+ import { searchClient, migrate, search, indexItem, updateItem, deleteItem } from "@awsless/open-search";
274
267
  var getSearchName = bindLocalResourceName("search");
275
268
  var getSearchProps = (name, stack = STACK) => {
276
269
  return {
@@ -283,20 +276,21 @@ var Search = /* @__PURE__ */ createProxy((stack) => {
283
276
  const client = searchClient({ node: domain });
284
277
  return {
285
278
  name: getSearchName(name, stack),
279
+ domain,
286
280
  migrate(...args) {
287
- return sMigrate(args[0], { client });
281
+ return migrate(args[0], { client });
288
282
  },
289
283
  search(...args) {
290
- return sSearch(args[0], { client, ...args[1] });
284
+ return search(args[0], { client, ...args[1] });
291
285
  },
292
286
  indexItem(...args) {
293
- return sIndexItem(args[0], args[1], args[2], { client, ...args[3] });
287
+ return indexItem(args[0], args[1], args[2], { client, ...args[3] });
294
288
  },
295
289
  updateItem(...args) {
296
- return sUpdateItem(args[0], args[1], args[2], { client, ...args[3] });
290
+ return updateItem(args[0], args[1], args[2], { client, ...args[3] });
297
291
  },
298
292
  deleteItem(...args) {
299
- return sDeleteItem(args[0], args[1], { client, ...args[2] });
293
+ return deleteItem(args[0], args[1], { client, ...args[2] });
300
294
  }
301
295
  };
302
296
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.198",
3
+ "version": "0.0.200",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -29,13 +29,13 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@awsless/lambda": "^0.0.18",
32
- "@awsless/open-search": "^0.0.11",
33
32
  "@awsless/redis": "^0.0.12",
34
- "@awsless/s3": "^0.0.10",
33
+ "@awsless/open-search": "^0.0.11",
35
34
  "@awsless/sns": "^0.0.7",
36
35
  "@awsless/sqs": "^0.0.7",
37
- "@awsless/validate": "^0.0.13",
38
36
  "@awsless/ssm": "^0.0.7",
37
+ "@awsless/s3": "^0.0.10",
38
+ "@awsless/validate": "^0.0.13",
39
39
  "@awsless/weak-cache": "^0.0.1"
40
40
  },
41
41
  "dependencies": {
@@ -98,10 +98,10 @@
98
98
  "zod": "^3.21.4",
99
99
  "zod-to-json-schema": "^3.22.3",
100
100
  "@awsless/duration": "^0.0.1",
101
+ "@awsless/formation": "^0.0.16",
101
102
  "@awsless/size": "^0.0.1",
102
103
  "@awsless/graphql": "^0.0.9",
103
104
  "@awsless/validate": "^0.0.13",
104
- "@awsless/formation": "^0.0.15",
105
105
  "@awsless/code": "^0.0.10"
106
106
  },
107
107
  "scripts": {