@awsless/awsless 0.0.85 → 0.0.86
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 +503 -165
- 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 +54 -10
- package/dist/index.js +18 -3
- package/package.json +5 -2
|
@@ -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
|
@@ -3025,6 +3025,19 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
3025
3025
|
defaults: zod.ZodDefault<zod.ZodObject<{
|
|
3026
3026
|
auth: zod.ZodDefault<zod.ZodRecord<zod.ZodEffects<zod.ZodString, string, string>, zod.ZodObject<{
|
|
3027
3027
|
allowUserRegistration: zod.ZodDefault<zod.ZodBoolean>;
|
|
3028
|
+
messaging: zod.ZodOptional<zod.ZodObject<{
|
|
3029
|
+
fromEmail: zod.ZodType<`${string}@${string}.${string}`, zod.ZodTypeDef, `${string}@${string}.${string}`>;
|
|
3030
|
+
fromName: zod.ZodOptional<zod.ZodString>;
|
|
3031
|
+
replyTo: zod.ZodOptional<zod.ZodType<`${string}@${string}.${string}`, zod.ZodTypeDef, `${string}@${string}.${string}`>>;
|
|
3032
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3033
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
3034
|
+
fromName?: string | undefined;
|
|
3035
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
3036
|
+
}, {
|
|
3037
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
3038
|
+
fromName?: string | undefined;
|
|
3039
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
3040
|
+
}>>;
|
|
3028
3041
|
username: zod.ZodDefault<zod.ZodObject<{
|
|
3029
3042
|
emailAlias: zod.ZodDefault<zod.ZodBoolean>;
|
|
3030
3043
|
caseSensitive: zod.ZodDefault<zod.ZodBoolean>;
|
|
@@ -4344,6 +4357,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
4344
4357
|
accessToken: Duration;
|
|
4345
4358
|
refreshToken: Duration;
|
|
4346
4359
|
};
|
|
4360
|
+
messaging?: {
|
|
4361
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
4362
|
+
fromName?: string | undefined;
|
|
4363
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
4364
|
+
} | undefined;
|
|
4347
4365
|
triggers?: {
|
|
4348
4366
|
beforeToken?: string | {
|
|
4349
4367
|
file: string;
|
|
@@ -4573,6 +4591,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
4573
4591
|
} | undefined;
|
|
4574
4592
|
}, {
|
|
4575
4593
|
allowUserRegistration?: boolean | undefined;
|
|
4594
|
+
messaging?: {
|
|
4595
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
4596
|
+
fromName?: string | undefined;
|
|
4597
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
4598
|
+
} | undefined;
|
|
4576
4599
|
username?: {
|
|
4577
4600
|
emailAlias?: boolean | undefined;
|
|
4578
4601
|
caseSensitive?: boolean | undefined;
|
|
@@ -4838,6 +4861,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
4838
4861
|
accessToken: Duration;
|
|
4839
4862
|
refreshToken: Duration;
|
|
4840
4863
|
};
|
|
4864
|
+
messaging?: {
|
|
4865
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
4866
|
+
fromName?: string | undefined;
|
|
4867
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
4868
|
+
} | undefined;
|
|
4841
4869
|
triggers?: {
|
|
4842
4870
|
beforeToken?: string | {
|
|
4843
4871
|
file: string;
|
|
@@ -5069,6 +5097,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
5069
5097
|
}, {
|
|
5070
5098
|
auth?: Record<string, {
|
|
5071
5099
|
allowUserRegistration?: boolean | undefined;
|
|
5100
|
+
messaging?: {
|
|
5101
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
5102
|
+
fromName?: string | undefined;
|
|
5103
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
5104
|
+
} | undefined;
|
|
5072
5105
|
username?: {
|
|
5073
5106
|
emailAlias?: boolean | undefined;
|
|
5074
5107
|
caseSensitive?: boolean | undefined;
|
|
@@ -7748,6 +7781,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
7748
7781
|
accessToken: Duration;
|
|
7749
7782
|
refreshToken: Duration;
|
|
7750
7783
|
};
|
|
7784
|
+
messaging?: {
|
|
7785
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
7786
|
+
fromName?: string | undefined;
|
|
7787
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
7788
|
+
} | undefined;
|
|
7751
7789
|
triggers?: {
|
|
7752
7790
|
beforeToken?: string | {
|
|
7753
7791
|
file: string;
|
|
@@ -8213,6 +8251,11 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8213
8251
|
defaults?: {
|
|
8214
8252
|
auth?: Record<string, {
|
|
8215
8253
|
allowUserRegistration?: boolean | undefined;
|
|
8254
|
+
messaging?: {
|
|
8255
|
+
fromEmail: `${string}@${string}.${string}`;
|
|
8256
|
+
fromName?: string | undefined;
|
|
8257
|
+
replyTo?: `${string}@${string}.${string}` | undefined;
|
|
8258
|
+
} | undefined;
|
|
8216
8259
|
username?: {
|
|
8217
8260
|
emailAlias?: boolean | undefined;
|
|
8218
8261
|
caseSensitive?: boolean | undefined;
|
|
@@ -8673,7 +8716,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8673
8716
|
effect?: "allow" | "deny" | undefined;
|
|
8674
8717
|
}[] | undefined;
|
|
8675
8718
|
}>]>;
|
|
8676
|
-
resolver: zod.ZodEffects<zod.ZodString, string, string
|
|
8719
|
+
resolver: zod.ZodOptional<zod.ZodEffects<zod.ZodString, string, string>>;
|
|
8677
8720
|
}, "strip", zod.ZodTypeAny, {
|
|
8678
8721
|
consumer: (string | {
|
|
8679
8722
|
file: string;
|
|
@@ -8724,7 +8767,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8724
8767
|
resources: string[];
|
|
8725
8768
|
}[] | undefined;
|
|
8726
8769
|
} | undefined);
|
|
8727
|
-
resolver
|
|
8770
|
+
resolver?: string | undefined;
|
|
8728
8771
|
}, {
|
|
8729
8772
|
consumer: (string | {
|
|
8730
8773
|
file: string;
|
|
@@ -8775,7 +8818,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8775
8818
|
effect?: "allow" | "deny" | undefined;
|
|
8776
8819
|
}[] | undefined;
|
|
8777
8820
|
} | undefined);
|
|
8778
|
-
resolver
|
|
8821
|
+
resolver?: string | undefined;
|
|
8779
8822
|
}>]>>>>;
|
|
8780
8823
|
}, "strip", zod.ZodTypeAny, {
|
|
8781
8824
|
schema?: string | string[] | undefined;
|
|
@@ -8853,7 +8896,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8853
8896
|
resources: string[];
|
|
8854
8897
|
}[] | undefined;
|
|
8855
8898
|
} | undefined);
|
|
8856
|
-
resolver
|
|
8899
|
+
resolver?: string | undefined;
|
|
8857
8900
|
}>> | undefined;
|
|
8858
8901
|
}, {
|
|
8859
8902
|
schema?: string | string[] | undefined;
|
|
@@ -8931,7 +8974,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
8931
8974
|
effect?: "allow" | "deny" | undefined;
|
|
8932
8975
|
}[] | undefined;
|
|
8933
8976
|
} | undefined);
|
|
8934
|
-
resolver
|
|
8977
|
+
resolver?: string | undefined;
|
|
8935
8978
|
}>> | undefined;
|
|
8936
8979
|
}>>>;
|
|
8937
8980
|
}, "strip", zod.ZodTypeAny, {
|
|
@@ -9011,7 +9054,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
9011
9054
|
resources: string[];
|
|
9012
9055
|
}[] | undefined;
|
|
9013
9056
|
} | undefined);
|
|
9014
|
-
resolver
|
|
9057
|
+
resolver?: string | undefined;
|
|
9015
9058
|
}>> | undefined;
|
|
9016
9059
|
}> | undefined;
|
|
9017
9060
|
}, {
|
|
@@ -9091,7 +9134,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
9091
9134
|
effect?: "allow" | "deny" | undefined;
|
|
9092
9135
|
}[] | undefined;
|
|
9093
9136
|
} | undefined);
|
|
9094
|
-
resolver
|
|
9137
|
+
resolver?: string | undefined;
|
|
9095
9138
|
}>> | undefined;
|
|
9096
9139
|
}> | undefined;
|
|
9097
9140
|
}>, "many">;
|
|
@@ -9173,7 +9216,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
9173
9216
|
resources: string[];
|
|
9174
9217
|
}[] | undefined;
|
|
9175
9218
|
} | undefined);
|
|
9176
|
-
resolver
|
|
9219
|
+
resolver?: string | undefined;
|
|
9177
9220
|
}>> | undefined;
|
|
9178
9221
|
}> | undefined;
|
|
9179
9222
|
}[];
|
|
@@ -9263,7 +9306,7 @@ declare const defaultPlugins: (Plugin<zod.ZodObject<{
|
|
|
9263
9306
|
effect?: "allow" | "deny" | undefined;
|
|
9264
9307
|
}[] | undefined;
|
|
9265
9308
|
} | undefined);
|
|
9266
|
-
resolver
|
|
9309
|
+
resolver?: string | undefined;
|
|
9267
9310
|
}>> | undefined;
|
|
9268
9311
|
}> | undefined;
|
|
9269
9312
|
}[];
|
|
@@ -11142,6 +11185,7 @@ declare const getAuthProps: (name: string) => {
|
|
|
11142
11185
|
readonly name: `app-${string}`;
|
|
11143
11186
|
readonly userPoolId: string;
|
|
11144
11187
|
readonly clientId: string;
|
|
11188
|
+
readonly clientSecret: string;
|
|
11145
11189
|
};
|
|
11146
11190
|
|
|
11147
11191
|
declare const getTableName: <N extends string, S extends string = "stack">(name: N, stack?: S) => `app-${S}-${N}`;
|
|
@@ -11796,7 +11840,7 @@ declare const defineStackConfig: (config: StackConfig) => StackConfig$1 | (Stack
|
|
|
11796
11840
|
effect?: "allow" | "deny" | undefined;
|
|
11797
11841
|
}[] | undefined;
|
|
11798
11842
|
} | undefined);
|
|
11799
|
-
resolver
|
|
11843
|
+
resolver?: string | undefined;
|
|
11800
11844
|
}>> | undefined;
|
|
11801
11845
|
}> | undefined;
|
|
11802
11846
|
}) | (StackConfig$1 & {
|
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
|
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.86",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -27,11 +27,14 @@
|
|
|
27
27
|
"@awsless/lambda": "^0.0.6",
|
|
28
28
|
"@awsless/sns": "^0.0.6",
|
|
29
29
|
"@awsless/sqs": "^0.0.6",
|
|
30
|
-
"@awsless/ssm": "^0.0.7"
|
|
30
|
+
"@awsless/ssm": "^0.0.7",
|
|
31
|
+
"@awsless/redis": "^0.0.8"
|
|
31
32
|
},
|
|
32
33
|
"dependencies": {
|
|
34
|
+
"@aws-appsync/utils": "^1.5.0",
|
|
33
35
|
"@aws-sdk/client-cloudformation": "^3.369.0",
|
|
34
36
|
"@aws-sdk/client-cloudfront": "^3.425.0",
|
|
37
|
+
"@aws-sdk/client-cognito-identity-provider": "^3.441.0",
|
|
35
38
|
"@aws-sdk/client-route-53": "^3.369.0",
|
|
36
39
|
"@aws-sdk/client-s3": "^3.369.0",
|
|
37
40
|
"@aws-sdk/client-ssm": "3.329.0",
|