@awsless/awsless 0.0.154 → 0.0.156
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 +88 -82
- package/dist/features/cognito-client-secret/bundle.zip +0 -0
- package/dist/features/delete-bucket/bundle.zip +0 -0
- package/dist/features/delete-hosted-zone/bundle.zip +0 -0
- package/dist/features/global-exports/bundle.zip +0 -0
- package/dist/features/invalidate-cache/bundle.zip +0 -0
- package/dist/features/upload-bucket-asset/bundle.zip +0 -0
- package/dist/index.d.ts +11 -8
- package/dist/index.js +9 -7
- package/package.json +5 -5
package/dist/bin.js
CHANGED
|
@@ -138,19 +138,25 @@ var formatName = (name) => {
|
|
|
138
138
|
return paramCase2(name);
|
|
139
139
|
};
|
|
140
140
|
var formatArn = (props) => {
|
|
141
|
+
const regionPart = props.includeRegion === false ? "" : "${AWS::Region}";
|
|
142
|
+
const globalPart = "arn:${AWS::Partition}:${service}:" + regionPart + ":${AWS::AccountId}";
|
|
141
143
|
if (!props.resource) {
|
|
142
|
-
return sub(
|
|
144
|
+
return sub(globalPart, {
|
|
145
|
+
service: props.service
|
|
146
|
+
});
|
|
143
147
|
}
|
|
144
148
|
if (!props.resourceName) {
|
|
145
|
-
return sub("
|
|
149
|
+
return sub(globalPart + ":${resource}", {
|
|
150
|
+
service: props.service,
|
|
151
|
+
resource: props.resource
|
|
152
|
+
});
|
|
146
153
|
}
|
|
147
|
-
return sub(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
);
|
|
154
|
+
return sub(globalPart + ":${resource}${seperator}${resourceName}", {
|
|
155
|
+
service: props.service,
|
|
156
|
+
resource: props.resource,
|
|
157
|
+
seperator: props.seperator ?? "/",
|
|
158
|
+
resourceName: props.resourceName
|
|
159
|
+
});
|
|
154
160
|
};
|
|
155
161
|
|
|
156
162
|
// src/formation/resource.ts
|
|
@@ -243,7 +249,7 @@ var LogGroup = class extends Resource {
|
|
|
243
249
|
this.props = props;
|
|
244
250
|
}
|
|
245
251
|
get arn() {
|
|
246
|
-
return getAtt(
|
|
252
|
+
return this.getAtt("Arn");
|
|
247
253
|
}
|
|
248
254
|
properties() {
|
|
249
255
|
return {
|
|
@@ -292,7 +298,7 @@ var Role = class extends Resource {
|
|
|
292
298
|
inlinePolicies = /* @__PURE__ */ new Set();
|
|
293
299
|
managedPolicies = /* @__PURE__ */ new Set();
|
|
294
300
|
get arn() {
|
|
295
|
-
return getAtt(
|
|
301
|
+
return this.getAtt("Arn");
|
|
296
302
|
}
|
|
297
303
|
addManagedPolicy(...policies) {
|
|
298
304
|
for (const policy of policies) {
|
|
@@ -337,10 +343,10 @@ var Rule = class extends Resource {
|
|
|
337
343
|
}
|
|
338
344
|
name;
|
|
339
345
|
get id() {
|
|
340
|
-
return ref(
|
|
346
|
+
return this.ref();
|
|
341
347
|
}
|
|
342
348
|
get arn() {
|
|
343
|
-
return getAtt(
|
|
349
|
+
return this.getAtt("Arn");
|
|
344
350
|
}
|
|
345
351
|
properties() {
|
|
346
352
|
return {
|
|
@@ -410,7 +416,7 @@ var Url = class extends Resource {
|
|
|
410
416
|
this.props = props;
|
|
411
417
|
}
|
|
412
418
|
get url() {
|
|
413
|
-
return getAtt(
|
|
419
|
+
return this.getAtt("FunctionUrl");
|
|
414
420
|
}
|
|
415
421
|
properties() {
|
|
416
422
|
return {
|
|
@@ -1479,7 +1485,7 @@ var UserPoolClient = class extends Resource {
|
|
|
1479
1485
|
}
|
|
1480
1486
|
name;
|
|
1481
1487
|
get id() {
|
|
1482
|
-
return ref(
|
|
1488
|
+
return this.ref();
|
|
1483
1489
|
}
|
|
1484
1490
|
formatAuthFlows() {
|
|
1485
1491
|
const authFlows = [];
|
|
@@ -1559,10 +1565,10 @@ var UserPoolDomain = class extends Resource {
|
|
|
1559
1565
|
this.props = props;
|
|
1560
1566
|
}
|
|
1561
1567
|
get domain() {
|
|
1562
|
-
return ref(
|
|
1568
|
+
return this.ref();
|
|
1563
1569
|
}
|
|
1564
1570
|
get cloudFrontDistribution() {
|
|
1565
|
-
return getAtt(
|
|
1571
|
+
return this.getAtt("CloudFrontDistribution");
|
|
1566
1572
|
}
|
|
1567
1573
|
properties() {
|
|
1568
1574
|
return {
|
|
@@ -1581,16 +1587,16 @@ var UserPool = class extends Resource {
|
|
|
1581
1587
|
}
|
|
1582
1588
|
name;
|
|
1583
1589
|
get id() {
|
|
1584
|
-
return ref(
|
|
1590
|
+
return this.ref();
|
|
1585
1591
|
}
|
|
1586
1592
|
get arn() {
|
|
1587
|
-
return getAtt(
|
|
1593
|
+
return this.getAtt("Arn");
|
|
1588
1594
|
}
|
|
1589
1595
|
get providerName() {
|
|
1590
|
-
return getAtt(
|
|
1596
|
+
return this.getAtt("ProviderName");
|
|
1591
1597
|
}
|
|
1592
1598
|
get providerUrl() {
|
|
1593
|
-
return getAtt(
|
|
1599
|
+
return this.getAtt("ProviderURL");
|
|
1594
1600
|
}
|
|
1595
1601
|
addDomain(props) {
|
|
1596
1602
|
const domain = new UserPoolDomain(this.logicalId, {
|
|
@@ -1725,7 +1731,7 @@ var CustomResource = class extends Resource {
|
|
|
1725
1731
|
this.props = props;
|
|
1726
1732
|
}
|
|
1727
1733
|
getAtt(name) {
|
|
1728
|
-
return getAtt(
|
|
1734
|
+
return super.getAtt(name);
|
|
1729
1735
|
}
|
|
1730
1736
|
properties() {
|
|
1731
1737
|
return {
|
|
@@ -1938,7 +1944,7 @@ var SecurityGroup = class extends Resource {
|
|
|
1938
1944
|
ingress = [];
|
|
1939
1945
|
egress = [];
|
|
1940
1946
|
get id() {
|
|
1941
|
-
return ref(
|
|
1947
|
+
return this.ref();
|
|
1942
1948
|
}
|
|
1943
1949
|
addIngressRule(peer, port, description) {
|
|
1944
1950
|
this.ingress.push({
|
|
@@ -1984,7 +1990,7 @@ var SubnetGroup = class extends Resource {
|
|
|
1984
1990
|
}
|
|
1985
1991
|
name;
|
|
1986
1992
|
get arn() {
|
|
1987
|
-
return getAtt(
|
|
1993
|
+
return this.getAtt("Arn");
|
|
1988
1994
|
}
|
|
1989
1995
|
properties() {
|
|
1990
1996
|
return {
|
|
@@ -2306,7 +2312,7 @@ var HostedZone = class extends Resource {
|
|
|
2306
2312
|
this.props = props;
|
|
2307
2313
|
}
|
|
2308
2314
|
get id() {
|
|
2309
|
-
return ref(
|
|
2315
|
+
return this.ref();
|
|
2310
2316
|
}
|
|
2311
2317
|
properties() {
|
|
2312
2318
|
return {
|
|
@@ -2322,7 +2328,7 @@ var Certificate = class extends Resource {
|
|
|
2322
2328
|
this.props = props;
|
|
2323
2329
|
}
|
|
2324
2330
|
get arn() {
|
|
2325
|
-
return ref(
|
|
2331
|
+
return this.ref();
|
|
2326
2332
|
}
|
|
2327
2333
|
properties() {
|
|
2328
2334
|
return {
|
|
@@ -2658,16 +2664,16 @@ var GraphQLApi = class extends Resource {
|
|
|
2658
2664
|
name;
|
|
2659
2665
|
defaultAuthorization;
|
|
2660
2666
|
get arn() {
|
|
2661
|
-
return ref(
|
|
2667
|
+
return this.ref();
|
|
2662
2668
|
}
|
|
2663
2669
|
get id() {
|
|
2664
|
-
return getAtt(
|
|
2670
|
+
return this.getAtt("ApiId");
|
|
2665
2671
|
}
|
|
2666
2672
|
get url() {
|
|
2667
|
-
return getAtt(
|
|
2673
|
+
return this.getAtt("GraphQLUrl");
|
|
2668
2674
|
}
|
|
2669
2675
|
get dns() {
|
|
2670
|
-
return getAtt(
|
|
2676
|
+
return this.getAtt("GraphQLDns");
|
|
2671
2677
|
}
|
|
2672
2678
|
setDefaultAuthorization(auth) {
|
|
2673
2679
|
this.defaultAuthorization = auth;
|
|
@@ -2946,7 +2952,7 @@ var DataSource = class _DataSource extends Resource {
|
|
|
2946
2952
|
}
|
|
2947
2953
|
name;
|
|
2948
2954
|
get arn() {
|
|
2949
|
-
return ref(
|
|
2955
|
+
return this.ref();
|
|
2950
2956
|
}
|
|
2951
2957
|
properties() {
|
|
2952
2958
|
return {
|
|
@@ -2973,10 +2979,10 @@ var FunctionConfiguration = class extends Resource {
|
|
|
2973
2979
|
}
|
|
2974
2980
|
name;
|
|
2975
2981
|
get id() {
|
|
2976
|
-
return getAtt(
|
|
2982
|
+
return this.getAtt("FunctionId");
|
|
2977
2983
|
}
|
|
2978
2984
|
get arn() {
|
|
2979
|
-
return ref(
|
|
2985
|
+
return this.ref();
|
|
2980
2986
|
}
|
|
2981
2987
|
properties() {
|
|
2982
2988
|
return {
|
|
@@ -3057,13 +3063,13 @@ var DomainName = class extends Resource {
|
|
|
3057
3063
|
this.props = props;
|
|
3058
3064
|
}
|
|
3059
3065
|
get appSyncDomainName() {
|
|
3060
|
-
return getAtt(
|
|
3066
|
+
return this.getAtt("AppSyncDomainName");
|
|
3061
3067
|
}
|
|
3062
3068
|
get domainName() {
|
|
3063
|
-
return getAtt(
|
|
3069
|
+
return this.getAtt("DomainName");
|
|
3064
3070
|
}
|
|
3065
3071
|
get hostedZoneId() {
|
|
3066
|
-
return getAtt(
|
|
3072
|
+
return this.getAtt("HostedZoneId");
|
|
3067
3073
|
}
|
|
3068
3074
|
properties() {
|
|
3069
3075
|
return {
|
|
@@ -3293,13 +3299,13 @@ var LoadBalancer = class extends Resource {
|
|
|
3293
3299
|
}
|
|
3294
3300
|
name;
|
|
3295
3301
|
get arn() {
|
|
3296
|
-
return ref(
|
|
3302
|
+
return this.ref();
|
|
3297
3303
|
}
|
|
3298
3304
|
get dnsName() {
|
|
3299
|
-
return getAtt(
|
|
3305
|
+
return this.getAtt("DNSName");
|
|
3300
3306
|
}
|
|
3301
3307
|
get hostedZoneId() {
|
|
3302
|
-
return getAtt(
|
|
3308
|
+
return this.getAtt("CanonicalHostedZoneID");
|
|
3303
3309
|
}
|
|
3304
3310
|
properties() {
|
|
3305
3311
|
return {
|
|
@@ -3320,10 +3326,10 @@ var Listener = class extends Resource {
|
|
|
3320
3326
|
this.props = props;
|
|
3321
3327
|
}
|
|
3322
3328
|
get id() {
|
|
3323
|
-
return ref(
|
|
3329
|
+
return this.ref();
|
|
3324
3330
|
}
|
|
3325
3331
|
get arn() {
|
|
3326
|
-
return getAtt(
|
|
3332
|
+
return this.getAtt("ListenerArn");
|
|
3327
3333
|
}
|
|
3328
3334
|
properties() {
|
|
3329
3335
|
return {
|
|
@@ -3419,10 +3425,10 @@ var ListenerRule = class extends Resource {
|
|
|
3419
3425
|
this.props = props;
|
|
3420
3426
|
}
|
|
3421
3427
|
get id() {
|
|
3422
|
-
return ref(
|
|
3428
|
+
return this.ref();
|
|
3423
3429
|
}
|
|
3424
3430
|
get arn() {
|
|
3425
|
-
return getAtt(
|
|
3431
|
+
return this.getAtt("ListenerArn");
|
|
3426
3432
|
}
|
|
3427
3433
|
properties() {
|
|
3428
3434
|
return {
|
|
@@ -3481,10 +3487,10 @@ var TargetGroup = class extends Resource {
|
|
|
3481
3487
|
}
|
|
3482
3488
|
name;
|
|
3483
3489
|
get arn() {
|
|
3484
|
-
return ref(
|
|
3490
|
+
return this.ref();
|
|
3485
3491
|
}
|
|
3486
3492
|
get fullName() {
|
|
3487
|
-
return getAtt(
|
|
3493
|
+
return this.getAtt("TargetGroupFullName");
|
|
3488
3494
|
}
|
|
3489
3495
|
properties() {
|
|
3490
3496
|
return {
|
|
@@ -3764,10 +3770,10 @@ var Queue = class extends Resource {
|
|
|
3764
3770
|
return this;
|
|
3765
3771
|
}
|
|
3766
3772
|
get arn() {
|
|
3767
|
-
return getAtt(
|
|
3773
|
+
return this.getAtt("Arn");
|
|
3768
3774
|
}
|
|
3769
3775
|
get url() {
|
|
3770
|
-
return getAtt(
|
|
3776
|
+
return this.getAtt("QueueUrl");
|
|
3771
3777
|
}
|
|
3772
3778
|
get permissions() {
|
|
3773
3779
|
return {
|
|
@@ -3839,7 +3845,7 @@ var TopicRule = class extends Resource {
|
|
|
3839
3845
|
}
|
|
3840
3846
|
name;
|
|
3841
3847
|
get arn() {
|
|
3842
|
-
return getAtt(
|
|
3848
|
+
return this.getAtt("Arn");
|
|
3843
3849
|
}
|
|
3844
3850
|
properties() {
|
|
3845
3851
|
return {
|
|
@@ -3985,10 +3991,10 @@ var Api = class extends Resource {
|
|
|
3985
3991
|
}
|
|
3986
3992
|
name;
|
|
3987
3993
|
get endpoint() {
|
|
3988
|
-
return getAtt(
|
|
3994
|
+
return this.getAtt("ApiEndpoint");
|
|
3989
3995
|
}
|
|
3990
3996
|
get id() {
|
|
3991
|
-
return getAtt(
|
|
3997
|
+
return this.getAtt("ApiId");
|
|
3992
3998
|
}
|
|
3993
3999
|
properties() {
|
|
3994
4000
|
return {
|
|
@@ -4014,7 +4020,7 @@ var Integration = class extends Resource {
|
|
|
4014
4020
|
this.props = props;
|
|
4015
4021
|
}
|
|
4016
4022
|
get id() {
|
|
4017
|
-
return ref(
|
|
4023
|
+
return this.ref();
|
|
4018
4024
|
}
|
|
4019
4025
|
properties() {
|
|
4020
4026
|
return {
|
|
@@ -4035,7 +4041,7 @@ var Route = class extends Resource {
|
|
|
4035
4041
|
this.props = props;
|
|
4036
4042
|
}
|
|
4037
4043
|
get id() {
|
|
4038
|
-
return getAtt(
|
|
4044
|
+
return this.getAtt("RouteId");
|
|
4039
4045
|
}
|
|
4040
4046
|
properties() {
|
|
4041
4047
|
return {
|
|
@@ -4081,13 +4087,13 @@ var DomainName2 = class extends Resource {
|
|
|
4081
4087
|
this.props = props;
|
|
4082
4088
|
}
|
|
4083
4089
|
get name() {
|
|
4084
|
-
return ref(
|
|
4090
|
+
return this.ref();
|
|
4085
4091
|
}
|
|
4086
4092
|
get regionalDomainName() {
|
|
4087
|
-
return getAtt(
|
|
4093
|
+
return this.getAtt("RegionalDomainName");
|
|
4088
4094
|
}
|
|
4089
4095
|
get regionalHostedZoneId() {
|
|
4090
|
-
return getAtt(
|
|
4096
|
+
return this.getAtt("RegionalHostedZoneId");
|
|
4091
4097
|
}
|
|
4092
4098
|
properties() {
|
|
4093
4099
|
return {
|
|
@@ -4127,7 +4133,7 @@ var ApiMapping = class extends Resource {
|
|
|
4127
4133
|
this.props = props;
|
|
4128
4134
|
}
|
|
4129
4135
|
get id() {
|
|
4130
|
-
return getAtt(
|
|
4136
|
+
return this.getAtt("ApiMappingId");
|
|
4131
4137
|
}
|
|
4132
4138
|
properties() {
|
|
4133
4139
|
return {
|
|
@@ -4204,13 +4210,13 @@ var Collection = class extends Resource {
|
|
|
4204
4210
|
}
|
|
4205
4211
|
name;
|
|
4206
4212
|
get id() {
|
|
4207
|
-
return ref(
|
|
4213
|
+
return this.ref();
|
|
4208
4214
|
}
|
|
4209
4215
|
get arn() {
|
|
4210
|
-
return getAtt(
|
|
4216
|
+
return this.getAtt("Arn");
|
|
4211
4217
|
}
|
|
4212
4218
|
get endpoint() {
|
|
4213
|
-
return getAtt(
|
|
4219
|
+
return this.getAtt("CollectionEndpoint");
|
|
4214
4220
|
}
|
|
4215
4221
|
get permissions() {
|
|
4216
4222
|
return {
|
|
@@ -4273,7 +4279,7 @@ var Distribution = class extends Resource {
|
|
|
4273
4279
|
}
|
|
4274
4280
|
name;
|
|
4275
4281
|
get id() {
|
|
4276
|
-
return getAtt(
|
|
4282
|
+
return this.getAtt("Id");
|
|
4277
4283
|
}
|
|
4278
4284
|
get arn() {
|
|
4279
4285
|
return sub("arn:${AWS::Partition}:cloudfront::${AWS::AccountId}:distribution/${id}", {
|
|
@@ -4400,19 +4406,19 @@ var Bucket = class extends Resource {
|
|
|
4400
4406
|
}
|
|
4401
4407
|
name;
|
|
4402
4408
|
get arn() {
|
|
4403
|
-
return getAtt(
|
|
4409
|
+
return this.getAtt("Arn");
|
|
4404
4410
|
}
|
|
4405
4411
|
get domainName() {
|
|
4406
|
-
return getAtt(
|
|
4412
|
+
return this.getAtt("DomainName");
|
|
4407
4413
|
}
|
|
4408
4414
|
get dealStackDomainName() {
|
|
4409
|
-
return getAtt(
|
|
4415
|
+
return this.getAtt("DualStackDomainName");
|
|
4410
4416
|
}
|
|
4411
4417
|
get regionalDomainName() {
|
|
4412
|
-
return getAtt(
|
|
4418
|
+
return this.getAtt("RegionalDomainName");
|
|
4413
4419
|
}
|
|
4414
4420
|
get url() {
|
|
4415
|
-
return getAtt(
|
|
4421
|
+
return this.getAtt("WebsiteURL");
|
|
4416
4422
|
}
|
|
4417
4423
|
get permissions() {
|
|
4418
4424
|
return {
|
|
@@ -4460,7 +4466,7 @@ var OriginRequestPolicy = class extends Resource {
|
|
|
4460
4466
|
}
|
|
4461
4467
|
name;
|
|
4462
4468
|
get id() {
|
|
4463
|
-
return getAtt(
|
|
4469
|
+
return this.getAtt("Id");
|
|
4464
4470
|
}
|
|
4465
4471
|
properties() {
|
|
4466
4472
|
return {
|
|
@@ -4492,7 +4498,7 @@ var CachePolicy = class extends Resource {
|
|
|
4492
4498
|
}
|
|
4493
4499
|
name;
|
|
4494
4500
|
get id() {
|
|
4495
|
-
return getAtt(
|
|
4501
|
+
return this.getAtt("Id");
|
|
4496
4502
|
}
|
|
4497
4503
|
properties() {
|
|
4498
4504
|
return {
|
|
@@ -4625,7 +4631,7 @@ var OriginAccessControl = class extends Resource {
|
|
|
4625
4631
|
}
|
|
4626
4632
|
name;
|
|
4627
4633
|
get id() {
|
|
4628
|
-
return getAtt(
|
|
4634
|
+
return this.getAtt("Id");
|
|
4629
4635
|
}
|
|
4630
4636
|
properties() {
|
|
4631
4637
|
return {
|
|
@@ -4648,7 +4654,7 @@ var ResponseHeadersPolicy = class extends Resource {
|
|
|
4648
4654
|
}
|
|
4649
4655
|
name;
|
|
4650
4656
|
get id() {
|
|
4651
|
-
return getAtt(
|
|
4657
|
+
return this.getAtt("Id");
|
|
4652
4658
|
}
|
|
4653
4659
|
properties() {
|
|
4654
4660
|
return {
|
|
@@ -4954,13 +4960,13 @@ var Table = class extends Resource {
|
|
|
4954
4960
|
this.indexes[name] = props;
|
|
4955
4961
|
}
|
|
4956
4962
|
get id() {
|
|
4957
|
-
return ref(
|
|
4963
|
+
return this.ref();
|
|
4958
4964
|
}
|
|
4959
4965
|
get arn() {
|
|
4960
|
-
return getAtt(
|
|
4966
|
+
return this.getAtt("Arn");
|
|
4961
4967
|
}
|
|
4962
4968
|
get streamArn() {
|
|
4963
|
-
return getAtt(
|
|
4969
|
+
return this.getAtt("StreamArn");
|
|
4964
4970
|
}
|
|
4965
4971
|
get permissions() {
|
|
4966
4972
|
const permissions = [
|
|
@@ -5160,7 +5166,7 @@ var Topic = class extends Resource {
|
|
|
5160
5166
|
}
|
|
5161
5167
|
name;
|
|
5162
5168
|
get arn() {
|
|
5163
|
-
return ref(
|
|
5169
|
+
return this.ref();
|
|
5164
5170
|
}
|
|
5165
5171
|
get permissions() {
|
|
5166
5172
|
return {
|
|
@@ -5309,13 +5315,13 @@ var Vpc = class extends Resource {
|
|
|
5309
5315
|
this.tag("Name", props.name);
|
|
5310
5316
|
}
|
|
5311
5317
|
get id() {
|
|
5312
|
-
return ref(
|
|
5318
|
+
return this.ref();
|
|
5313
5319
|
}
|
|
5314
5320
|
get defaultNetworkAcl() {
|
|
5315
|
-
return getAtt(
|
|
5321
|
+
return this.getAtt("DefaultNetworkAcl");
|
|
5316
5322
|
}
|
|
5317
5323
|
get defaultSecurityGroup() {
|
|
5318
|
-
return getAtt(
|
|
5324
|
+
return this.getAtt("DefaultSecurityGroup");
|
|
5319
5325
|
}
|
|
5320
5326
|
properties() {
|
|
5321
5327
|
return {
|
|
@@ -5332,7 +5338,7 @@ var RouteTable = class extends Resource {
|
|
|
5332
5338
|
}
|
|
5333
5339
|
name;
|
|
5334
5340
|
get id() {
|
|
5335
|
-
return ref(
|
|
5341
|
+
return this.ref();
|
|
5336
5342
|
}
|
|
5337
5343
|
properties() {
|
|
5338
5344
|
return {
|
|
@@ -5345,7 +5351,7 @@ var InternetGateway = class extends Resource {
|
|
|
5345
5351
|
super("AWS::EC2::InternetGateway", logicalId);
|
|
5346
5352
|
}
|
|
5347
5353
|
get id() {
|
|
5348
|
-
return ref(
|
|
5354
|
+
return this.ref();
|
|
5349
5355
|
}
|
|
5350
5356
|
properties() {
|
|
5351
5357
|
return {};
|
|
@@ -5357,7 +5363,7 @@ var VPCGatewayAttachment = class extends Resource {
|
|
|
5357
5363
|
this.props = props;
|
|
5358
5364
|
}
|
|
5359
5365
|
get id() {
|
|
5360
|
-
return ref(
|
|
5366
|
+
return this.ref();
|
|
5361
5367
|
}
|
|
5362
5368
|
properties() {
|
|
5363
5369
|
return {
|
|
@@ -5372,7 +5378,7 @@ var Route2 = class extends Resource {
|
|
|
5372
5378
|
this.props = props;
|
|
5373
5379
|
}
|
|
5374
5380
|
get id() {
|
|
5375
|
-
return ref(
|
|
5381
|
+
return this.ref();
|
|
5376
5382
|
}
|
|
5377
5383
|
properties() {
|
|
5378
5384
|
return {
|
|
@@ -5388,7 +5394,7 @@ var Subnet = class extends Resource {
|
|
|
5388
5394
|
this.props = props;
|
|
5389
5395
|
}
|
|
5390
5396
|
get id() {
|
|
5391
|
-
return ref(
|
|
5397
|
+
return this.ref();
|
|
5392
5398
|
}
|
|
5393
5399
|
properties() {
|
|
5394
5400
|
return {
|
|
@@ -5404,7 +5410,7 @@ var SubnetRouteTableAssociation = class extends Resource {
|
|
|
5404
5410
|
this.props = props;
|
|
5405
5411
|
}
|
|
5406
5412
|
get id() {
|
|
5407
|
-
return ref(
|
|
5413
|
+
return this.ref();
|
|
5408
5414
|
}
|
|
5409
5415
|
properties() {
|
|
5410
5416
|
return {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -11133,8 +11133,11 @@ declare const definePlugin: (plugin: Plugin) => Plugin;
|
|
|
11133
11133
|
|
|
11134
11134
|
declare const APP: "app";
|
|
11135
11135
|
declare const STACK: "stack";
|
|
11136
|
-
declare
|
|
11137
|
-
declare
|
|
11136
|
+
declare function getLocalResourceName<N extends string>(name: N): `${typeof APP}-${typeof STACK}-${N}`;
|
|
11137
|
+
declare function getLocalResourceName<N extends string, S extends string>(name: N, stack: S): `${typeof APP}-${S}-${N}`;
|
|
11138
|
+
declare function getLocalResourceName<N extends string, S extends string, R extends string>(name: N, stack: S, resource: R): `${R}-${typeof APP}-${S}-${N}`;
|
|
11139
|
+
declare function getGlobalResourceName<N extends string>(name: N): `${typeof APP}-${N}`;
|
|
11140
|
+
declare function getGlobalResourceName<N extends string, R extends string>(name: N, resource: R): `${R}-${typeof APP}-${N}`;
|
|
11138
11141
|
|
|
11139
11142
|
declare const getFunctionName: <S extends string, N extends string>(stack: S, name: N) => `app-${S}-${N}`;
|
|
11140
11143
|
interface FunctionResources {
|
|
@@ -11142,7 +11145,7 @@ interface FunctionResources {
|
|
|
11142
11145
|
declare const Function: FunctionResources;
|
|
11143
11146
|
declare const Fn: FunctionResources;
|
|
11144
11147
|
|
|
11145
|
-
declare const getAuthName:
|
|
11148
|
+
declare const getAuthName: typeof getGlobalResourceName;
|
|
11146
11149
|
interface AuthResources {
|
|
11147
11150
|
}
|
|
11148
11151
|
declare const Auth: AuthResources;
|
|
@@ -11153,17 +11156,17 @@ declare const getAuthProps: (name: string) => {
|
|
|
11153
11156
|
readonly clientSecret: string;
|
|
11154
11157
|
};
|
|
11155
11158
|
|
|
11156
|
-
declare const getTableName:
|
|
11159
|
+
declare const getTableName: typeof getLocalResourceName;
|
|
11157
11160
|
interface TableResources {
|
|
11158
11161
|
}
|
|
11159
11162
|
declare const Table: TableResources;
|
|
11160
11163
|
|
|
11161
|
-
declare const getTopicName:
|
|
11164
|
+
declare const getTopicName: typeof getGlobalResourceName;
|
|
11162
11165
|
interface TopicResources {
|
|
11163
11166
|
}
|
|
11164
11167
|
declare const Topic: TopicResources;
|
|
11165
11168
|
|
|
11166
|
-
declare const getQueueName:
|
|
11169
|
+
declare const getQueueName: typeof getLocalResourceName;
|
|
11167
11170
|
interface QueueResources {
|
|
11168
11171
|
}
|
|
11169
11172
|
declare const Queue: QueueResources;
|
|
@@ -11176,7 +11179,7 @@ interface CacheResources {
|
|
|
11176
11179
|
}
|
|
11177
11180
|
declare const Cache: CacheResources;
|
|
11178
11181
|
|
|
11179
|
-
declare const getStoreName: <N extends string, S extends string
|
|
11182
|
+
declare const getStoreName: <N extends string, S extends string>(name: N, stack: S) => `store-app-${S}-${N}`;
|
|
11180
11183
|
interface StoreResources {
|
|
11181
11184
|
}
|
|
11182
11185
|
declare const Store: StoreResources;
|
|
@@ -11186,7 +11189,7 @@ interface ConfigResources {
|
|
|
11186
11189
|
}
|
|
11187
11190
|
declare const Config: ConfigResources;
|
|
11188
11191
|
|
|
11189
|
-
declare const getSearchName:
|
|
11192
|
+
declare const getSearchName: typeof getLocalResourceName;
|
|
11190
11193
|
interface SearchResources {
|
|
11191
11194
|
}
|
|
11192
11195
|
declare const Search: SearchResources;
|
package/dist/index.js
CHANGED
|
@@ -7,12 +7,12 @@ import { paramCase } from "change-case";
|
|
|
7
7
|
var APP = process.env.APP || "app";
|
|
8
8
|
var STACK = process.env.STACK || "stack";
|
|
9
9
|
var STAGE = process.env.STAGE || "stage";
|
|
10
|
-
|
|
11
|
-
return `${APP}-${paramCase(stack)}-${paramCase(name)}`;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return `${APP}-${paramCase(name)}`;
|
|
15
|
-
}
|
|
10
|
+
function getLocalResourceName(name, stack = STACK, resource) {
|
|
11
|
+
return `${resource ? paramCase(resource) + "-" : ""}${APP}-${paramCase(stack)}-${paramCase(name)}`;
|
|
12
|
+
}
|
|
13
|
+
function getGlobalResourceName(name, resource) {
|
|
14
|
+
return `${resource ? paramCase(resource) + "-" : ""}${APP}-${paramCase(name)}`;
|
|
15
|
+
}
|
|
16
16
|
|
|
17
17
|
// src/node/function.ts
|
|
18
18
|
import { invoke } from "@awsless/lambda";
|
|
@@ -192,7 +192,9 @@ var Cache = /* @__PURE__ */ createProxy((stack) => {
|
|
|
192
192
|
|
|
193
193
|
// src/node/store.ts
|
|
194
194
|
import { putObject, getObject, deleteObject } from "@awsless/s3";
|
|
195
|
-
var getStoreName =
|
|
195
|
+
var getStoreName = (name, stack) => {
|
|
196
|
+
return getLocalResourceName(name, stack, "store");
|
|
197
|
+
};
|
|
196
198
|
var Store = /* @__PURE__ */ createProxy((stack) => {
|
|
197
199
|
return createProxy((name) => {
|
|
198
200
|
const bucket = getStoreName(name, stack);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.156",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@awsless/lambda": "^0.0.
|
|
32
|
-
"@awsless/s3": "^0.0.8",
|
|
31
|
+
"@awsless/lambda": "^0.0.18",
|
|
33
32
|
"@awsless/redis": "^0.0.10",
|
|
33
|
+
"@awsless/s3": "^0.0.8",
|
|
34
34
|
"@awsless/sns": "^0.0.7",
|
|
35
|
-
"@awsless/sqs": "^0.0.7",
|
|
36
35
|
"@awsless/ssm": "^0.0.7",
|
|
36
|
+
"@awsless/sqs": "^0.0.7",
|
|
37
37
|
"@awsless/validate": "^0.0.13",
|
|
38
38
|
"@awsless/weak-cache": "^0.0.1"
|
|
39
39
|
},
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"wrap-ansi": "^8.1.0",
|
|
90
90
|
"zod": "^3.21.4",
|
|
91
91
|
"zod-to-json-schema": "^3.22.3",
|
|
92
|
-
"@awsless/graphql": "^0.0.
|
|
92
|
+
"@awsless/graphql": "^0.0.9",
|
|
93
93
|
"@awsless/code": "^0.0.10"
|
|
94
94
|
},
|
|
95
95
|
"scripts": {
|