@awsless/awsless 0.0.85 → 0.0.87
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 +516 -170
- package/dist/features/cognito-client-secret/HASH +1 -0
- package/dist/features/cognito-client-secret/bundle.zip +0 -0
- package/dist/features/cognito-client-secret/index.js +61 -0
- package/dist/features/cognito-client-secret/index.mjs +59 -0
- package/dist/features/delete-bucket/HASH +1 -0
- package/dist/features/delete-bucket/bundle.zip +0 -0
- package/dist/features/delete-bucket/index.js +88 -0
- package/dist/features/{delete-bucket.js → delete-bucket/index.mjs} +2 -2
- package/dist/features/delete-hosted-zone/HASH +1 -0
- package/dist/features/delete-hosted-zone/bundle.zip +0 -0
- package/dist/features/delete-hosted-zone/index.js +130 -0
- package/dist/features/{delete-hosted-zone.js → delete-hosted-zone/index.mjs} +2 -2
- package/dist/features/global-exports/HASH +1 -0
- package/dist/features/global-exports/bundle.zip +0 -0
- package/dist/features/global-exports/index.js +63 -0
- package/dist/features/{global-exports.js → global-exports/index.mjs} +2 -2
- package/dist/features/invalidate-cache/HASH +1 -0
- package/dist/features/invalidate-cache/bundle.zip +0 -0
- package/dist/features/invalidate-cache/index.js +63 -0
- package/dist/features/{invalidate-cache.js → invalidate-cache/index.mjs} +2 -2
- package/dist/features/upload-bucket-asset/HASH +1 -0
- package/dist/features/upload-bucket-asset/bundle.zip +0 -0
- package/dist/features/upload-bucket-asset/index.js +22015 -0
- package/dist/features/{upload-bucket-asset.js → upload-bucket-asset/index.mjs} +2 -2
- package/dist/index.d.ts +93 -13
- package/dist/index.js +60 -16
- package/package.json +8 -4
|
@@ -10927,14 +10927,14 @@ const send = async (event, id, status, data, reason = '')=>{
|
|
|
10927
10927
|
NoEcho: false,
|
|
10928
10928
|
Data: data
|
|
10929
10929
|
});
|
|
10930
|
-
// @ts-ignore
|
|
10931
10930
|
await fetch(event.ResponseURL, {
|
|
10932
10931
|
method: 'PUT',
|
|
10932
|
+
// @ts-ignore
|
|
10933
10933
|
port: 443,
|
|
10934
10934
|
body,
|
|
10935
10935
|
headers: {
|
|
10936
10936
|
'content-type': '',
|
|
10937
|
-
'content-length': Buffer.from(body).byteLength
|
|
10937
|
+
'content-length': Buffer.from(body).byteLength.toString()
|
|
10938
10938
|
}
|
|
10939
10939
|
});
|
|
10940
10940
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
2
|
import { z, AnyZodObject } from 'zod';
|
|
3
3
|
import { AwsCredentialIdentityProvider } from '@aws-sdk/types';
|
|
4
|
+
import * as _awsless_lambda from '@awsless/lambda';
|
|
5
|
+
import { Handler, Loggers } from '@awsless/lambda';
|
|
6
|
+
import { BaseSchema, SnsTopicSchema, SqsQueueSchema } from '@awsless/validate';
|
|
7
|
+
import * as valibot from 'valibot';
|
|
4
8
|
|
|
5
9
|
type AssetRead = (name: string) => Promise<Buffer>;
|
|
6
10
|
type AssetWrite = (name: string, data: string | Buffer) => Promise<void>;
|
|
@@ -3025,6 +3029,19 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
3025
3029
|
defaults: zod.ZodDefault<zod.ZodObject<{
|
|
3026
3030
|
auth: zod.ZodDefault<zod.ZodRecord<zod.ZodEffects<zod.ZodString, string, string>, zod.ZodObject<{
|
|
3027
3031
|
allowUserRegistration: zod.ZodDefault<zod.ZodBoolean>;
|
|
3032
|
+
messaging: zod.ZodOptional<zod.ZodObject<{
|
|
3033
|
+
fromEmail: zod.ZodType<`${string}@${string}.${string}`, zod.ZodTypeDef, `${string}@${string}.${string}`>;
|
|
3034
|
+
fromName: zod.ZodOptional<zod.ZodString>;
|
|
3035
|
+
replyTo: zod.ZodOptional<zod.ZodType<`${string}@${string}.${string}`, zod.ZodTypeDef, `${string}@${string}.${string}`>>;
|
|
3036
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3037
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
3038
|
+
fromName?: string | undefined;
|
|
3039
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
3040
|
+
}, {
|
|
3041
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
3042
|
+
fromName?: string | undefined;
|
|
3043
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
3044
|
+
}>>;
|
|
3028
3045
|
username: zod.ZodDefault<zod.ZodObject<{
|
|
3029
3046
|
emailAlias: zod.ZodDefault<zod.ZodBoolean>;
|
|
3030
3047
|
caseSensitive: zod.ZodDefault<zod.ZodBoolean>;
|
|
@@ -4344,6 +4361,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
4344
4361
|
accessToken: Duration;
|
|
4345
4362
|
refreshToken: Duration;
|
|
4346
4363
|
};
|
|
4364
|
+
messaging?: {
|
|
4365
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
4366
|
+
fromName?: string | undefined;
|
|
4367
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
4368
|
+
} | undefined;
|
|
4347
4369
|
triggers?: {
|
|
4348
4370
|
beforeToken?: string | {
|
|
4349
4371
|
file: string;
|
|
@@ -4573,6 +4595,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
4573
4595
|
} | undefined;
|
|
4574
4596
|
}, {
|
|
4575
4597
|
allowUserRegistration?: boolean | undefined;
|
|
4598
|
+
messaging?: {
|
|
4599
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
4600
|
+
fromName?: string | undefined;
|
|
4601
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
4602
|
+
} | undefined;
|
|
4576
4603
|
username?: {
|
|
4577
4604
|
emailAlias?: boolean | undefined;
|
|
4578
4605
|
caseSensitive?: boolean | undefined;
|
|
@@ -4838,6 +4865,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
4838
4865
|
accessToken: Duration;
|
|
4839
4866
|
refreshToken: Duration;
|
|
4840
4867
|
};
|
|
4868
|
+
messaging?: {
|
|
4869
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
4870
|
+
fromName?: string | undefined;
|
|
4871
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
4872
|
+
} | undefined;
|
|
4841
4873
|
triggers?: {
|
|
4842
4874
|
beforeToken?: string | {
|
|
4843
4875
|
file: string;
|
|
@@ -5069,6 +5101,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
5069
5101
|
}, {
|
|
5070
5102
|
auth?: Record<string, {
|
|
5071
5103
|
allowUserRegistration?: boolean | undefined;
|
|
5104
|
+
messaging?: {
|
|
5105
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
5106
|
+
fromName?: string | undefined;
|
|
5107
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
5108
|
+
} | undefined;
|
|
5072
5109
|
username?: {
|
|
5073
5110
|
emailAlias?: boolean | undefined;
|
|
5074
5111
|
caseSensitive?: boolean | undefined;
|
|
@@ -7748,6 +7785,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
7748
7785
|
accessToken: Duration;
|
|
7749
7786
|
refreshToken: Duration;
|
|
7750
7787
|
};
|
|
7788
|
+
messaging?: {
|
|
7789
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
7790
|
+
fromName?: string | undefined;
|
|
7791
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
7792
|
+
} | undefined;
|
|
7751
7793
|
triggers?: {
|
|
7752
7794
|
beforeToken?: string | {
|
|
7753
7795
|
file: string;
|
|
@@ -8213,6 +8255,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8213
8255
|
defaults?: {
|
|
8214
8256
|
auth?: Record<string, {
|
|
8215
8257
|
allowUserRegistration?: boolean | undefined;
|
|
8258
|
+
messaging?: {
|
|
8259
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
8260
|
+
fromName?: string | undefined;
|
|
8261
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
8262
|
+
} | undefined;
|
|
8216
8263
|
username?: {
|
|
8217
8264
|
emailAlias?: boolean | undefined;
|
|
8218
8265
|
caseSensitive?: boolean | undefined;
|
|
@@ -8673,7 +8720,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8673
8720
|
effect?: "allow" | "deny" | undefined;
|
|
8674
8721
|
}[] | undefined;
|
|
8675
8722
|
}>]>;
|
|
8676
|
-
resolver: zod.ZodEffects<zod.ZodString, string, string
|
|
8723
|
+
resolver: zod.ZodOptional<zod.ZodEffects<zod.ZodString, string, string>>;
|
|
8677
8724
|
}, "strip", zod.ZodTypeAny, {
|
|
8678
8725
|
consumer: (string | {
|
|
8679
8726
|
file: string;
|
|
@@ -8724,7 +8771,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8724
8771
|
resources: string[];
|
|
8725
8772
|
}[] | undefined;
|
|
8726
8773
|
} | undefined);
|
|
8727
|
-
resolver
|
|
8774
|
+
resolver?: string | undefined;
|
|
8728
8775
|
}, {
|
|
8729
8776
|
consumer: (string | {
|
|
8730
8777
|
file: string;
|
|
@@ -8775,7 +8822,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8775
8822
|
effect?: "allow" | "deny" | undefined;
|
|
8776
8823
|
}[] | undefined;
|
|
8777
8824
|
} | undefined);
|
|
8778
|
-
resolver
|
|
8825
|
+
resolver?: string | undefined;
|
|
8779
8826
|
}>]>>>>;
|
|
8780
8827
|
}, "strip", zod.ZodTypeAny, {
|
|
8781
8828
|
schema?: string | string[] | undefined;
|
|
@@ -8853,7 +8900,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8853
8900
|
resources: string[];
|
|
8854
8901
|
}[] | undefined;
|
|
8855
8902
|
} | undefined);
|
|
8856
|
-
resolver
|
|
8903
|
+
resolver?: string | undefined;
|
|
8857
8904
|
}>> | undefined;
|
|
8858
8905
|
}, {
|
|
8859
8906
|
schema?: string | string[] | undefined;
|
|
@@ -8931,7 +8978,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8931
8978
|
effect?: "allow" | "deny" | undefined;
|
|
8932
8979
|
}[] | undefined;
|
|
8933
8980
|
} | undefined);
|
|
8934
|
-
resolver
|
|
8981
|
+
resolver?: string | undefined;
|
|
8935
8982
|
}>> | undefined;
|
|
8936
8983
|
}>>>;
|
|
8937
8984
|
}, "strip", zod.ZodTypeAny, {
|
|
@@ -9011,7 +9058,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
9011
9058
|
resources: string[];
|
|
9012
9059
|
}[] | undefined;
|
|
9013
9060
|
} | undefined);
|
|
9014
|
-
resolver
|
|
9061
|
+
resolver?: string | undefined;
|
|
9015
9062
|
}>> | undefined;
|
|
9016
9063
|
}> | undefined;
|
|
9017
9064
|
}, {
|
|
@@ -9091,7 +9138,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
9091
9138
|
effect?: "allow" | "deny" | undefined;
|
|
9092
9139
|
}[] | undefined;
|
|
9093
9140
|
} | undefined);
|
|
9094
|
-
resolver
|
|
9141
|
+
resolver?: string | undefined;
|
|
9095
9142
|
}>> | undefined;
|
|
9096
9143
|
}> | undefined;
|
|
9097
9144
|
}>, "many">;
|
|
@@ -9173,7 +9220,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
9173
9220
|
resources: string[];
|
|
9174
9221
|
}[] | undefined;
|
|
9175
9222
|
} | undefined);
|
|
9176
|
-
resolver
|
|
9223
|
+
resolver?: string | undefined;
|
|
9177
9224
|
}>> | undefined;
|
|
9178
9225
|
}> | undefined;
|
|
9179
9226
|
}[];
|
|
@@ -9263,7 +9310,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
9263
9310
|
effect?: "allow" | "deny" | undefined;
|
|
9264
9311
|
}[] | undefined;
|
|
9265
9312
|
} | undefined);
|
|
9266
|
-
resolver
|
|
9313
|
+
resolver?: string | undefined;
|
|
9267
9314
|
}>> | undefined;
|
|
9268
9315
|
}> | undefined;
|
|
9269
9316
|
}[];
|
|
@@ -11015,7 +11062,7 @@ declare class Url extends Resource {
|
|
|
11015
11062
|
};
|
|
11016
11063
|
}
|
|
11017
11064
|
|
|
11018
|
-
type FunctionProps = {
|
|
11065
|
+
type FunctionProps$1 = {
|
|
11019
11066
|
code: ICode;
|
|
11020
11067
|
name?: string;
|
|
11021
11068
|
description?: string;
|
|
@@ -11038,7 +11085,7 @@ declare class Function$1 extends Resource {
|
|
|
11038
11085
|
private role;
|
|
11039
11086
|
private policy;
|
|
11040
11087
|
private environmentVariables;
|
|
11041
|
-
constructor(_logicalId: string, props: FunctionProps);
|
|
11088
|
+
constructor(_logicalId: string, props: FunctionProps$1);
|
|
11042
11089
|
enableLogs(retention?: Duration): this;
|
|
11043
11090
|
warmUp(concurrency: number): this;
|
|
11044
11091
|
addUrl(props?: Omit<UrlProps, 'target'>): Url;
|
|
@@ -11142,6 +11189,7 @@ declare const getAuthProps: (name: string) => {
|
|
|
11142
11189
|
readonly name: `app-${string}`;
|
|
11143
11190
|
readonly userPoolId: string;
|
|
11144
11191
|
readonly clientId: string;
|
|
11192
|
+
readonly clientSecret: string;
|
|
11145
11193
|
};
|
|
11146
11194
|
|
|
11147
11195
|
declare const getTableName: <N extends string, S extends string = "stack">(name: N, stack?: S) => `app-${S}-${N}`;
|
|
@@ -11182,6 +11230,38 @@ interface SearchResources {
|
|
|
11182
11230
|
}
|
|
11183
11231
|
declare const Search: SearchResources;
|
|
11184
11232
|
|
|
11233
|
+
type FunctionProps<H extends Handler<S>, S extends BaseSchema> = {
|
|
11234
|
+
handle: H;
|
|
11235
|
+
schema?: S;
|
|
11236
|
+
logger?: Loggers;
|
|
11237
|
+
logViewableErrors?: boolean;
|
|
11238
|
+
};
|
|
11239
|
+
declare const func: <H extends Handler<S>, S extends BaseSchema<any, any>>(props: FunctionProps<H, S>) => (event: _awsless_lambda.Input<S>, context?: _awsless_lambda.LambdaContext | undefined) => Promise<ReturnType<H>>;
|
|
11240
|
+
|
|
11241
|
+
type TopicProps<H extends Handler<S>, S extends BaseSchema> = {
|
|
11242
|
+
handle: H;
|
|
11243
|
+
schema?: S;
|
|
11244
|
+
logger?: Loggers;
|
|
11245
|
+
};
|
|
11246
|
+
declare const topic: <H extends Handler<SnsTopicSchema<S>>, S extends BaseSchema<any, any>>(props: TopicProps<H, S>) => (event: valibot.Input<S> | valibot.Input<S>[] | {
|
|
11247
|
+
Records: {
|
|
11248
|
+
Sns: {
|
|
11249
|
+
Message: string | valibot.Input<S>;
|
|
11250
|
+
};
|
|
11251
|
+
}[];
|
|
11252
|
+
}, context?: _awsless_lambda.LambdaContext | undefined) => Promise<ReturnType<H>>;
|
|
11253
|
+
|
|
11254
|
+
type QueueProps<H extends Handler<S>, S extends BaseSchema> = {
|
|
11255
|
+
handle: H;
|
|
11256
|
+
schema?: S;
|
|
11257
|
+
logger?: Loggers;
|
|
11258
|
+
};
|
|
11259
|
+
declare const queue: <H extends Handler<SqsQueueSchema<S>>, S extends BaseSchema<any, any>>(props: QueueProps<H, S>) => (event: valibot.Input<S> | valibot.Input<S>[] | {
|
|
11260
|
+
Records: {
|
|
11261
|
+
body: string | valibot.Input<S>;
|
|
11262
|
+
}[];
|
|
11263
|
+
}, context?: _awsless_lambda.LambdaContext | undefined) => Promise<ReturnType<H>>;
|
|
11264
|
+
|
|
11185
11265
|
type AppConfig = CombinedDefaultPluginsConfigInput;
|
|
11186
11266
|
type StackConfig = CombinedDefaultPluginsConfigInput['stacks'][number];
|
|
11187
11267
|
declare const defineStackConfig: (config: StackConfig) => StackConfig$1 | (StackConfig$1 & {
|
|
@@ -11796,7 +11876,7 @@ declare const defineStackConfig: (config: StackConfig) => StackConfig$1 | (Stack
|
|
|
11796
11876
|
effect?: "allow" | "deny" | undefined;
|
|
11797
11877
|
}[] | undefined;
|
|
11798
11878
|
} | undefined);
|
|
11799
|
-
resolver
|
|
11879
|
+
resolver?: string | undefined;
|
|
11800
11880
|
}>> | undefined;
|
|
11801
11881
|
}> | undefined;
|
|
11802
11882
|
}) | (StackConfig$1 & {
|
|
@@ -11983,4 +12063,4 @@ declare const defineStackConfig: (config: StackConfig) => StackConfig$1 | (Stack
|
|
|
11983
12063
|
});
|
|
11984
12064
|
declare const defineAppConfig: (config: AppConfig | AppConfigFactory<AppConfig>) => CombinedDefaultPluginsConfigInput | AppConfigFactory<CombinedDefaultPluginsConfigInput>;
|
|
11985
12065
|
|
|
11986
|
-
export { APP, AppConfig, Auth, AuthResources, Cache, CacheResources, Config, ConfigResources, Fn, Function, FunctionResources, Plugin, Queue, QueueResources, STACK, Search, SearchResources, StackConfig, Store, StoreResources, Table, TableResources, Topic, TopicResources, defineAppConfig, definePlugin, defineStackConfig, getAuthName, getAuthProps, getCacheProps, getConfigName, getFunctionName, getGlobalResourceName, getLocalResourceName, getQueueName, getSearchName, getStoreName, getTableName, getTopicName };
|
|
12066
|
+
export { APP, AppConfig, Auth, AuthResources, Cache, CacheResources, Config, ConfigResources, Fn, Function, FunctionProps, FunctionResources, Plugin, Queue, QueueProps, QueueResources, STACK, Search, SearchResources, StackConfig, Store, StoreResources, Table, TableResources, Topic, TopicProps, TopicResources, defineAppConfig, definePlugin, defineStackConfig, func, getAuthName, getAuthProps, getCacheProps, getConfigName, getFunctionName, getGlobalResourceName, getLocalResourceName, getQueueName, getSearchName, getStoreName, getTableName, getTopicName, queue, topic };
|
package/dist/index.js
CHANGED
|
@@ -72,7 +72,8 @@ var getAuthProps = (name) => {
|
|
|
72
72
|
return {
|
|
73
73
|
name: getAuthName(name),
|
|
74
74
|
userPoolId: env[`AUTH_${id}_USER_POOL_ID`],
|
|
75
|
-
clientId: env[`AUTH_${id}_CLIENT_ID`]
|
|
75
|
+
clientId: env[`AUTH_${id}_CLIENT_ID`],
|
|
76
|
+
clientSecret: env[`AUTH_${id}_CLIENT_SECRET`]
|
|
76
77
|
};
|
|
77
78
|
};
|
|
78
79
|
|
|
@@ -88,17 +89,17 @@ var Table = /* @__PURE__ */ createProxy((stack) => {
|
|
|
88
89
|
import { publish } from "@awsless/sns";
|
|
89
90
|
var getTopicName = getGlobalResourceName;
|
|
90
91
|
var Topic = /* @__PURE__ */ createProxy((name) => {
|
|
91
|
-
const
|
|
92
|
+
const topic2 = getTopicName(name);
|
|
92
93
|
const ctx = {
|
|
93
|
-
[
|
|
94
|
+
[topic2]: async (payload, options = {}) => {
|
|
94
95
|
await publish({
|
|
95
96
|
...options,
|
|
96
|
-
topic,
|
|
97
|
+
topic: topic2,
|
|
97
98
|
payload
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
};
|
|
101
|
-
const call = ctx[
|
|
102
|
+
const call = ctx[topic2];
|
|
102
103
|
return call;
|
|
103
104
|
});
|
|
104
105
|
|
|
@@ -113,9 +114,9 @@ var getQueueUrl = (name, stack = STACK) => {
|
|
|
113
114
|
return process.env[`QUEUE_${constantCase2(stack)}_${constantCase2(name)}_URL`];
|
|
114
115
|
};
|
|
115
116
|
var Queue = /* @__PURE__ */ createProxy((stack) => {
|
|
116
|
-
return createProxy((
|
|
117
|
-
const url = getQueueUrl(
|
|
118
|
-
const name = getQueueName(
|
|
117
|
+
return createProxy((queue2) => {
|
|
118
|
+
const url = getQueueUrl(queue2, stack);
|
|
119
|
+
const name = getQueueName(queue2, stack);
|
|
119
120
|
const ctx = {
|
|
120
121
|
[name]: (payload, options = {}) => {
|
|
121
122
|
return sendMessage({
|
|
@@ -140,6 +141,7 @@ var Queue = /* @__PURE__ */ createProxy((stack) => {
|
|
|
140
141
|
|
|
141
142
|
// src/node/cache.ts
|
|
142
143
|
import { constantCase as constantCase3 } from "change-case";
|
|
144
|
+
import { command } from "@awsless/redis";
|
|
143
145
|
var getCacheProps = (name, stack = STACK) => {
|
|
144
146
|
const prefix = `CACHE_${constantCase3(stack)}_${constantCase3(name)}`;
|
|
145
147
|
return {
|
|
@@ -149,9 +151,22 @@ var getCacheProps = (name, stack = STACK) => {
|
|
|
149
151
|
};
|
|
150
152
|
var Cache = /* @__PURE__ */ createProxy((stack) => {
|
|
151
153
|
return createProxy((name) => {
|
|
152
|
-
const call = () => {
|
|
153
|
-
};
|
|
154
154
|
const { host, port } = getCacheProps(name, stack);
|
|
155
|
+
const call = (opts, fn) => {
|
|
156
|
+
const overload = typeof opts === "function";
|
|
157
|
+
const options = overload ? {} : opts;
|
|
158
|
+
const callback = overload ? opts : fn;
|
|
159
|
+
return command(
|
|
160
|
+
{
|
|
161
|
+
host,
|
|
162
|
+
port,
|
|
163
|
+
db: 0,
|
|
164
|
+
cluster: true,
|
|
165
|
+
...options
|
|
166
|
+
},
|
|
167
|
+
callback
|
|
168
|
+
);
|
|
169
|
+
};
|
|
155
170
|
call.host = host;
|
|
156
171
|
call.port = port;
|
|
157
172
|
return call;
|
|
@@ -221,13 +236,39 @@ var Search = /* @__PURE__ */ createProxy((stack) => {
|
|
|
221
236
|
});
|
|
222
237
|
});
|
|
223
238
|
|
|
224
|
-
// src/
|
|
225
|
-
|
|
226
|
-
|
|
239
|
+
// src/node/handle/function.ts
|
|
240
|
+
import { lambda } from "@awsless/lambda";
|
|
241
|
+
var func = (props) => {
|
|
242
|
+
return lambda(props);
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
// src/node/handle/topic.ts
|
|
246
|
+
import { snsTopic } from "@awsless/validate";
|
|
247
|
+
import { lambda as lambda2 } from "@awsless/lambda";
|
|
248
|
+
var topic = (props) => {
|
|
249
|
+
return lambda2({
|
|
250
|
+
logger: props.logger,
|
|
251
|
+
schema: snsTopic(props.schema),
|
|
252
|
+
handle: props.handle,
|
|
253
|
+
logViewableErrors: true
|
|
254
|
+
});
|
|
227
255
|
};
|
|
228
|
-
|
|
229
|
-
|
|
256
|
+
|
|
257
|
+
// src/node/handle/queue.ts
|
|
258
|
+
import { lambda as lambda3 } from "@awsless/lambda";
|
|
259
|
+
import { sqsQueue } from "@awsless/validate";
|
|
260
|
+
var queue = (props) => {
|
|
261
|
+
return lambda3({
|
|
262
|
+
logger: props.logger,
|
|
263
|
+
schema: sqsQueue(props.schema),
|
|
264
|
+
handle: props.handle,
|
|
265
|
+
logViewableErrors: true
|
|
266
|
+
});
|
|
230
267
|
};
|
|
268
|
+
|
|
269
|
+
// src/index.ts
|
|
270
|
+
var defineStackConfig = (config) => config;
|
|
271
|
+
var defineAppConfig = (config) => config;
|
|
231
272
|
export {
|
|
232
273
|
APP,
|
|
233
274
|
Auth,
|
|
@@ -244,6 +285,7 @@ export {
|
|
|
244
285
|
defineAppConfig,
|
|
245
286
|
definePlugin,
|
|
246
287
|
defineStackConfig,
|
|
288
|
+
func,
|
|
247
289
|
getAuthName,
|
|
248
290
|
getAuthProps,
|
|
249
291
|
getCacheProps,
|
|
@@ -255,5 +297,7 @@ export {
|
|
|
255
297
|
getSearchName,
|
|
256
298
|
getStoreName,
|
|
257
299
|
getTableName,
|
|
258
|
-
getTopicName
|
|
300
|
+
getTopicName,
|
|
301
|
+
queue,
|
|
302
|
+
topic
|
|
259
303
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.87",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -24,14 +24,18 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@awsless/
|
|
28
|
-
"@awsless/
|
|
29
|
-
"@awsless/
|
|
27
|
+
"@awsless/validate": "^0.0.5",
|
|
28
|
+
"@awsless/lambda": "^0.0.9",
|
|
29
|
+
"@awsless/redis": "^0.0.8",
|
|
30
|
+
"@awsless/sns": "^0.0.7",
|
|
31
|
+
"@awsless/sqs": "^0.0.7",
|
|
30
32
|
"@awsless/ssm": "^0.0.7"
|
|
31
33
|
},
|
|
32
34
|
"dependencies": {
|
|
35
|
+
"@aws-appsync/utils": "^1.5.0",
|
|
33
36
|
"@aws-sdk/client-cloudformation": "^3.369.0",
|
|
34
37
|
"@aws-sdk/client-cloudfront": "^3.425.0",
|
|
38
|
+
"@aws-sdk/client-cognito-identity-provider": "^3.441.0",
|
|
35
39
|
"@aws-sdk/client-route-53": "^3.369.0",
|
|
36
40
|
"@aws-sdk/client-s3": "^3.369.0",
|
|
37
41
|
"@aws-sdk/client-ssm": "3.329.0",
|