@awsless/awsless 0.0.396 → 0.0.397
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 +24 -23
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/server.js +6 -1
- package/package.json +8 -8
package/dist/bin.js
CHANGED
|
@@ -11149,6 +11149,7 @@ var SsmStore = class {
|
|
|
11149
11149
|
};
|
|
11150
11150
|
|
|
11151
11151
|
// src/feature/config/index.ts
|
|
11152
|
+
import { constantCase as constantCase4 } from "change-case";
|
|
11152
11153
|
var configFeature = defineFeature({
|
|
11153
11154
|
name: "config",
|
|
11154
11155
|
async onTypeGen(ctx) {
|
|
@@ -11183,9 +11184,9 @@ var configFeature = defineFeature({
|
|
|
11183
11184
|
const configs = ctx.stackConfig.configs ?? [];
|
|
11184
11185
|
for (const name of configs) {
|
|
11185
11186
|
ctx.registerConfig(name);
|
|
11187
|
+
ctx.addEnv(`CONFIG_${constantCase4(name)}`, name);
|
|
11186
11188
|
}
|
|
11187
11189
|
if (configs.length) {
|
|
11188
|
-
ctx.addEnv("CONFIG", configs.join(","));
|
|
11189
11190
|
ctx.onStackPolicy((policy) => {
|
|
11190
11191
|
policy.addStatement({
|
|
11191
11192
|
actions: [
|
|
@@ -11472,7 +11473,7 @@ var functionFeature = defineFeature({
|
|
|
11472
11473
|
});
|
|
11473
11474
|
|
|
11474
11475
|
// src/feature/graphql/index.ts
|
|
11475
|
-
import { constantCase as
|
|
11476
|
+
import { constantCase as constantCase5, paramCase as paramCase5 } from "change-case";
|
|
11476
11477
|
import { generate } from "@awsless/graphql";
|
|
11477
11478
|
import { mergeTypeDefs } from "@graphql-tools/merge";
|
|
11478
11479
|
import { readFile as readFile5 } from "fs/promises";
|
|
@@ -11747,9 +11748,9 @@ var graphqlFeature = defineFeature({
|
|
|
11747
11748
|
evaluateTargetHealth: false
|
|
11748
11749
|
}
|
|
11749
11750
|
});
|
|
11750
|
-
ctx.bind(`GRAPHQL_${
|
|
11751
|
+
ctx.bind(`GRAPHQL_${constantCase5(id)}_ENDPOINT`, domainName);
|
|
11751
11752
|
} else {
|
|
11752
|
-
ctx.bind(`GRAPHQL_${
|
|
11753
|
+
ctx.bind(`GRAPHQL_${constantCase5(id)}_ENDPOINT`, api.graphql.uri);
|
|
11753
11754
|
}
|
|
11754
11755
|
}
|
|
11755
11756
|
},
|
|
@@ -11831,7 +11832,7 @@ var graphqlFeature = defineFeature({
|
|
|
11831
11832
|
|
|
11832
11833
|
// src/feature/http/index.ts
|
|
11833
11834
|
import { aws as aws9, Node as Node8 } from "@awsless/formation";
|
|
11834
|
-
import { camelCase as camelCase4, constantCase as
|
|
11835
|
+
import { camelCase as camelCase4, constantCase as constantCase6 } from "change-case";
|
|
11835
11836
|
import { relative as relative3 } from "path";
|
|
11836
11837
|
var parseRoute = (route) => {
|
|
11837
11838
|
const [method, ...paths] = route.split(" ");
|
|
@@ -11960,7 +11961,7 @@ var httpFeature = defineFeature({
|
|
|
11960
11961
|
dnsName: loadBalancer.dnsName
|
|
11961
11962
|
}
|
|
11962
11963
|
});
|
|
11963
|
-
ctx.bind(`HTTP_${
|
|
11964
|
+
ctx.bind(`HTTP_${constantCase6(id)}_ENDPOINT`, domainName);
|
|
11964
11965
|
}
|
|
11965
11966
|
},
|
|
11966
11967
|
onStack(ctx) {
|
|
@@ -12266,7 +12267,7 @@ var onFailureFeature = defineFeature({
|
|
|
12266
12267
|
|
|
12267
12268
|
// src/feature/pubsub/index.ts
|
|
12268
12269
|
import { aws as aws13, Node as Node12 } from "@awsless/formation";
|
|
12269
|
-
import { constantCase as
|
|
12270
|
+
import { constantCase as constantCase7 } from "change-case";
|
|
12270
12271
|
var pubsubFeature = defineFeature({
|
|
12271
12272
|
name: "pubsub",
|
|
12272
12273
|
onApp(ctx) {
|
|
@@ -12291,7 +12292,7 @@ var pubsubFeature = defineFeature({
|
|
|
12291
12292
|
sourceArn: authorizer.arn,
|
|
12292
12293
|
action: "lambda:InvokeFunction"
|
|
12293
12294
|
});
|
|
12294
|
-
ctx.bind(`PUBSUB_${
|
|
12295
|
+
ctx.bind(`PUBSUB_${constantCase7(id)}_AUTHORIZER`, name);
|
|
12295
12296
|
const endpoint = new aws13.iot.Endpoint(group, "endpoint", {
|
|
12296
12297
|
type: "data-ats"
|
|
12297
12298
|
});
|
|
@@ -12312,9 +12313,9 @@ var pubsubFeature = defineFeature({
|
|
|
12312
12313
|
type: "CNAME",
|
|
12313
12314
|
records: [endpoint.address]
|
|
12314
12315
|
});
|
|
12315
|
-
ctx.bind(`PUBSUB_${
|
|
12316
|
+
ctx.bind(`PUBSUB_${constantCase7(id)}_ENDPOINT`, domainName);
|
|
12316
12317
|
} else {
|
|
12317
|
-
ctx.bind(`PUBSUB_${
|
|
12318
|
+
ctx.bind(`PUBSUB_${constantCase7(id)}_ENDPOINT`, endpoint.address);
|
|
12318
12319
|
}
|
|
12319
12320
|
}
|
|
12320
12321
|
ctx.onGlobalPolicy((policy) => {
|
|
@@ -12353,7 +12354,7 @@ var pubsubFeature = defineFeature({
|
|
|
12353
12354
|
|
|
12354
12355
|
// src/feature/queue/index.ts
|
|
12355
12356
|
import { aws as aws14, Node as Node13 } from "@awsless/formation";
|
|
12356
|
-
import { camelCase as camelCase5, constantCase as
|
|
12357
|
+
import { camelCase as camelCase5, constantCase as constantCase8 } from "change-case";
|
|
12357
12358
|
import deepmerge3 from "deepmerge";
|
|
12358
12359
|
import { relative as relative4 } from "path";
|
|
12359
12360
|
var typeGenCode3 = `
|
|
@@ -12437,7 +12438,7 @@ var queueFeature = defineFeature({
|
|
|
12437
12438
|
actions: ["sqs:ReceiveMessage", "sqs:DeleteMessage", "sqs:GetQueueAttributes"],
|
|
12438
12439
|
resources: [queue2.arn]
|
|
12439
12440
|
});
|
|
12440
|
-
ctx.addEnv(`QUEUE_${
|
|
12441
|
+
ctx.addEnv(`QUEUE_${constantCase8(ctx.stack.name)}_${constantCase8(id)}_URL`, queue2.url);
|
|
12441
12442
|
ctx.onStackPolicy((policy2) => {
|
|
12442
12443
|
policy2.addStatement(queue2.permissions);
|
|
12443
12444
|
});
|
|
@@ -12447,7 +12448,7 @@ var queueFeature = defineFeature({
|
|
|
12447
12448
|
|
|
12448
12449
|
// src/feature/rest/index.ts
|
|
12449
12450
|
import { aws as aws15, Node as Node14 } from "@awsless/formation";
|
|
12450
|
-
import { constantCase as
|
|
12451
|
+
import { constantCase as constantCase9 } from "change-case";
|
|
12451
12452
|
var restFeature = defineFeature({
|
|
12452
12453
|
name: "rest",
|
|
12453
12454
|
onApp(ctx) {
|
|
@@ -12495,7 +12496,7 @@ var restFeature = defineFeature({
|
|
|
12495
12496
|
}
|
|
12496
12497
|
});
|
|
12497
12498
|
record.dependsOn(domain, mapping);
|
|
12498
|
-
ctx.bind(`REST_${
|
|
12499
|
+
ctx.bind(`REST_${constantCase9(id)}_ENDPOINT`, domainName);
|
|
12499
12500
|
} else {
|
|
12500
12501
|
}
|
|
12501
12502
|
}
|
|
@@ -12538,7 +12539,7 @@ var restFeature = defineFeature({
|
|
|
12538
12539
|
});
|
|
12539
12540
|
|
|
12540
12541
|
// src/feature/rpc/index.ts
|
|
12541
|
-
import { camelCase as camelCase6, constantCase as
|
|
12542
|
+
import { camelCase as camelCase6, constantCase as constantCase10, paramCase as paramCase6 } from "change-case";
|
|
12542
12543
|
import { Asset as Asset5, aws as aws17, Node as Node16, Output as Output3 } from "@awsless/formation";
|
|
12543
12544
|
import { mebibytes as mebibytes2 } from "@awsless/size";
|
|
12544
12545
|
import { dirname as dirname10, join as join9, relative as relative5 } from "path";
|
|
@@ -12822,9 +12823,9 @@ var rpcFeature = defineFeature({
|
|
|
12822
12823
|
name: fullDomainName,
|
|
12823
12824
|
alias: cdn.aliasTarget
|
|
12824
12825
|
});
|
|
12825
|
-
ctx.bind(`RPC_${
|
|
12826
|
+
ctx.bind(`RPC_${constantCase10(id)}_ENDPOINT`, fullDomainName);
|
|
12826
12827
|
} else {
|
|
12827
|
-
ctx.bind(`RPC_${
|
|
12828
|
+
ctx.bind(`RPC_${constantCase10(id)}_ENDPOINT`, cdn.aliasTarget.dnsName);
|
|
12828
12829
|
}
|
|
12829
12830
|
}
|
|
12830
12831
|
},
|
|
@@ -12851,7 +12852,7 @@ var rpcFeature = defineFeature({
|
|
|
12851
12852
|
|
|
12852
12853
|
// src/feature/search/index.ts
|
|
12853
12854
|
import { aws as aws18, Node as Node17 } from "@awsless/formation";
|
|
12854
|
-
import { constantCase as
|
|
12855
|
+
import { constantCase as constantCase11 } from "change-case";
|
|
12855
12856
|
var typeGenCode4 = `
|
|
12856
12857
|
import { AnyStruct, Table } from '@awsless/open-search'
|
|
12857
12858
|
|
|
@@ -12907,7 +12908,7 @@ var searchFeature = defineFeature({
|
|
|
12907
12908
|
]
|
|
12908
12909
|
});
|
|
12909
12910
|
}
|
|
12910
|
-
ctx.addEnv(`SEARCH_${
|
|
12911
|
+
ctx.addEnv(`SEARCH_${constantCase11(ctx.stack.name)}_${constantCase11(id)}_DOMAIN`, openSearch.domainEndpoint);
|
|
12911
12912
|
ctx.onStackPolicy((policy) => {
|
|
12912
12913
|
policy.addStatement({
|
|
12913
12914
|
actions: ["es:ESHttp*"],
|
|
@@ -12945,7 +12946,7 @@ var getContentType = (file) => {
|
|
|
12945
12946
|
};
|
|
12946
12947
|
|
|
12947
12948
|
// src/feature/site/index.ts
|
|
12948
|
-
import { constantCase as
|
|
12949
|
+
import { constantCase as constantCase12 } from "change-case";
|
|
12949
12950
|
var siteFeature = defineFeature({
|
|
12950
12951
|
name: "site",
|
|
12951
12952
|
onStack(ctx) {
|
|
@@ -13144,7 +13145,7 @@ var siteFeature = defineFeature({
|
|
|
13144
13145
|
});
|
|
13145
13146
|
}
|
|
13146
13147
|
ctx.bind(
|
|
13147
|
-
`SITE_${
|
|
13148
|
+
`SITE_${constantCase12(ctx.stack.name)}_${constantCase12(id)}_ENDPOINT`,
|
|
13148
13149
|
domainName ? domainName : distribution.domainName
|
|
13149
13150
|
);
|
|
13150
13151
|
}
|
|
@@ -13282,7 +13283,7 @@ var storeFeature = defineFeature({
|
|
|
13282
13283
|
|
|
13283
13284
|
// src/feature/stream/index.ts
|
|
13284
13285
|
import { aws as aws21, Node as Node20 } from "@awsless/formation";
|
|
13285
|
-
import { constantCase as
|
|
13286
|
+
import { constantCase as constantCase13 } from "change-case";
|
|
13286
13287
|
var streamFeature = defineFeature({
|
|
13287
13288
|
name: "stream",
|
|
13288
13289
|
onStack(ctx) {
|
|
@@ -13301,7 +13302,7 @@ var streamFeature = defineFeature({
|
|
|
13301
13302
|
const streamKey = new aws21.ivs.StreamKey(group, "key", {
|
|
13302
13303
|
channel: channel.arn
|
|
13303
13304
|
});
|
|
13304
|
-
const prefix = `STREAM_${
|
|
13305
|
+
const prefix = `STREAM_${constantCase13(ctx.stack.name)}_${constantCase13(id)}`;
|
|
13305
13306
|
ctx.bind(`${prefix}_ENDPOINT`, channel.playbackUrl);
|
|
13306
13307
|
ctx.addEnv(`${prefix}_INGEST_ENDPOINT`, channel.ingestEndpoint);
|
|
13307
13308
|
ctx.addEnv(`${prefix}_STREAM_KEY`, streamKey.value);
|
|
Binary file
|
package/dist/server.js
CHANGED
|
@@ -319,7 +319,12 @@ var IS_TEST = process.env.NODE_ENV === "test";
|
|
|
319
319
|
var CONFIGS = process.env.CONFIG;
|
|
320
320
|
var loadConfigData = /* @__NO_SIDE_EFFECTS__ */ async () => {
|
|
321
321
|
if (!IS_TEST && CONFIGS) {
|
|
322
|
-
const keys =
|
|
322
|
+
const keys = [];
|
|
323
|
+
for (const key of Object.keys(process.env)) {
|
|
324
|
+
if (key.startsWith("CONFIG_")) {
|
|
325
|
+
keys.push(process.env[key]);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
323
328
|
if (keys.length > 0) {
|
|
324
329
|
const paths = {};
|
|
325
330
|
for (const key of keys) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.397",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
+
"@awsless/iot": "^0.0.2",
|
|
31
32
|
"@awsless/lambda": "^0.0.27",
|
|
32
|
-
"@awsless/open-search": "^0.0.15",
|
|
33
33
|
"@awsless/redis": "^0.0.13",
|
|
34
|
-
"@awsless/
|
|
35
|
-
"@awsless/iot": "^0.0.2",
|
|
34
|
+
"@awsless/mqtt": "^0.0.2",
|
|
36
35
|
"@awsless/sns": "^0.0.7",
|
|
37
36
|
"@awsless/sqs": "^0.0.7",
|
|
38
37
|
"@awsless/validate": "^0.0.16",
|
|
39
38
|
"@awsless/ssm": "^0.0.7",
|
|
39
|
+
"@awsless/s3": "^0.0.18",
|
|
40
40
|
"@awsless/weak-cache": "^0.0.1",
|
|
41
|
-
"@awsless/
|
|
41
|
+
"@awsless/open-search": "^0.0.15"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@arcanyx/cidr-slicer": "^0.3.0",
|
|
@@ -115,10 +115,10 @@
|
|
|
115
115
|
"@awsless/code": "^0.0.10",
|
|
116
116
|
"@awsless/duration": "^0.0.1",
|
|
117
117
|
"@awsless/formation": "^0.0.57",
|
|
118
|
-
"@awsless/graphql": "^0.0.9",
|
|
119
118
|
"@awsless/size": "^0.0.1",
|
|
120
|
-
"@awsless/
|
|
121
|
-
"@awsless/
|
|
119
|
+
"@awsless/validate": "^0.0.16",
|
|
120
|
+
"@awsless/graphql": "^0.0.9",
|
|
121
|
+
"@awsless/ts-file-cache": "^0.0.10"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@node-rs/bcrypt": "^1.10.5"
|