@awsless/awsless 0.0.581 → 0.0.582

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.
@@ -389,36 +389,38 @@ var OnLogDefaultSchema = z14.union([
389
389
  })
390
390
  ]).optional().describe("Define a subscription on all Lambda functions logs.");
391
391
 
392
- // src/feature/pubsub/appsync/schema.ts
392
+ // src/feature/pubsub/schema.ts
393
393
  import { z as z15 } from "zod";
394
394
  var DomainSchema = ResourceIdSchema.describe("The domain id to link your Pubsub API with.");
395
395
  var PubSubDefaultSchema = z15.record(
396
396
  ResourceIdSchema,
397
397
  z15.object({
398
- auth: FunctionSchema.describe("The authentication function for the pubsub API."),
398
+ auth: FunctionSchema,
399
399
  domain: DomainSchema.optional(),
400
- subDomain: z15.string().optional(),
401
- namespaces: z15.array(z15.string()).optional().describe('The namespaces for the PubSub API. If not set, a single "default" namespace is created.'),
402
- logLevel: z15.enum(["none", "info", "error", "debug", "all"]).optional().describe("The logging level for AppSync API. When set, logging is enabled.")
400
+ subDomain: z15.string().optional()
401
+ // auth: z.union([
402
+ // ResourceIdSchema,
403
+ // z.object({
404
+ // authorizer: FunctionSchema,
405
+ // // ttl: AuthorizerTtl.default('1 hour'),
406
+ // }),
407
+ // ]),
408
+ // policy: z
409
+ // .object({
410
+ // publish: z.array(z.string()).optional(),
411
+ // subscribe: z.array(z.string()).optional(),
412
+ // })
413
+ // .optional(),
403
414
  })
404
- ).optional().describe("Define the pubsub API configuration in your stack.");
415
+ ).optional().describe("Define the pubsub subscriber in your stack.");
405
416
  var PubSubSchema = z15.record(
406
417
  ResourceIdSchema,
407
418
  z15.object({
408
- channels: z15.array(z15.string()).describe("The event channels this subscriber listens to."),
409
- filter: z15.object({
410
- eventType: z15.string().optional().describe("Filter events by event type.")
411
- // Add more filter options as needed
412
- // userId: z.string().optional(),
413
- // custom: z.record(z.string(), z.any()).optional(),
414
- }).optional().describe("Event filtering options."),
415
- consumer: FunctionSchema.describe("The consuming lambda function properties."),
416
- batchSize: z15.number().int().min(1).max(100).default(1).describe("Number of events to batch before invoking the consumer function."),
417
- retryPolicy: z15.object({
418
- maxRetries: z15.number().int().min(0).max(3).default(2).describe("Maximum number of retry attempts.")
419
- }).optional().describe("Retry policy for failed event processing.")
419
+ sql: z15.string().describe("The SQL statement used to query the IOT topic."),
420
+ sqlVersion: z15.enum(["2015-10-08", "2016-03-23", "beta"]).default("2016-03-23").describe("The version of the SQL rules engine to use when evaluating the rule."),
421
+ consumer: FunctionSchema.describe("The consuming lambda function properties.")
420
422
  })
421
- ).optional().describe("Define the pubsub event subscribers in your stack.");
423
+ ).optional().describe("Define the pubsub subscriber in your stack.");
422
424
 
423
425
  // src/feature/queue/schema.ts
424
426
  import { days as days2, hours, minutes as minutes2, seconds as seconds2 } from "@awsless/duration";
Binary file
Binary file
@@ -1 +1 @@
1
- 809ac79b62f213f5ced66b7a051b247cda10444b
1
+ f5dbbf3d9b5e37eda3a77bbec4453130ace93efd
Binary file
package/dist/prebuild.js CHANGED
@@ -118,6 +118,7 @@ var bundleTypeScript = async ({
118
118
  }
119
119
  const code = Buffer.from(item.code, "utf8");
120
120
  const map = item.map ? Buffer.from(item.map.toString(), "utf8") : void 0;
121
+ item.map?.version;
121
122
  hash.update(code);
122
123
  files.push({
123
124
  name: item.fileName,
package/dist/server.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AwsCredentialIdentityProvider } from '@aws-sdk/types';
2
2
  import * as vitest from 'vitest';
3
- import { Duration, DurationFormat } from '@awsless/duration';
3
+ import { Duration } from '@awsless/duration';
4
4
  import { QoS } from '@awsless/iot';
5
5
  export { QoS } from '@awsless/iot';
6
6
  import { IoTCustomAuthorizerResult } from 'aws-lambda';
@@ -131,7 +131,7 @@ type RpcAuthorizerResponse = {
131
131
  authorized: true;
132
132
  context?: unknown;
133
133
  lockKey?: string;
134
- ttl: DurationFormat;
134
+ ttl: Duration;
135
135
  };
136
136
 
137
137
  declare const getSearchName: <N extends string, S extends string = "stack">(resourceName: N, stackName?: S) => `app--${S}--search--${N}`;
@@ -142,9 +142,9 @@ interface SearchResources {
142
142
  }
143
143
  declare const Search: SearchResources;
144
144
 
145
- declare const getSiteBucketName: <N extends string, S extends string = "stack">(resourceName: N, stackName?: S) => `app--${S}--site--${N}--${string}`;
145
+ declare const getSiteBucketName: <N extends string, S extends string = "stack">(resourceName: N, stackName?: S) => `app--${S}--site--${N}--app-id`;
146
146
 
147
- declare const getStoreName: <N extends string, S extends string = "stack">(resourceName: N, stackName?: S) => `app--${S}--store--${N}--${string}`;
147
+ declare const getStoreName: <N extends string, S extends string = "stack">(resourceName: N, stackName?: S) => `app--${S}--store--${N}--app-id`;
148
148
  interface StoreResources {
149
149
  }
150
150
  declare const Store: StoreResources;
package/dist/server.js CHANGED
@@ -12,6 +12,7 @@ import { publish } from "@awsless/sns";
12
12
  // src/lib/server/util.ts
13
13
  import { kebabCase } from "change-case";
14
14
  var APP = process.env.APP ?? "app";
15
+ var APP_ID = process.env.APP_ID ?? "app-id";
15
16
  var STACK = process.env.STACK ?? "stack";
16
17
  var IS_TEST = process.env.NODE_ENV === "test";
17
18
  var build = (opt) => {
@@ -617,11 +618,11 @@ var Search = /* @__PURE__ */ createProxy((stack) => {
617
618
  });
618
619
 
619
620
  // src/lib/server/site.ts
620
- var getSiteBucketName = bindPostfixedLocalResourceName("site", process.env.APP_ID);
621
+ var getSiteBucketName = bindPostfixedLocalResourceName("site", APP_ID);
621
622
 
622
623
  // src/lib/server/store.ts
623
624
  import { deleteObject, getObject, headObject, putObject } from "@awsless/s3";
624
- var getStoreName = bindPostfixedLocalResourceName("store", process.env.APP_ID);
625
+ var getStoreName = bindPostfixedLocalResourceName("store", APP_ID);
625
626
  var Store = /* @__PURE__ */ createProxy((stack) => {
626
627
  return createProxy((name) => {
627
628
  const bucket = getStoreName(name, stack);