@awsless/awsless 0.0.642 → 0.0.644
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 +121 -45
- package/dist/prebuild/icon/bundle.zip +0 -0
- package/dist/prebuild/image/bundle.zip +0 -0
- package/dist/prebuild/rpc/HASH +1 -1
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/package.json +18 -18
package/dist/bin.js
CHANGED
|
@@ -1258,11 +1258,11 @@ var FunctionDefaultSchema = z15.object({
|
|
|
1258
1258
|
// container
|
|
1259
1259
|
warm: WarmSchema.default(0),
|
|
1260
1260
|
vpc: VPCSchema.default(false),
|
|
1261
|
-
log: LogSchema.default(true).transform((
|
|
1262
|
-
retention:
|
|
1263
|
-
level: "level" in
|
|
1264
|
-
system: "system" in
|
|
1265
|
-
format: "format" in
|
|
1261
|
+
log: LogSchema.default(true).transform((log35) => ({
|
|
1262
|
+
retention: log35.retention ?? days(7),
|
|
1263
|
+
level: "level" in log35 ? log35.level : "error",
|
|
1264
|
+
system: "system" in log35 ? log35.system : "warn",
|
|
1265
|
+
format: "format" in log35 ? log35.format : "json"
|
|
1266
1266
|
})),
|
|
1267
1267
|
timeout: TimeoutSchema.default("10 seconds"),
|
|
1268
1268
|
memorySize: MemorySizeSchema.default("128 MB"),
|
|
@@ -1810,8 +1810,8 @@ var InstanceDefaultSchema = z25.object({
|
|
|
1810
1810
|
permissions: PermissionsSchema2.optional(),
|
|
1811
1811
|
healthCheck: HealthCheckSchema.optional(),
|
|
1812
1812
|
// restartPolicy: RestartPolicySchema.default({ enabled: true }),
|
|
1813
|
-
log: LogSchema2.default(true).transform((
|
|
1814
|
-
retention:
|
|
1813
|
+
log: LogSchema2.default(true).transform((log35) => ({
|
|
1814
|
+
retention: log35.retention ?? days4(7)
|
|
1815
1815
|
}))
|
|
1816
1816
|
}).default({});
|
|
1817
1817
|
|
|
@@ -4093,7 +4093,7 @@ var cronFeature = defineFeature({
|
|
|
4093
4093
|
target: {
|
|
4094
4094
|
arn: lambda.arn,
|
|
4095
4095
|
roleArn: scheduleRole.arn,
|
|
4096
|
-
input: JSON.stringify(props.payload)
|
|
4096
|
+
input: JSON.stringify(props.payload) ?? "{}"
|
|
4097
4097
|
}
|
|
4098
4098
|
});
|
|
4099
4099
|
}
|
|
@@ -6873,7 +6873,7 @@ var buildExecutable = async (input, outputPath, architecture) => {
|
|
|
6873
6873
|
}
|
|
6874
6874
|
if (!result.success) {
|
|
6875
6875
|
throw new ExpectedError(`Executable build failed:
|
|
6876
|
-
${result.logs?.map((
|
|
6876
|
+
${result.logs?.map((log35) => log35.message).join("\n")}`);
|
|
6877
6877
|
}
|
|
6878
6878
|
const file = await readFile4(filePath);
|
|
6879
6879
|
return {
|
|
@@ -7387,7 +7387,7 @@ var getViewerRequestFunctionCode = (props) => {
|
|
|
7387
7387
|
]);
|
|
7388
7388
|
};
|
|
7389
7389
|
var BLOCK_DIRECT_ACCESS_TO_CLOUDFRONT = `
|
|
7390
|
-
if (headers.host.value.includes('cloudfront.net')) {
|
|
7390
|
+
if (headers.host && headers.host.value.includes('cloudfront.net')) {
|
|
7391
7391
|
return {
|
|
7392
7392
|
statusCode: 403,
|
|
7393
7393
|
statusDescription: 'Forbidden'
|
|
@@ -9183,10 +9183,10 @@ var startTest = async (props) => {
|
|
|
9183
9183
|
tests.push(entry);
|
|
9184
9184
|
if ("task" in test2) {
|
|
9185
9185
|
const task2 = test2.task;
|
|
9186
|
-
for (const
|
|
9186
|
+
for (const log35 of task2.logs ?? []) {
|
|
9187
9187
|
entry.logs.push({
|
|
9188
|
-
time:
|
|
9189
|
-
text:
|
|
9188
|
+
time: log35.time,
|
|
9189
|
+
text: log35.content
|
|
9190
9190
|
});
|
|
9191
9191
|
}
|
|
9192
9192
|
}
|
|
@@ -9254,7 +9254,7 @@ var logTestLogs = (event) => {
|
|
|
9254
9254
|
].join(" "),
|
|
9255
9255
|
color.line(icon.dot)
|
|
9256
9256
|
);
|
|
9257
|
-
log18.message(test2.logs.map((
|
|
9257
|
+
log18.message(test2.logs.map((log35) => log35.text).join("\n"));
|
|
9258
9258
|
}
|
|
9259
9259
|
}
|
|
9260
9260
|
};
|
|
@@ -10234,8 +10234,84 @@ var unlock = (program2) => {
|
|
|
10234
10234
|
});
|
|
10235
10235
|
};
|
|
10236
10236
|
|
|
10237
|
+
// src/cli/command/state/refresh.ts
|
|
10238
|
+
import { log as log27, prompt as prompt15 } from "@awsless/clui";
|
|
10239
|
+
import { diff } from "@vitest/utils/diff";
|
|
10240
|
+
import { capitalCase as capitalCase4 } from "change-case";
|
|
10241
|
+
import wildstring6 from "wildstring";
|
|
10242
|
+
var refresh = (program2) => {
|
|
10243
|
+
program2.command("refresh").argument("[stacks...]", "Optionally filter stacks to refresh").description(
|
|
10244
|
+
"Compares & syncs the current resource state with the state known to exist in the actual cloud provider."
|
|
10245
|
+
).action(async (filters) => {
|
|
10246
|
+
await layout("state refresh", async ({ appConfig, stackConfigs }) => {
|
|
10247
|
+
const region = appConfig.region;
|
|
10248
|
+
const profile = appConfig.profile;
|
|
10249
|
+
const credentials = await getCredentials(profile);
|
|
10250
|
+
const accountId = await getAccountId(credentials, region);
|
|
10251
|
+
const { app } = createApp({ appConfig, stackConfigs, accountId });
|
|
10252
|
+
const { workspace } = await createWorkSpace({ credentials, region, accountId });
|
|
10253
|
+
const stackNames = app.stacks.filter((stack) => {
|
|
10254
|
+
return !!filters.find((f) => wildstring6.match(f, stack.name));
|
|
10255
|
+
}).map((s) => s.name);
|
|
10256
|
+
const formattedFilter = stackNames.map((i) => color.info(i)).join(color.dim(", "));
|
|
10257
|
+
if (filters.length > 0 && stackNames.length === 0) {
|
|
10258
|
+
throw new ExpectedError(`The stack filters provided didn't match.`);
|
|
10259
|
+
}
|
|
10260
|
+
if (!process.env.SKIP_PROMPT) {
|
|
10261
|
+
const refreshAll = filters.length === 0;
|
|
10262
|
+
const refreshSingle = filters.length === 1;
|
|
10263
|
+
const ok = await prompt15.confirm({
|
|
10264
|
+
message: refreshAll ? `Are you sure you want to refresh ${color.warning("all")} stacks?` : refreshSingle ? `Are you sure you want to refresh the ${formattedFilter} stack?` : `Are you sure you want to refresh the [ ${formattedFilter} ] stacks?`
|
|
10265
|
+
});
|
|
10266
|
+
if (!ok) {
|
|
10267
|
+
throw new Cancelled();
|
|
10268
|
+
}
|
|
10269
|
+
}
|
|
10270
|
+
const result = await log27.task({
|
|
10271
|
+
initialMessage: "Retrieving the latest state from AWS...",
|
|
10272
|
+
successMessage: "Done retrieving latest state from AWS.",
|
|
10273
|
+
errorMessage: "Failed retrieving latest state from AWS.",
|
|
10274
|
+
task() {
|
|
10275
|
+
return workspace.refresh(app, {
|
|
10276
|
+
filters: stackNames
|
|
10277
|
+
});
|
|
10278
|
+
}
|
|
10279
|
+
});
|
|
10280
|
+
if (!result) {
|
|
10281
|
+
return "Your state is up to date.";
|
|
10282
|
+
}
|
|
10283
|
+
for (const entry of result.operations) {
|
|
10284
|
+
log27.warning([color.warning.bold.inverse(` ${capitalCase4(entry.operation)} `), entry.urn].join("\n"));
|
|
10285
|
+
if (entry.operation === "update") {
|
|
10286
|
+
const diffResult = diff(entry.before, entry.after);
|
|
10287
|
+
if (diffResult) {
|
|
10288
|
+
log27.message(diffResult);
|
|
10289
|
+
}
|
|
10290
|
+
}
|
|
10291
|
+
const message = entry.operation === "update" ? `Are you sure you want to mark this resource as drifted inside your state file?` : `Are you sure you want to delete this resource from your state file?`;
|
|
10292
|
+
const ok = await prompt15.confirm({
|
|
10293
|
+
message,
|
|
10294
|
+
initialValue: false
|
|
10295
|
+
});
|
|
10296
|
+
if (ok) {
|
|
10297
|
+
entry.commit();
|
|
10298
|
+
}
|
|
10299
|
+
}
|
|
10300
|
+
await log27.task({
|
|
10301
|
+
initialMessage: "Saving state changes...",
|
|
10302
|
+
successMessage: "Done storing state changes.",
|
|
10303
|
+
errorMessage: "Failed storing state changes.",
|
|
10304
|
+
task() {
|
|
10305
|
+
return result.commit();
|
|
10306
|
+
}
|
|
10307
|
+
});
|
|
10308
|
+
return;
|
|
10309
|
+
});
|
|
10310
|
+
});
|
|
10311
|
+
};
|
|
10312
|
+
|
|
10237
10313
|
// src/cli/command/state/index.ts
|
|
10238
|
-
var commands4 = [pull, push, unlock];
|
|
10314
|
+
var commands4 = [pull, push, unlock, refresh];
|
|
10239
10315
|
var state = (program2) => {
|
|
10240
10316
|
const command = program2.command("state").description(`Manage app state`);
|
|
10241
10317
|
commands4.forEach((cb) => cb(command));
|
|
@@ -10271,7 +10347,7 @@ var types = (program2) => {
|
|
|
10271
10347
|
};
|
|
10272
10348
|
|
|
10273
10349
|
// src/cli/command/domain/list.ts
|
|
10274
|
-
import { log as
|
|
10350
|
+
import { log as log28 } from "@awsless/clui";
|
|
10275
10351
|
var list2 = (program2) => {
|
|
10276
10352
|
program2.command("list").description("List all domains").action(async () => {
|
|
10277
10353
|
await layout("domain list", async ({ appConfig, stackConfigs }) => {
|
|
@@ -10292,7 +10368,7 @@ var list2 = (program2) => {
|
|
|
10292
10368
|
});
|
|
10293
10369
|
await workspace.hydrate(app);
|
|
10294
10370
|
for (const zone of domainZones) {
|
|
10295
|
-
|
|
10371
|
+
log28.step(
|
|
10296
10372
|
[
|
|
10297
10373
|
//
|
|
10298
10374
|
color.label.green(await zone.name),
|
|
@@ -10300,14 +10376,14 @@ var list2 = (program2) => {
|
|
|
10300
10376
|
color.dim(await zone.id)
|
|
10301
10377
|
].join(" ")
|
|
10302
10378
|
);
|
|
10303
|
-
|
|
10379
|
+
log28.message((await zone.nameServers).join("\n"));
|
|
10304
10380
|
}
|
|
10305
10381
|
});
|
|
10306
10382
|
});
|
|
10307
10383
|
};
|
|
10308
10384
|
|
|
10309
10385
|
// src/cli/command/domain/deploy.ts
|
|
10310
|
-
import { log as
|
|
10386
|
+
import { log as log29 } from "@awsless/clui";
|
|
10311
10387
|
var deploy2 = (program2) => {
|
|
10312
10388
|
program2.command("deploy").description("Deploy the domain zones to AWS").action(async () => {
|
|
10313
10389
|
await layout("domain deploy", async ({ appConfig, stackConfigs }) => {
|
|
@@ -10326,7 +10402,7 @@ var deploy2 = (program2) => {
|
|
|
10326
10402
|
accountId,
|
|
10327
10403
|
region
|
|
10328
10404
|
});
|
|
10329
|
-
await
|
|
10405
|
+
await log29.task({
|
|
10330
10406
|
initialMessage: "Deploying the domain zones to AWS...",
|
|
10331
10407
|
successMessage: "Done deploying the domain zones to AWS.",
|
|
10332
10408
|
errorMessage: "Failed deploying the domain zones to AWS.",
|
|
@@ -10335,7 +10411,7 @@ var deploy2 = (program2) => {
|
|
|
10335
10411
|
}
|
|
10336
10412
|
});
|
|
10337
10413
|
for (const zone of domainZones) {
|
|
10338
|
-
|
|
10414
|
+
log29.step(
|
|
10339
10415
|
[
|
|
10340
10416
|
//
|
|
10341
10417
|
color.label.green(await zone.name),
|
|
@@ -10343,7 +10419,7 @@ var deploy2 = (program2) => {
|
|
|
10343
10419
|
color.dim(await zone.id)
|
|
10344
10420
|
].join(" ")
|
|
10345
10421
|
);
|
|
10346
|
-
|
|
10422
|
+
log29.message((await zone.nameServers).join("\n"));
|
|
10347
10423
|
}
|
|
10348
10424
|
});
|
|
10349
10425
|
});
|
|
@@ -10362,12 +10438,12 @@ var domain = (program2) => {
|
|
|
10362
10438
|
|
|
10363
10439
|
// src/cli/command/logs.ts
|
|
10364
10440
|
import { CloudWatchLogsClient, StartLiveTailCommand } from "@aws-sdk/client-cloudwatch-logs";
|
|
10365
|
-
import { log as
|
|
10441
|
+
import { log as log30 } from "@awsless/clui";
|
|
10366
10442
|
import { aws as aws30 } from "@terraforge/aws";
|
|
10367
10443
|
import chalk6 from "chalk";
|
|
10368
10444
|
import chunk2 from "chunk";
|
|
10369
10445
|
import { formatDate } from "date-fns";
|
|
10370
|
-
import
|
|
10446
|
+
import wildstring7 from "wildstring";
|
|
10371
10447
|
var logs = (program2) => {
|
|
10372
10448
|
program2.command("logs").argument(`<stacks...>`, "Provide a list of stacks to stream logs from.").description("Stream the latest logs from you app.").action(async (filters) => {
|
|
10373
10449
|
await layout(`logs`, async ({ appConfig, stackConfigs }) => {
|
|
@@ -10384,7 +10460,7 @@ var logs = (program2) => {
|
|
|
10384
10460
|
await workspace.hydrate(app);
|
|
10385
10461
|
const logGroupArns = [];
|
|
10386
10462
|
for (const stack of app.stacks) {
|
|
10387
|
-
if (filters.find((f) =>
|
|
10463
|
+
if (filters.find((f) => wildstring7.match(f, stack.name))) {
|
|
10388
10464
|
for (const resource of stack.resources) {
|
|
10389
10465
|
if (resource instanceof aws30.cloudwatch.LogGroup) {
|
|
10390
10466
|
logGroupArns.push(await resource.arn);
|
|
@@ -10403,7 +10479,7 @@ var logs = (program2) => {
|
|
|
10403
10479
|
process.once("SIGINT", () => {
|
|
10404
10480
|
controller.abort();
|
|
10405
10481
|
});
|
|
10406
|
-
const streams = await
|
|
10482
|
+
const streams = await log30.task({
|
|
10407
10483
|
initialMessage: "Connecting to the log stream...",
|
|
10408
10484
|
errorMessage: "Failed to connect to the log stream.",
|
|
10409
10485
|
async task(ctx) {
|
|
@@ -10460,7 +10536,7 @@ var formatLog = (level, date, group, message) => {
|
|
|
10460
10536
|
SYSTEM: chalk6.blue
|
|
10461
10537
|
};
|
|
10462
10538
|
const levelColor = levels[level] ?? chalk6.cyan;
|
|
10463
|
-
|
|
10539
|
+
log30.message(
|
|
10464
10540
|
[
|
|
10465
10541
|
[
|
|
10466
10542
|
//
|
|
@@ -10501,7 +10577,7 @@ var parseJsonLog = (message) => {
|
|
|
10501
10577
|
|
|
10502
10578
|
// src/cli/command/image/clear-cache.ts
|
|
10503
10579
|
import { DeleteObjectsCommand, ListObjectsV2Command, S3Client as S3Client3 } from "@aws-sdk/client-s3";
|
|
10504
|
-
import { Cancelled as Cancelled4, log as
|
|
10580
|
+
import { Cancelled as Cancelled4, log as log31, prompt as prompt16 } from "@awsless/clui";
|
|
10505
10581
|
import { CloudFrontClient as CloudFrontClient2 } from "@aws-sdk/client-cloudfront";
|
|
10506
10582
|
var clearCache = (program2) => {
|
|
10507
10583
|
program2.command("clear-cache").argument("[stack]", "The stack name of the image proxy").argument("[name]", "The name of the image proxy").description("Clears the cache of the image proxy").action(async (stack, name) => {
|
|
@@ -10517,7 +10593,7 @@ var clearCache = (program2) => {
|
|
|
10517
10593
|
}
|
|
10518
10594
|
return;
|
|
10519
10595
|
});
|
|
10520
|
-
stack = await
|
|
10596
|
+
stack = await prompt16.select({
|
|
10521
10597
|
message: "Select the stack:",
|
|
10522
10598
|
options: imageStacks.map((stack2) => ({
|
|
10523
10599
|
label: stack2.name,
|
|
@@ -10534,7 +10610,7 @@ var clearCache = (program2) => {
|
|
|
10534
10610
|
if (!names) {
|
|
10535
10611
|
throw new ExpectedError(`No image resources are defined in stack "${stack}".`);
|
|
10536
10612
|
}
|
|
10537
|
-
name = await
|
|
10613
|
+
name = await prompt16.select({
|
|
10538
10614
|
message: "Select the image resource:",
|
|
10539
10615
|
options: names.map((name2) => ({
|
|
10540
10616
|
label: name2,
|
|
@@ -10542,7 +10618,7 @@ var clearCache = (program2) => {
|
|
|
10542
10618
|
}))
|
|
10543
10619
|
});
|
|
10544
10620
|
}
|
|
10545
|
-
const ok = await
|
|
10621
|
+
const ok = await prompt16.confirm({
|
|
10546
10622
|
message: `Are you sure you want to clear the cache`
|
|
10547
10623
|
});
|
|
10548
10624
|
if (!ok) {
|
|
@@ -10572,7 +10648,7 @@ var clearCache = (program2) => {
|
|
|
10572
10648
|
region
|
|
10573
10649
|
});
|
|
10574
10650
|
let totalDeleted = 0;
|
|
10575
|
-
await
|
|
10651
|
+
await log31.task({
|
|
10576
10652
|
initialMessage: "Clearing cache...",
|
|
10577
10653
|
successMessage: "Cache successfully cleared.",
|
|
10578
10654
|
task: async () => {
|
|
@@ -10625,7 +10701,7 @@ var image = (program2) => {
|
|
|
10625
10701
|
|
|
10626
10702
|
// src/cli/command/icon/clear-cache.ts
|
|
10627
10703
|
import { DeleteObjectsCommand as DeleteObjectsCommand2, ListObjectsV2Command as ListObjectsV2Command2, S3Client as S3Client4 } from "@aws-sdk/client-s3";
|
|
10628
|
-
import { Cancelled as Cancelled5, log as
|
|
10704
|
+
import { Cancelled as Cancelled5, log as log32, prompt as prompt17 } from "@awsless/clui";
|
|
10629
10705
|
import { CloudFrontClient as CloudFrontClient3 } from "@aws-sdk/client-cloudfront";
|
|
10630
10706
|
var clearCache2 = (program2) => {
|
|
10631
10707
|
program2.command("clear-cache").argument("[stack]", "The stack name of the icon proxy").argument("[name]", "The name of the icon proxy").description("Clears the cache of the icon proxy").action(async (stack, name) => {
|
|
@@ -10641,7 +10717,7 @@ var clearCache2 = (program2) => {
|
|
|
10641
10717
|
}
|
|
10642
10718
|
return;
|
|
10643
10719
|
});
|
|
10644
|
-
stack = await
|
|
10720
|
+
stack = await prompt17.select({
|
|
10645
10721
|
message: "Select the stack:",
|
|
10646
10722
|
options: iconStacks.map((stack2) => ({
|
|
10647
10723
|
label: stack2.name,
|
|
@@ -10658,7 +10734,7 @@ var clearCache2 = (program2) => {
|
|
|
10658
10734
|
if (!names) {
|
|
10659
10735
|
throw new ExpectedError(`No icon resources are defined in stack "${stack}".`);
|
|
10660
10736
|
}
|
|
10661
|
-
name = await
|
|
10737
|
+
name = await prompt17.select({
|
|
10662
10738
|
message: "Select the icon resource:",
|
|
10663
10739
|
options: names.map((name2) => ({
|
|
10664
10740
|
label: name2,
|
|
@@ -10666,7 +10742,7 @@ var clearCache2 = (program2) => {
|
|
|
10666
10742
|
}))
|
|
10667
10743
|
});
|
|
10668
10744
|
}
|
|
10669
|
-
const ok = await
|
|
10745
|
+
const ok = await prompt17.confirm({
|
|
10670
10746
|
message: `Are you sure you want to clear the cache`
|
|
10671
10747
|
});
|
|
10672
10748
|
if (!ok) {
|
|
@@ -10696,7 +10772,7 @@ var clearCache2 = (program2) => {
|
|
|
10696
10772
|
region
|
|
10697
10773
|
});
|
|
10698
10774
|
let totalDeleted = 0;
|
|
10699
|
-
await
|
|
10775
|
+
await log32.task({
|
|
10700
10776
|
initialMessage: "Clearing cache...",
|
|
10701
10777
|
successMessage: "Cache successfully cleared.",
|
|
10702
10778
|
task: async () => {
|
|
@@ -10748,7 +10824,7 @@ var icon2 = (program2) => {
|
|
|
10748
10824
|
};
|
|
10749
10825
|
|
|
10750
10826
|
// src/cli/command/cron/invoke.ts
|
|
10751
|
-
import { log as
|
|
10827
|
+
import { log as log33, prompt as prompt18 } from "@awsless/clui";
|
|
10752
10828
|
import { invoke as invokeLambda, LambdaClient as LambdaClient4 } from "@awsless/lambda";
|
|
10753
10829
|
var invoke = (program2) => {
|
|
10754
10830
|
program2.command("invoke").description("Invoke a cronjob").argument("[stack]", "The stack name of the cronjob").argument("[name]", "The name of the cronjob").action(async (stack, name) => {
|
|
@@ -10766,7 +10842,7 @@ var invoke = (program2) => {
|
|
|
10766
10842
|
if (cronStacks.length === 0) {
|
|
10767
10843
|
throw new ExpectedError("There are no crons defined inside your app.");
|
|
10768
10844
|
}
|
|
10769
|
-
stack = await
|
|
10845
|
+
stack = await prompt18.select({
|
|
10770
10846
|
message: "Select the stack:",
|
|
10771
10847
|
options: cronStacks.map((stack2) => ({
|
|
10772
10848
|
label: stack2.name,
|
|
@@ -10780,7 +10856,7 @@ var invoke = (program2) => {
|
|
|
10780
10856
|
}
|
|
10781
10857
|
const names = Object.keys(stackConfig.crons ?? {});
|
|
10782
10858
|
if (!name) {
|
|
10783
|
-
name = await
|
|
10859
|
+
name = await prompt18.select({
|
|
10784
10860
|
message: "Select the cron:",
|
|
10785
10861
|
options: names.map((name2) => ({
|
|
10786
10862
|
label: name2,
|
|
@@ -10798,7 +10874,7 @@ var invoke = (program2) => {
|
|
|
10798
10874
|
resourceName: name
|
|
10799
10875
|
});
|
|
10800
10876
|
const payload = stackConfig.crons?.[name]?.payload ?? {};
|
|
10801
|
-
const response = await
|
|
10877
|
+
const response = await log33.task({
|
|
10802
10878
|
initialMessage: "Invoking cron...",
|
|
10803
10879
|
successMessage: "Done invoking cron.",
|
|
10804
10880
|
errorMessage: "Failed invoking cron.",
|
|
@@ -10813,7 +10889,7 @@ var invoke = (program2) => {
|
|
|
10813
10889
|
});
|
|
10814
10890
|
}
|
|
10815
10891
|
});
|
|
10816
|
-
|
|
10892
|
+
log33.note("Response", JSON.stringify(response, void 0, 4));
|
|
10817
10893
|
});
|
|
10818
10894
|
});
|
|
10819
10895
|
};
|
|
@@ -10829,7 +10905,7 @@ var cron = (program2) => {
|
|
|
10829
10905
|
};
|
|
10830
10906
|
|
|
10831
10907
|
// src/cli/command/activity/logs.ts
|
|
10832
|
-
import { log as
|
|
10908
|
+
import { log as log34 } from "@awsless/clui";
|
|
10833
10909
|
import { format as format2 } from "date-fns";
|
|
10834
10910
|
var logs2 = (program2) => {
|
|
10835
10911
|
program2.command("logs").option("--limit <number>", "The size limit of logs to tail", "10").description("Tail the activity logs").action(async (options) => {
|
|
@@ -10839,7 +10915,7 @@ var logs2 = (program2) => {
|
|
|
10839
10915
|
const credentials = await getCredentials(profile);
|
|
10840
10916
|
const accountId = await getAccountId(credentials, region);
|
|
10841
10917
|
await bootstrapAwsless({ credentials, region, accountId });
|
|
10842
|
-
const logs3 = await
|
|
10918
|
+
const logs3 = await log34.task({
|
|
10843
10919
|
initialMessage: "Loading activity logs",
|
|
10844
10920
|
successMessage: "Done loading activity logs.",
|
|
10845
10921
|
errorMessage: "Failed loading activity logs.",
|
|
@@ -10860,7 +10936,7 @@ var logs2 = (program2) => {
|
|
|
10860
10936
|
};
|
|
10861
10937
|
for (const item of logs3) {
|
|
10862
10938
|
const date = new Date(item.date);
|
|
10863
|
-
|
|
10939
|
+
log34.info(
|
|
10864
10940
|
[
|
|
10865
10941
|
[
|
|
10866
10942
|
color.line.dim(format2(date, "yyyy-MM-dd")),
|
|
Binary file
|
|
Binary file
|
package/dist/prebuild/rpc/HASH
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
59f2563b81c3c6d1b94cd5d4313598a21b89b366
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.644",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@awsless/big-float": "^0.1.5",
|
|
37
37
|
"@awsless/cloudwatch": "^0.0.1",
|
|
38
|
+
"@awsless/duration": "^0.0.4",
|
|
38
39
|
"@awsless/clui": "^0.0.8",
|
|
39
|
-
"@awsless/dynamodb": "^0.3.14",
|
|
40
|
-
"@awsless/iot": "^0.0.3",
|
|
41
40
|
"@awsless/json": "^0.0.11",
|
|
42
|
-
"@awsless/
|
|
43
|
-
"@awsless/
|
|
44
|
-
"@awsless/redis": "^0.0.14",
|
|
41
|
+
"@awsless/iot": "^0.0.3",
|
|
42
|
+
"@awsless/dynamodb": "^0.3.18",
|
|
45
43
|
"@awsless/lambda": "^0.0.37",
|
|
44
|
+
"@awsless/redis": "^0.0.14",
|
|
45
|
+
"@awsless/s3": "^0.0.21",
|
|
46
46
|
"@awsless/mqtt": "^0.0.2",
|
|
47
|
+
"@awsless/open-search": "^0.0.21",
|
|
47
48
|
"@awsless/sns": "^0.0.10",
|
|
48
|
-
"@awsless/sqs": "^0.0.16",
|
|
49
|
-
"@awsless/s3": "^0.0.21",
|
|
50
49
|
"@awsless/validate": "^0.1.5",
|
|
51
|
-
"@awsless/
|
|
52
|
-
"@awsless/weak-cache": "^0.0.1"
|
|
50
|
+
"@awsless/sqs": "^0.0.16",
|
|
51
|
+
"@awsless/weak-cache": "^0.0.1",
|
|
52
|
+
"@awsless/ssm": "^0.0.7"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@aws-sdk/client-cloudformation": "^3.369.0",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"@aws-sdk/signature-v4-crt": "^3.816.0",
|
|
69
69
|
"@clack/prompts": "^0.7.0",
|
|
70
70
|
"@terraforge/aws": "^6.35.1",
|
|
71
|
-
"@terraforge/core": "^0.0.
|
|
72
|
-
"@terraforge/terraform": "^0.0.
|
|
71
|
+
"@terraforge/core": "^0.0.37",
|
|
72
|
+
"@terraforge/terraform": "^0.0.30",
|
|
73
73
|
"@types/aws-lambda": "^8.10.110",
|
|
74
74
|
"@types/bun": "1.3.10",
|
|
75
75
|
"@types/chunk": "^0.0.0",
|
|
@@ -118,10 +118,10 @@
|
|
|
118
118
|
"@awsless/clui": "^0.0.8",
|
|
119
119
|
"@awsless/json": "^0.0.11",
|
|
120
120
|
"@awsless/duration": "^0.0.4",
|
|
121
|
-
"@awsless/
|
|
121
|
+
"@awsless/size": "^0.0.2",
|
|
122
122
|
"@awsless/ts-file-cache": "^0.0.12",
|
|
123
|
-
"@awsless/
|
|
124
|
-
"@awsless/
|
|
123
|
+
"@awsless/scheduler": "^0.0.4",
|
|
124
|
+
"@awsless/validate": "^0.1.5"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
127
|
"@hono/node-server": "1.19.9",
|
|
@@ -139,9 +139,9 @@
|
|
|
139
139
|
"build-test-setup": "pnpm tsup src/test/test-global-setup.ts --format esm",
|
|
140
140
|
"build-prebuild": "pnpm tsup src/prebuild.ts --format esm; bun ./dist/prebuild.js",
|
|
141
141
|
"build-layers": "mkdir -p dist/layers && cp -r layers/* dist/layers",
|
|
142
|
-
"jack": "pnpm tsup ./example/jack/jack.ts --format esm; bun ./dist/jack.js",
|
|
143
|
-
"kennedy": "pnpm tsup ./example/kennedy/kennedy.ts --format esm; bun ./dist/kennedy.js",
|
|
144
|
-
"tanmay": "pnpm tsup ./example/tanmay/tanmay.ts --format esm; bun ./dist/tanmay.js",
|
|
142
|
+
"jack": "pnpm tsup ./example/jack/jack.ts --format esm --external bun; bun ./dist/jack.js",
|
|
143
|
+
"kennedy": "pnpm tsup ./example/kennedy/kennedy.ts --format esm --external bun; bun ./dist/kennedy.js",
|
|
144
|
+
"tanmay": "pnpm tsup ./example/tanmay/tanmay.ts --format esm --external bun; bun ./dist/tanmay.js",
|
|
145
145
|
"prepublish": "if pnpm test; then pnpm build; pnpm build-json-schema; pnpm build-test-setup; pnpm build-prebuild; pnpm build-layers; else exit; fi"
|
|
146
146
|
}
|
|
147
147
|
}
|