@awsless/awsless 0.0.351 → 0.0.352

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.
Files changed (2) hide show
  1. package/dist/bin.js +8 -5
  2. package/package.json +6 -6
package/dist/bin.js CHANGED
@@ -14323,7 +14323,7 @@ import { unwrap as unwrap3 } from "@awsless/formation";
14323
14323
  import { note as note3 } from "@clack/prompts";
14324
14324
  import { spawn } from "child_process";
14325
14325
  var bind = (program2) => {
14326
- program2.command("bind").argument("<command...>", "The command to execute").description(`Bind your site environment variables to a command`).action(async (commands7) => {
14326
+ program2.command("bind").argument("<command...>", "The command to execute").option("--configs <string...>", "List of config values that will be accessable").description(`Bind your site environment variables to a command`).action(async (commands7) => {
14327
14327
  await layout("bind", async ({ appConfig, stackConfigs }) => {
14328
14328
  const region = appConfig.region;
14329
14329
  const credentials = getCredentials(appConfig.profile);
@@ -14344,19 +14344,22 @@ var bind = (program2) => {
14344
14344
  return;
14345
14345
  }
14346
14346
  const command = commands7.join(" ");
14347
+ const freshCred = await credentials();
14347
14348
  spawn(command, {
14348
14349
  env: {
14349
14350
  // Pass the process env vars
14350
14351
  ...process.env,
14351
14352
  // Pass the site bind env vars
14352
14353
  ...env,
14354
+ // Pass in
14355
+ CONFIG: (program2.opts().configs ?? []).join(","),
14353
14356
  // Basic info
14354
14357
  AWS_REGION: appConfig.region,
14355
- AWS_ACCOUNT_ID: accountId
14358
+ AWS_ACCOUNT_ID: accountId,
14356
14359
  // Give AWS access
14357
- // AWS_ACCESS_KEY_ID: credentials.accessKeyId,
14358
- // AWS_SECRET_ACCESS_KEY: credentials.secretAccessKey,
14359
- // AWS_SESSION_TOKEN: credentials.sessionToken,
14360
+ AWS_ACCESS_KEY_ID: freshCred.accessKeyId,
14361
+ AWS_SECRET_ACCESS_KEY: freshCred.secretAccessKey,
14362
+ AWS_SESSION_TOKEN: freshCred.sessionToken
14360
14363
  },
14361
14364
  stdio: "inherit",
14362
14365
  shell: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.351",
3
+ "version": "0.0.352",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -30,13 +30,13 @@
30
30
  "peerDependencies": {
31
31
  "@awsless/iot": "^0.0.2",
32
32
  "@awsless/lambda": "^0.0.26",
33
+ "@awsless/open-search": "^0.0.15",
33
34
  "@awsless/redis": "^0.0.12",
34
35
  "@awsless/s3": "^0.0.18",
35
- "@awsless/sqs": "^0.0.7",
36
36
  "@awsless/sns": "^0.0.7",
37
- "@awsless/validate": "^0.0.15",
38
- "@awsless/open-search": "^0.0.15",
37
+ "@awsless/sqs": "^0.0.7",
39
38
  "@awsless/ssm": "^0.0.7",
39
+ "@awsless/validate": "^0.0.15",
40
40
  "@awsless/weak-cache": "^0.0.1"
41
41
  },
42
42
  "dependencies": {
@@ -112,8 +112,8 @@
112
112
  "@awsless/formation": "^0.0.53",
113
113
  "@awsless/graphql": "^0.0.9",
114
114
  "@awsless/size": "^0.0.1",
115
- "@awsless/validate": "^0.0.15",
116
- "@awsless/ts-file-cache": "^0.0.9"
115
+ "@awsless/ts-file-cache": "^0.0.9",
116
+ "@awsless/validate": "^0.0.15"
117
117
  },
118
118
  "scripts": {
119
119
  "test": "pnpm code test",