@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.
- package/dist/app.json +1 -1
- package/dist/bin.js +22 -19
- package/dist/build-json-schema.js +21 -19
- package/dist/prebuild/icon/bundle.zip +0 -0
- package/dist/prebuild/image/bundle.zip +0 -0
- package/dist/prebuild/rpc/HASH +1 -1
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/prebuild.js +1 -0
- package/dist/server.d.ts +4 -4
- package/dist/server.js +3 -2
- package/dist/stack.json +1 -1
- package/package.json +13 -13
|
@@ -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/
|
|
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
|
|
398
|
+
auth: FunctionSchema,
|
|
399
399
|
domain: DomainSchema.optional(),
|
|
400
|
-
subDomain: z15.string().optional()
|
|
401
|
-
|
|
402
|
-
|
|
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
|
|
415
|
+
).optional().describe("Define the pubsub subscriber in your stack.");
|
|
405
416
|
var PubSubSchema = z15.record(
|
|
406
417
|
ResourceIdSchema,
|
|
407
418
|
z15.object({
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
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
|
|
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
|
package/dist/prebuild/rpc/HASH
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f5dbbf3d9b5e37eda3a77bbec4453130ace93efd
|
|
Binary file
|
package/dist/prebuild.js
CHANGED
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
|
|
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:
|
|
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}
|
|
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}
|
|
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",
|
|
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",
|
|
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);
|