@awsless/awsless 0.0.350 → 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.
- package/dist/bin.js +11 -10
- package/package.json +6 -6
package/dist/bin.js
CHANGED
|
@@ -10520,7 +10520,7 @@ var generateRecursiveFileHashes = async (workspace, file, source, allowedExtensi
|
|
|
10520
10520
|
if (dependency.type === "package") {
|
|
10521
10521
|
hashes.set(file, Buffer.from(`${file}:${dependency.version}`, "utf8"));
|
|
10522
10522
|
} else {
|
|
10523
|
-
const localPackage = workspace.packages
|
|
10523
|
+
const localPackage = workspace.packages[file];
|
|
10524
10524
|
if (!localPackage) {
|
|
10525
10525
|
throw new Error(`Can't find the local workspace package for: ${file}`);
|
|
10526
10526
|
}
|
|
@@ -10540,16 +10540,14 @@ var generateRecursiveFileHashes = async (workspace, file, source, allowedExtensi
|
|
|
10540
10540
|
if (builtinModules.includes(file.replace(/^node\:/, ""))) {
|
|
10541
10541
|
return;
|
|
10542
10542
|
}
|
|
10543
|
-
throw new Error(`Can't find the dependency version for: ${file}`);
|
|
10543
|
+
throw new Error(`Can't find the dependency version for: ${file} inside the source: ${source}`);
|
|
10544
10544
|
};
|
|
10545
10545
|
var mergeHashes = (hashes) => {
|
|
10546
10546
|
const merge2 = Buffer.concat(Array.from(hashes.values()).sort());
|
|
10547
10547
|
return createHash("sha1").update(merge2).digest("hex");
|
|
10548
10548
|
};
|
|
10549
10549
|
var findDependency = (workspace, module, source) => {
|
|
10550
|
-
const pkg = workspace.packages.find((
|
|
10551
|
-
return source.startsWith(pkg2.path);
|
|
10552
|
-
});
|
|
10550
|
+
const pkg = Object.values(workspace.packages).filter((p2) => source.startsWith(p2.path)).sort((a, b) => b.path.split("/").length - a.path.split("/").length).find((p2) => p2.dependencies[module]);
|
|
10553
10551
|
if (!pkg) {
|
|
10554
10552
|
return;
|
|
10555
10553
|
}
|
|
@@ -14325,7 +14323,7 @@ import { unwrap as unwrap3 } from "@awsless/formation";
|
|
|
14325
14323
|
import { note as note3 } from "@clack/prompts";
|
|
14326
14324
|
import { spawn } from "child_process";
|
|
14327
14325
|
var bind = (program2) => {
|
|
14328
|
-
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) => {
|
|
14329
14327
|
await layout("bind", async ({ appConfig, stackConfigs }) => {
|
|
14330
14328
|
const region = appConfig.region;
|
|
14331
14329
|
const credentials = getCredentials(appConfig.profile);
|
|
@@ -14346,19 +14344,22 @@ var bind = (program2) => {
|
|
|
14346
14344
|
return;
|
|
14347
14345
|
}
|
|
14348
14346
|
const command = commands7.join(" ");
|
|
14347
|
+
const freshCred = await credentials();
|
|
14349
14348
|
spawn(command, {
|
|
14350
14349
|
env: {
|
|
14351
14350
|
// Pass the process env vars
|
|
14352
14351
|
...process.env,
|
|
14353
14352
|
// Pass the site bind env vars
|
|
14354
14353
|
...env,
|
|
14354
|
+
// Pass in
|
|
14355
|
+
CONFIG: (program2.opts().configs ?? []).join(","),
|
|
14355
14356
|
// Basic info
|
|
14356
14357
|
AWS_REGION: appConfig.region,
|
|
14357
|
-
AWS_ACCOUNT_ID: accountId
|
|
14358
|
+
AWS_ACCOUNT_ID: accountId,
|
|
14358
14359
|
// Give AWS access
|
|
14359
|
-
|
|
14360
|
-
|
|
14361
|
-
|
|
14360
|
+
AWS_ACCESS_KEY_ID: freshCred.accessKeyId,
|
|
14361
|
+
AWS_SECRET_ACCESS_KEY: freshCred.secretAccessKey,
|
|
14362
|
+
AWS_SESSION_TOKEN: freshCred.sessionToken
|
|
14362
14363
|
},
|
|
14363
14364
|
stdio: "inherit",
|
|
14364
14365
|
shell: true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.352",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"@awsless/iot": "^0.0.2",
|
|
32
32
|
"@awsless/lambda": "^0.0.26",
|
|
33
33
|
"@awsless/open-search": "^0.0.15",
|
|
34
|
-
"@awsless/sns": "^0.0.7",
|
|
35
|
-
"@awsless/s3": "^0.0.18",
|
|
36
34
|
"@awsless/redis": "^0.0.12",
|
|
37
|
-
"@awsless/
|
|
35
|
+
"@awsless/s3": "^0.0.18",
|
|
36
|
+
"@awsless/sns": "^0.0.7",
|
|
38
37
|
"@awsless/sqs": "^0.0.7",
|
|
38
|
+
"@awsless/ssm": "^0.0.7",
|
|
39
39
|
"@awsless/validate": "^0.0.15",
|
|
40
40
|
"@awsless/weak-cache": "^0.0.1"
|
|
41
41
|
},
|
|
@@ -110,9 +110,9 @@
|
|
|
110
110
|
"@awsless/code": "^0.0.10",
|
|
111
111
|
"@awsless/duration": "^0.0.1",
|
|
112
112
|
"@awsless/formation": "^0.0.53",
|
|
113
|
-
"@awsless/size": "^0.0.1",
|
|
114
113
|
"@awsless/graphql": "^0.0.9",
|
|
115
|
-
"@awsless/
|
|
114
|
+
"@awsless/size": "^0.0.1",
|
|
115
|
+
"@awsless/ts-file-cache": "^0.0.9",
|
|
116
116
|
"@awsless/validate": "^0.0.15"
|
|
117
117
|
},
|
|
118
118
|
"scripts": {
|