@awsless/awsless 0.0.410 → 0.0.412
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 +13 -14
- package/dist/build-json-schema.js +2 -2
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/server.js +1 -1
- package/dist/stack.json +1 -1
- package/package.json +13 -13
package/dist/bin.js
CHANGED
|
@@ -8532,8 +8532,8 @@ var SearchsSchema = z28.record(
|
|
|
8532
8532
|
type: TypeSchema3.default("t3.small"),
|
|
8533
8533
|
count: z28.number().int().min(1).default(1),
|
|
8534
8534
|
version: VersionSchema.default("2.13"),
|
|
8535
|
-
storage: StorageSizeSchema.default("10 GB")
|
|
8536
|
-
vpc:
|
|
8535
|
+
storage: StorageSizeSchema.default("10 GB")
|
|
8536
|
+
// vpc: z.boolean().default(false),
|
|
8537
8537
|
})
|
|
8538
8538
|
).optional().describe("Define the search instances in your stack. Backed by OpenSearch.");
|
|
8539
8539
|
|
|
@@ -12922,15 +12922,6 @@ var searchFeature = defineFeature({
|
|
|
12922
12922
|
]
|
|
12923
12923
|
}
|
|
12924
12924
|
});
|
|
12925
|
-
if (props.vpc) {
|
|
12926
|
-
openSearch.setVpc({
|
|
12927
|
-
securityGroupIds: [ctx.shared.get(`vpc-security-group-id`)],
|
|
12928
|
-
subnetIds: [
|
|
12929
|
-
ctx.shared.get("vpc-private-subnet-id-1"),
|
|
12930
|
-
ctx.shared.get("vpc-private-subnet-id-2")
|
|
12931
|
-
]
|
|
12932
|
-
});
|
|
12933
|
-
}
|
|
12934
12925
|
ctx.addEnv(`SEARCH_${constantCase11(ctx.stack.name)}_${constantCase11(id)}_DOMAIN`, openSearch.domainEndpoint);
|
|
12935
12926
|
ctx.onStackPolicy((policy) => {
|
|
12936
12927
|
policy.addStatement({
|
|
@@ -14980,9 +14971,10 @@ var auth = (program2) => {
|
|
|
14980
14971
|
// src/cli/command/bind.ts
|
|
14981
14972
|
import { unwrap as unwrap3 } from "@awsless/formation";
|
|
14982
14973
|
import { log as log9, note as note3 } from "@clack/prompts";
|
|
14974
|
+
import { constantCase as constantCase14 } from "change-case";
|
|
14983
14975
|
import { spawn } from "child_process";
|
|
14984
14976
|
var bind = (program2) => {
|
|
14985
|
-
program2.command("bind").argument("[command...]", "The command to execute").option("--
|
|
14977
|
+
program2.command("bind").argument("[command...]", "The command to execute").option("--config <string...>", "List of config values that will be accessable", (v) => v.split(",")).description(`Bind your site environment variables to a command`).action(async (commands7 = [], opts) => {
|
|
14986
14978
|
await layout("bind", async ({ appConfig, stackConfigs }) => {
|
|
14987
14979
|
const region = appConfig.region;
|
|
14988
14980
|
const credentials = getCredentials(appConfig.profile);
|
|
@@ -15003,6 +14995,13 @@ var bind = (program2) => {
|
|
|
15003
14995
|
} else {
|
|
15004
14996
|
log9.warning("No bindings available.");
|
|
15005
14997
|
}
|
|
14998
|
+
const configs = {};
|
|
14999
|
+
for (const name of opts.config) {
|
|
15000
|
+
configs[`CONFIG_${constantCase14(name)}`] = name;
|
|
15001
|
+
}
|
|
15002
|
+
if (opts.config.length > 0) {
|
|
15003
|
+
note3(wrap(opts.config.map((v) => color.label(constantCase14(v)))), "Bind Config");
|
|
15004
|
+
}
|
|
15006
15005
|
if (commands7.length === 0) {
|
|
15007
15006
|
return "No command to execute.";
|
|
15008
15007
|
}
|
|
@@ -15014,10 +15013,10 @@ var bind = (program2) => {
|
|
|
15014
15013
|
...process.env,
|
|
15015
15014
|
// Pass the site bind env vars
|
|
15016
15015
|
...env,
|
|
15016
|
+
// Pass in the config values to load
|
|
15017
|
+
...configs,
|
|
15017
15018
|
// Pass the app config name
|
|
15018
15019
|
APP: appConfig.name,
|
|
15019
|
-
// Pass in the config values to load
|
|
15020
|
-
CONFIG: opts.configs.join(","),
|
|
15021
15020
|
// Basic AWS info
|
|
15022
15021
|
AWS_REGION: appConfig.region,
|
|
15023
15022
|
AWS_ACCOUNT_ID: accountId,
|
|
@@ -786,8 +786,8 @@ var SearchsSchema = z22.record(
|
|
|
786
786
|
type: TypeSchema3.default("t3.small"),
|
|
787
787
|
count: z22.number().int().min(1).default(1),
|
|
788
788
|
version: VersionSchema.default("2.13"),
|
|
789
|
-
storage: StorageSizeSchema.default("10 GB")
|
|
790
|
-
vpc:
|
|
789
|
+
storage: StorageSizeSchema.default("10 GB")
|
|
790
|
+
// vpc: z.boolean().default(false),
|
|
791
791
|
})
|
|
792
792
|
).optional().describe("Define the search instances in your stack. Backed by OpenSearch.");
|
|
793
793
|
|
|
Binary file
|
package/dist/server.js
CHANGED
|
@@ -467,7 +467,7 @@ var Search = /* @__PURE__ */ createProxy((stack) => {
|
|
|
467
467
|
domain,
|
|
468
468
|
defineTable(tableName, schema) {
|
|
469
469
|
return define(tableName, schema, () => {
|
|
470
|
-
if (!client) client = searchClient({ node: domain }, "es");
|
|
470
|
+
if (!client) client = searchClient({ node: `https://${domain}` }, "es");
|
|
471
471
|
return client;
|
|
472
472
|
});
|
|
473
473
|
}
|