@awsless/awsless 0.0.398 → 0.0.400
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 +87 -89
- package/dist/client.d.ts +1 -1
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/server.js +1 -2
- package/package.json +7 -7
package/dist/bin.js
CHANGED
|
@@ -278,13 +278,13 @@ var require_directives = __commonJS({
|
|
|
278
278
|
* @param onError - May be called even if the action was successful
|
|
279
279
|
* @returns `true` on success
|
|
280
280
|
*/
|
|
281
|
-
add(
|
|
281
|
+
add(line2, onError) {
|
|
282
282
|
if (this.atNextDocument) {
|
|
283
283
|
this.yaml = { explicit: _Directives.defaultYaml.explicit, version: "1.1" };
|
|
284
284
|
this.tags = Object.assign({}, _Directives.defaultTags);
|
|
285
285
|
this.atNextDocument = false;
|
|
286
286
|
}
|
|
287
|
-
const parts =
|
|
287
|
+
const parts = line2.trim().split(/[ \t]+/);
|
|
288
288
|
const name = parts.shift();
|
|
289
289
|
switch (name) {
|
|
290
290
|
case "%TAG": {
|
|
@@ -1645,7 +1645,7 @@ var require_log = __commonJS({
|
|
|
1645
1645
|
var require_addPairToJSMap = __commonJS({
|
|
1646
1646
|
"../../node_modules/.pnpm/yaml@2.5.0/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports) {
|
|
1647
1647
|
"use strict";
|
|
1648
|
-
var
|
|
1648
|
+
var log12 = require_log();
|
|
1649
1649
|
var stringify = require_stringify();
|
|
1650
1650
|
var identity = require_identity();
|
|
1651
1651
|
var Scalar = require_Scalar();
|
|
@@ -1724,7 +1724,7 @@ var require_addPairToJSMap = __commonJS({
|
|
|
1724
1724
|
let jsonStr = JSON.stringify(strKey);
|
|
1725
1725
|
if (jsonStr.length > 40)
|
|
1726
1726
|
jsonStr = jsonStr.substring(0, 36) + '..."';
|
|
1727
|
-
|
|
1727
|
+
log12.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);
|
|
1728
1728
|
ctx.mapKeyWarned = true;
|
|
1729
1729
|
}
|
|
1730
1730
|
return strKey;
|
|
@@ -1823,9 +1823,9 @@ var require_stringifyCollection = __commonJS({
|
|
|
1823
1823
|
} else {
|
|
1824
1824
|
str = lines[0];
|
|
1825
1825
|
for (let i = 1; i < lines.length; ++i) {
|
|
1826
|
-
const
|
|
1827
|
-
str +=
|
|
1828
|
-
${indent}${
|
|
1826
|
+
const line2 = lines[i];
|
|
1827
|
+
str += line2 ? `
|
|
1828
|
+
${indent}${line2}` : "\n";
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
1831
|
if (comment) {
|
|
@@ -1892,14 +1892,14 @@ ${indent}${line}` : "\n";
|
|
|
1892
1892
|
return start + end;
|
|
1893
1893
|
} else {
|
|
1894
1894
|
if (!reqNewline) {
|
|
1895
|
-
const len = lines.reduce((sum,
|
|
1895
|
+
const len = lines.reduce((sum, line2) => sum + line2.length + 2, 2);
|
|
1896
1896
|
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
|
1897
1897
|
}
|
|
1898
1898
|
if (reqNewline) {
|
|
1899
1899
|
let str = start;
|
|
1900
|
-
for (const
|
|
1901
|
-
str +=
|
|
1902
|
-
${indentStep}${indent}${
|
|
1900
|
+
for (const line2 of lines)
|
|
1901
|
+
str += line2 ? `
|
|
1902
|
+
${indentStep}${indent}${line2}` : "\n";
|
|
1903
1903
|
return `${str}
|
|
1904
1904
|
${indent}${end}`;
|
|
1905
1905
|
} else {
|
|
@@ -3627,10 +3627,10 @@ var require_errors = __commonJS({
|
|
|
3627
3627
|
if (error.pos[0] === -1)
|
|
3628
3628
|
return;
|
|
3629
3629
|
error.linePos = error.pos.map((pos) => lc.linePos(pos));
|
|
3630
|
-
const { line, col } = error.linePos[0];
|
|
3631
|
-
error.message += ` at line ${
|
|
3630
|
+
const { line: line2, col } = error.linePos[0];
|
|
3631
|
+
error.message += ` at line ${line2}, column ${col}`;
|
|
3632
3632
|
let ci = col - 1;
|
|
3633
|
-
let lineStr = src.substring(lc.lineStarts[
|
|
3633
|
+
let lineStr = src.substring(lc.lineStarts[line2 - 1], lc.lineStarts[line2]).replace(/[\n\r]+$/, "");
|
|
3634
3634
|
if (ci >= 60 && lineStr.length > 80) {
|
|
3635
3635
|
const trimStart = Math.min(ci - 39, lineStr.length - 79);
|
|
3636
3636
|
lineStr = "\u2026" + lineStr.substring(trimStart);
|
|
@@ -3638,8 +3638,8 @@ var require_errors = __commonJS({
|
|
|
3638
3638
|
}
|
|
3639
3639
|
if (lineStr.length > 80)
|
|
3640
3640
|
lineStr = lineStr.substring(0, 79) + "\u2026";
|
|
3641
|
-
if (
|
|
3642
|
-
let prev = src.substring(lc.lineStarts[
|
|
3641
|
+
if (line2 > 1 && /^ *$/.test(lineStr.substring(0, ci))) {
|
|
3642
|
+
let prev = src.substring(lc.lineStarts[line2 - 2], lc.lineStarts[line2 - 1]);
|
|
3643
3643
|
if (prev.length > 80)
|
|
3644
3644
|
prev = prev.substring(0, 79) + "\u2026\n";
|
|
3645
3645
|
lineStr = prev + lineStr;
|
|
@@ -3647,7 +3647,7 @@ var require_errors = __commonJS({
|
|
|
3647
3647
|
if (/[^ ]/.test(lineStr)) {
|
|
3648
3648
|
let count = 1;
|
|
3649
3649
|
const end = error.linePos[1];
|
|
3650
|
-
if (end && end.line ===
|
|
3650
|
+
if (end && end.line === line2 && end.col > col) {
|
|
3651
3651
|
count = Math.max(1, Math.min(end.col - col, 80 - ci));
|
|
3652
3652
|
}
|
|
3653
3653
|
const pointer = " ".repeat(ci) + "^".repeat(count);
|
|
@@ -4588,13 +4588,13 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
4588
4588
|
return foldLines(source.slice(1, -1)).replace(/''/g, "'");
|
|
4589
4589
|
}
|
|
4590
4590
|
function foldLines(source) {
|
|
4591
|
-
let first,
|
|
4591
|
+
let first, line2;
|
|
4592
4592
|
try {
|
|
4593
4593
|
first = new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
|
|
4594
|
-
|
|
4594
|
+
line2 = new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
|
|
4595
4595
|
} catch (_) {
|
|
4596
4596
|
first = /(.*?)[ \t]*\r?\n/sy;
|
|
4597
|
-
|
|
4597
|
+
line2 = /[ \t]*(.*?)[ \t]*\r?\n/sy;
|
|
4598
4598
|
}
|
|
4599
4599
|
let match = first.exec(source);
|
|
4600
4600
|
if (!match)
|
|
@@ -4602,8 +4602,8 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
4602
4602
|
let res = match[1];
|
|
4603
4603
|
let sep = " ";
|
|
4604
4604
|
let pos = first.lastIndex;
|
|
4605
|
-
|
|
4606
|
-
while (match =
|
|
4605
|
+
line2.lastIndex = pos;
|
|
4606
|
+
while (match = line2.exec(source)) {
|
|
4607
4607
|
if (match[1] === "") {
|
|
4608
4608
|
if (sep === "\n")
|
|
4609
4609
|
res += sep;
|
|
@@ -4613,7 +4613,7 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
4613
4613
|
res += sep + match[1];
|
|
4614
4614
|
sep = " ";
|
|
4615
4615
|
}
|
|
4616
|
-
pos =
|
|
4616
|
+
pos = line2.lastIndex;
|
|
4617
4617
|
}
|
|
4618
4618
|
const last = /[ \t]*(.*)/sy;
|
|
4619
4619
|
last.lastIndex = pos;
|
|
@@ -5720,40 +5720,40 @@ var require_lexer = __commonJS({
|
|
|
5720
5720
|
}
|
|
5721
5721
|
}
|
|
5722
5722
|
*parseStream() {
|
|
5723
|
-
let
|
|
5724
|
-
if (
|
|
5723
|
+
let line2 = this.getLine();
|
|
5724
|
+
if (line2 === null)
|
|
5725
5725
|
return this.setNext("stream");
|
|
5726
|
-
if (
|
|
5726
|
+
if (line2[0] === cst.BOM) {
|
|
5727
5727
|
yield* this.pushCount(1);
|
|
5728
|
-
|
|
5728
|
+
line2 = line2.substring(1);
|
|
5729
5729
|
}
|
|
5730
|
-
if (
|
|
5731
|
-
let dirEnd =
|
|
5732
|
-
let cs =
|
|
5730
|
+
if (line2[0] === "%") {
|
|
5731
|
+
let dirEnd = line2.length;
|
|
5732
|
+
let cs = line2.indexOf("#");
|
|
5733
5733
|
while (cs !== -1) {
|
|
5734
|
-
const ch =
|
|
5734
|
+
const ch = line2[cs - 1];
|
|
5735
5735
|
if (ch === " " || ch === " ") {
|
|
5736
5736
|
dirEnd = cs - 1;
|
|
5737
5737
|
break;
|
|
5738
5738
|
} else {
|
|
5739
|
-
cs =
|
|
5739
|
+
cs = line2.indexOf("#", cs + 1);
|
|
5740
5740
|
}
|
|
5741
5741
|
}
|
|
5742
5742
|
while (true) {
|
|
5743
|
-
const ch =
|
|
5743
|
+
const ch = line2[dirEnd - 1];
|
|
5744
5744
|
if (ch === " " || ch === " ")
|
|
5745
5745
|
dirEnd -= 1;
|
|
5746
5746
|
else
|
|
5747
5747
|
break;
|
|
5748
5748
|
}
|
|
5749
5749
|
const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));
|
|
5750
|
-
yield* this.pushCount(
|
|
5750
|
+
yield* this.pushCount(line2.length - n);
|
|
5751
5751
|
this.pushNewline();
|
|
5752
5752
|
return "stream";
|
|
5753
5753
|
}
|
|
5754
5754
|
if (this.atLineEnd()) {
|
|
5755
5755
|
const sp = yield* this.pushSpaces(true);
|
|
5756
|
-
yield* this.pushCount(
|
|
5756
|
+
yield* this.pushCount(line2.length - sp);
|
|
5757
5757
|
yield* this.pushNewline();
|
|
5758
5758
|
return "stream";
|
|
5759
5759
|
}
|
|
@@ -5794,13 +5794,13 @@ var require_lexer = __commonJS({
|
|
|
5794
5794
|
}
|
|
5795
5795
|
*parseDocument() {
|
|
5796
5796
|
yield* this.pushSpaces(true);
|
|
5797
|
-
const
|
|
5798
|
-
if (
|
|
5797
|
+
const line2 = this.getLine();
|
|
5798
|
+
if (line2 === null)
|
|
5799
5799
|
return this.setNext("doc");
|
|
5800
5800
|
let n = yield* this.pushIndicators();
|
|
5801
|
-
switch (
|
|
5801
|
+
switch (line2[n]) {
|
|
5802
5802
|
case "#":
|
|
5803
|
-
yield* this.pushCount(
|
|
5803
|
+
yield* this.pushCount(line2.length - n);
|
|
5804
5804
|
// fallthrough
|
|
5805
5805
|
case void 0:
|
|
5806
5806
|
yield* this.pushNewline();
|
|
@@ -5825,7 +5825,7 @@ var require_lexer = __commonJS({
|
|
|
5825
5825
|
case ">":
|
|
5826
5826
|
n += yield* this.parseBlockScalarHeader();
|
|
5827
5827
|
n += yield* this.pushSpaces(true);
|
|
5828
|
-
yield* this.pushCount(
|
|
5828
|
+
yield* this.pushCount(line2.length - n);
|
|
5829
5829
|
yield* this.pushNewline();
|
|
5830
5830
|
return yield* this.parseBlockScalar();
|
|
5831
5831
|
default:
|
|
@@ -5845,11 +5845,11 @@ var require_lexer = __commonJS({
|
|
|
5845
5845
|
}
|
|
5846
5846
|
sp += yield* this.pushSpaces(true);
|
|
5847
5847
|
} while (nl + sp > 0);
|
|
5848
|
-
const
|
|
5849
|
-
if (
|
|
5848
|
+
const line2 = this.getLine();
|
|
5849
|
+
if (line2 === null)
|
|
5850
5850
|
return this.setNext("flow");
|
|
5851
|
-
if (indent !== -1 && indent < this.indentNext &&
|
|
5852
|
-
const atFlowEndMarker = indent === this.indentNext - 1 && this.flowLevel === 1 && (
|
|
5851
|
+
if (indent !== -1 && indent < this.indentNext && line2[0] !== "#" || indent === 0 && (line2.startsWith("---") || line2.startsWith("...")) && isEmpty(line2[3])) {
|
|
5852
|
+
const atFlowEndMarker = indent === this.indentNext - 1 && this.flowLevel === 1 && (line2[0] === "]" || line2[0] === "}");
|
|
5853
5853
|
if (!atFlowEndMarker) {
|
|
5854
5854
|
this.flowLevel = 0;
|
|
5855
5855
|
yield cst.FLOW_END;
|
|
@@ -5857,17 +5857,17 @@ var require_lexer = __commonJS({
|
|
|
5857
5857
|
}
|
|
5858
5858
|
}
|
|
5859
5859
|
let n = 0;
|
|
5860
|
-
while (
|
|
5860
|
+
while (line2[n] === ",") {
|
|
5861
5861
|
n += yield* this.pushCount(1);
|
|
5862
5862
|
n += yield* this.pushSpaces(true);
|
|
5863
5863
|
this.flowKey = false;
|
|
5864
5864
|
}
|
|
5865
5865
|
n += yield* this.pushIndicators();
|
|
5866
|
-
switch (
|
|
5866
|
+
switch (line2[n]) {
|
|
5867
5867
|
case void 0:
|
|
5868
5868
|
return "flow";
|
|
5869
5869
|
case "#":
|
|
5870
|
-
yield* this.pushCount(
|
|
5870
|
+
yield* this.pushCount(line2.length - n);
|
|
5871
5871
|
return "flow";
|
|
5872
5872
|
case "{":
|
|
5873
5873
|
case "[":
|
|
@@ -7058,7 +7058,7 @@ var require_public_api = __commonJS({
|
|
|
7058
7058
|
var composer = require_composer();
|
|
7059
7059
|
var Document = require_Document();
|
|
7060
7060
|
var errors = require_errors();
|
|
7061
|
-
var
|
|
7061
|
+
var log12 = require_log();
|
|
7062
7062
|
var lineCounter = require_line_counter();
|
|
7063
7063
|
var parser = require_parser();
|
|
7064
7064
|
function parseOptions(options) {
|
|
@@ -7109,7 +7109,7 @@ var require_public_api = __commonJS({
|
|
|
7109
7109
|
const doc = parseDocument(src, options);
|
|
7110
7110
|
if (!doc)
|
|
7111
7111
|
return null;
|
|
7112
|
-
doc.warnings.forEach((warning) =>
|
|
7112
|
+
doc.warnings.forEach((warning) => log12.warn(doc.options.logLevel, warning));
|
|
7113
7113
|
if (doc.errors.length > 0) {
|
|
7114
7114
|
if (doc.options.logLevel !== "silent")
|
|
7115
7115
|
throw doc.errors[0];
|
|
@@ -7408,9 +7408,12 @@ var list = (data) => {
|
|
|
7408
7408
|
const padName = padText(Object.keys(data));
|
|
7409
7409
|
return Object.entries(data).map(([name, value]) => [color.label(padName(name + ":", 2)), value].join("")).join(char.br);
|
|
7410
7410
|
};
|
|
7411
|
+
var line = (message) => {
|
|
7412
|
+
console.log(color.line("\u2502 "), message);
|
|
7413
|
+
};
|
|
7411
7414
|
var table = (props) => {
|
|
7412
7415
|
console.log(color.line("\u2502"));
|
|
7413
|
-
const
|
|
7416
|
+
const table3 = new Table({
|
|
7414
7417
|
// wordWrap: true,
|
|
7415
7418
|
// wrapOnWordBoundary: false,
|
|
7416
7419
|
// truncate: '...',
|
|
@@ -7433,7 +7436,7 @@ var table = (props) => {
|
|
|
7433
7436
|
// 'right-mid': '',
|
|
7434
7437
|
}
|
|
7435
7438
|
});
|
|
7436
|
-
|
|
7439
|
+
table3.push(
|
|
7437
7440
|
...props.body.map(
|
|
7438
7441
|
(row) => row.map((v) => {
|
|
7439
7442
|
if (typeof v === "boolean") {
|
|
@@ -7443,7 +7446,7 @@ var table = (props) => {
|
|
|
7443
7446
|
})
|
|
7444
7447
|
)
|
|
7445
7448
|
);
|
|
7446
|
-
return
|
|
7449
|
+
return table3.toString();
|
|
7447
7450
|
};
|
|
7448
7451
|
|
|
7449
7452
|
// src/cli/ui/complex/bootstrap-awsless.ts
|
|
@@ -7509,12 +7512,12 @@ var createStateBucket = (client, accountId) => {
|
|
|
7509
7512
|
var bootstrapAwsless = async (props) => {
|
|
7510
7513
|
const dynamo = new DynamoDB(props);
|
|
7511
7514
|
const s3 = new S3Client(props);
|
|
7512
|
-
const [
|
|
7515
|
+
const [table3, bucket] = await Promise.all([
|
|
7513
7516
|
//
|
|
7514
7517
|
hasLockTable(dynamo),
|
|
7515
7518
|
hasStateBucket(s3, props.accountId)
|
|
7516
7519
|
]);
|
|
7517
|
-
if (!
|
|
7520
|
+
if (!table3 || !bucket) {
|
|
7518
7521
|
log.warn(`Awsless hasn't been bootstrapped yet.`);
|
|
7519
7522
|
if (!process.env.SKIP_PROMPT) {
|
|
7520
7523
|
const confirmed = await confirm({
|
|
@@ -7525,7 +7528,7 @@ var bootstrapAwsless = async (props) => {
|
|
|
7525
7528
|
}
|
|
7526
7529
|
}
|
|
7527
7530
|
await task("Bootstrapping", async (update) => {
|
|
7528
|
-
if (!
|
|
7531
|
+
if (!table3) {
|
|
7529
7532
|
await createLockTable(dynamo);
|
|
7530
7533
|
}
|
|
7531
7534
|
if (!bucket) {
|
|
@@ -13370,14 +13373,14 @@ var tableFeature = defineFeature({
|
|
|
13370
13373
|
resourceName: id
|
|
13371
13374
|
});
|
|
13372
13375
|
const deletionProtection = props.deletionProtection ?? ctx.appConfig.defaults.table?.deletionProtection;
|
|
13373
|
-
const
|
|
13376
|
+
const table3 = new aws22.dynamodb.Table(group, "table", {
|
|
13374
13377
|
...props,
|
|
13375
13378
|
name,
|
|
13376
13379
|
stream: props.stream?.type,
|
|
13377
13380
|
deletionProtection
|
|
13378
13381
|
});
|
|
13379
13382
|
if (deletionProtection) {
|
|
13380
|
-
|
|
13383
|
+
table3.deletionPolicy = "retain";
|
|
13381
13384
|
}
|
|
13382
13385
|
if (props.stream) {
|
|
13383
13386
|
const { lambda, policy } = createLambdaFunction(group, ctx, "table", id, props.stream.consumer);
|
|
@@ -13385,7 +13388,7 @@ var tableFeature = defineFeature({
|
|
|
13385
13388
|
const onFailure = getGlobalOnFailure(ctx);
|
|
13386
13389
|
const source = new aws22.lambda.EventSourceMapping(group, id, {
|
|
13387
13390
|
functionArn: lambda.arn,
|
|
13388
|
-
sourceArn:
|
|
13391
|
+
sourceArn: table3.streamArn,
|
|
13389
13392
|
batchSize: 100,
|
|
13390
13393
|
bisectBatchOnError: true,
|
|
13391
13394
|
// retryAttempts: props.stream.consumer.retryAttempts ?? -1,
|
|
@@ -13393,7 +13396,7 @@ var tableFeature = defineFeature({
|
|
|
13393
13396
|
startingPosition: "latest",
|
|
13394
13397
|
onFailure
|
|
13395
13398
|
});
|
|
13396
|
-
policy.addStatement(
|
|
13399
|
+
policy.addStatement(table3.streamPermissions);
|
|
13397
13400
|
source.dependsOn(policy);
|
|
13398
13401
|
if (onFailure) {
|
|
13399
13402
|
policy.addStatement({
|
|
@@ -13403,7 +13406,7 @@ var tableFeature = defineFeature({
|
|
|
13403
13406
|
}
|
|
13404
13407
|
}
|
|
13405
13408
|
ctx.onStackPolicy((policy) => {
|
|
13406
|
-
policy.addStatement(...
|
|
13409
|
+
policy.addStatement(...table3.permissions);
|
|
13407
13410
|
});
|
|
13408
13411
|
}
|
|
13409
13412
|
}
|
|
@@ -13652,12 +13655,12 @@ var vpcFeature = defineFeature({
|
|
|
13652
13655
|
const zones = ["a", "b"];
|
|
13653
13656
|
const tables = [privateRouteTable, publicRouteTable];
|
|
13654
13657
|
let block = 0n;
|
|
13655
|
-
for (const
|
|
13658
|
+
for (const table3 of tables) {
|
|
13656
13659
|
for (const i in zones) {
|
|
13657
13660
|
const index = Number(i) + 1;
|
|
13658
|
-
const id = `${
|
|
13661
|
+
const id = `${table3.identifier}-${index}`;
|
|
13659
13662
|
const subnet = new aws24.ec2.Subnet(group, id, {
|
|
13660
|
-
name: `${ctx.app.name}--${
|
|
13663
|
+
name: `${ctx.app.name}--${table3.identifier}-${index}`,
|
|
13661
13664
|
vpcId: vpc.id,
|
|
13662
13665
|
cidrBlock: aws24.ec2.Peer.ipv4(`10.0.${block++}.0/24`),
|
|
13663
13666
|
// ipv6CidrBlock: aws.ec2.Peer.ipv6(`fd00:10:20:${++block}::/64`),
|
|
@@ -13666,14 +13669,14 @@ var vpcFeature = defineFeature({
|
|
|
13666
13669
|
// ipv6CidrBlock: slices.apply(list => aws.ec2.Peer.ipv6(list.get(block++).toString())),
|
|
13667
13670
|
// assignIpv6AddressOnCreation: true,
|
|
13668
13671
|
// ipv6Native: true,
|
|
13669
|
-
mapPublicIpOnLaunch:
|
|
13672
|
+
mapPublicIpOnLaunch: table3.identifier === "public",
|
|
13670
13673
|
availabilityZone: ctx.appConfig.region + zones[i]
|
|
13671
13674
|
});
|
|
13672
13675
|
new aws24.ec2.SubnetRouteTableAssociation(group, id, {
|
|
13673
|
-
routeTableId:
|
|
13676
|
+
routeTableId: table3.id,
|
|
13674
13677
|
subnetId: subnet.id
|
|
13675
13678
|
});
|
|
13676
|
-
ctx.shared.set(`vpc-${
|
|
13679
|
+
ctx.shared.set(`vpc-${table3.identifier}-subnet-id-${index}`, subnet.id);
|
|
13677
13680
|
}
|
|
13678
13681
|
}
|
|
13679
13682
|
}
|
|
@@ -14594,8 +14597,8 @@ var CustomReporter = class {
|
|
|
14594
14597
|
this.cache = cache;
|
|
14595
14598
|
}
|
|
14596
14599
|
}
|
|
14597
|
-
onUserConsoleLog(
|
|
14598
|
-
this.logs.push(
|
|
14600
|
+
onUserConsoleLog(log12) {
|
|
14601
|
+
this.logs.push(log12.content.trimEnd());
|
|
14599
14602
|
}
|
|
14600
14603
|
runningTask(tasks) {
|
|
14601
14604
|
return tasks.find((t) => t.result?.state === "run");
|
|
@@ -14675,24 +14678,24 @@ var startTest = async (props) => {
|
|
|
14675
14678
|
|
|
14676
14679
|
// src/cli/ui/complex/run-tests.ts
|
|
14677
14680
|
var formatResult = (props) => {
|
|
14678
|
-
const
|
|
14681
|
+
const line2 = [`Test ${chalk6.magenta(props.stack)}`];
|
|
14679
14682
|
if (props.cached) {
|
|
14680
|
-
|
|
14683
|
+
line2.push(color.warning(`(from cache)`));
|
|
14681
14684
|
}
|
|
14682
14685
|
if (props.event.passed > 0) {
|
|
14683
|
-
|
|
14686
|
+
line2.push(color.success(`${props.event.passed} passed`));
|
|
14684
14687
|
}
|
|
14685
14688
|
if (props.event.failed > 0) {
|
|
14686
|
-
|
|
14689
|
+
line2.push(color.error(`${props.event.failed} failed`));
|
|
14687
14690
|
}
|
|
14688
|
-
return
|
|
14691
|
+
return line2.join(` `);
|
|
14689
14692
|
};
|
|
14690
14693
|
var logTestLogs = (event) => {
|
|
14691
14694
|
if (event.logs.length > 0) {
|
|
14692
14695
|
log8.message(color.info.bold.inverse(" LOGS "), {
|
|
14693
14696
|
symbol: color.dim(icon.dot)
|
|
14694
14697
|
});
|
|
14695
|
-
log8.message(event.logs.map((
|
|
14698
|
+
log8.message(event.logs.map((log12) => wrap(log12, { hard: true })).join("\n"));
|
|
14696
14699
|
}
|
|
14697
14700
|
};
|
|
14698
14701
|
var logTestErrors = (event) => {
|
|
@@ -15095,9 +15098,10 @@ var dev = (program2) => {
|
|
|
15095
15098
|
};
|
|
15096
15099
|
|
|
15097
15100
|
// src/cli/command/resource/list.ts
|
|
15101
|
+
import { log as log11 } from "@clack/prompts";
|
|
15098
15102
|
import chalk7 from "chalk";
|
|
15099
15103
|
var list3 = (program2) => {
|
|
15100
|
-
program2.command("list").description(`List all defined resources`).action(async () => {
|
|
15104
|
+
program2.command("list").argument("[stacks...]", "Optionally filter stack resources to list").description(`List all defined resources`).action(async (filters) => {
|
|
15101
15105
|
await layout("resource list", async ({ appConfig, stackConfigs }) => {
|
|
15102
15106
|
const region = appConfig.region;
|
|
15103
15107
|
const credentials = getCredentials(appConfig.profile);
|
|
@@ -15110,21 +15114,15 @@ var list3 = (program2) => {
|
|
|
15110
15114
|
}).replaceAll(":", color.dim(":"));
|
|
15111
15115
|
};
|
|
15112
15116
|
for (const stack of app.stacks) {
|
|
15117
|
+
if (filters.length > 0 && !filters.includes(stack.name)) {
|
|
15118
|
+
continue;
|
|
15119
|
+
}
|
|
15120
|
+
log11.step(chalk7.magenta(stack.name));
|
|
15121
|
+
line("");
|
|
15113
15122
|
for (const resource2 of stack.resources) {
|
|
15114
|
-
|
|
15115
|
-
|
|
15116
|
-
|
|
15117
|
-
formatResource(stack, resource2.urn)
|
|
15118
|
-
]);
|
|
15119
|
-
}
|
|
15120
|
-
}
|
|
15121
|
-
console.log(
|
|
15122
|
-
table({
|
|
15123
|
-
// colWidths,
|
|
15124
|
-
head: ["stack", "urn"],
|
|
15125
|
-
body: resources
|
|
15126
|
-
})
|
|
15127
|
-
);
|
|
15123
|
+
line(formatResource(stack, resource2.urn));
|
|
15124
|
+
}
|
|
15125
|
+
}
|
|
15128
15126
|
});
|
|
15129
15127
|
});
|
|
15130
15128
|
};
|
package/dist/client.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ type MessageCallback = (payload: any) => void;
|
|
|
58
58
|
type ClientProps = {
|
|
59
59
|
endpoint: string;
|
|
60
60
|
authorizer: string;
|
|
61
|
-
token
|
|
61
|
+
token?: string;
|
|
62
62
|
};
|
|
63
63
|
type ClientPropsProvider = () => Promise<ClientProps> | ClientProps;
|
|
64
64
|
declare const createPubSubClient: (props: ClientProps | ClientPropsProvider) => {
|
|
Binary file
|
package/dist/server.js
CHANGED
|
@@ -316,9 +316,8 @@ var getConfigName = (name) => {
|
|
|
316
316
|
return `/.awsless/${APP}/${name}`;
|
|
317
317
|
};
|
|
318
318
|
var IS_TEST = process.env.NODE_ENV === "test";
|
|
319
|
-
var CONFIGS = process.env.CONFIG;
|
|
320
319
|
var loadConfigData = /* @__NO_SIDE_EFFECTS__ */ async () => {
|
|
321
|
-
if (!IS_TEST
|
|
320
|
+
if (!IS_TEST) {
|
|
322
321
|
const keys = [];
|
|
323
322
|
for (const key of Object.keys(process.env)) {
|
|
324
323
|
if (key.startsWith("CONFIG_")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.400",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@awsless/iot": "^0.0.2",
|
|
32
32
|
"@awsless/lambda": "^0.0.27",
|
|
33
|
-
"@awsless/open-search": "^0.0.15",
|
|
34
33
|
"@awsless/mqtt": "^0.0.2",
|
|
34
|
+
"@awsless/open-search": "^0.0.15",
|
|
35
35
|
"@awsless/redis": "^0.0.13",
|
|
36
36
|
"@awsless/s3": "^0.0.18",
|
|
37
37
|
"@awsless/sns": "^0.0.7",
|
|
38
38
|
"@awsless/validate": "^0.0.16",
|
|
39
|
-
"@awsless/ssm": "^0.0.7",
|
|
40
39
|
"@awsless/weak-cache": "^0.0.1",
|
|
41
|
-
"@awsless/sqs": "^0.0.7"
|
|
40
|
+
"@awsless/sqs": "^0.0.7",
|
|
41
|
+
"@awsless/ssm": "^0.0.7"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@arcanyx/cidr-slicer": "^0.3.0",
|
|
@@ -112,13 +112,13 @@
|
|
|
112
112
|
"zip-a-folder": "^3.1.6",
|
|
113
113
|
"zod": "^3.21.4",
|
|
114
114
|
"zod-to-json-schema": "^3.22.3",
|
|
115
|
-
"@awsless/code": "^0.0.10",
|
|
116
115
|
"@awsless/duration": "^0.0.1",
|
|
117
116
|
"@awsless/formation": "^0.0.57",
|
|
118
|
-
"@awsless/
|
|
117
|
+
"@awsless/code": "^0.0.10",
|
|
119
118
|
"@awsless/validate": "^0.0.16",
|
|
119
|
+
"@awsless/graphql": "^0.0.9",
|
|
120
120
|
"@awsless/ts-file-cache": "^0.0.10",
|
|
121
|
-
"@awsless/
|
|
121
|
+
"@awsless/size": "^0.0.1"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@node-rs/bcrypt": "^1.10.5"
|