@awsless/awsless 0.0.562 → 0.0.564
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/app.json +1 -1
- package/dist/bin.js +13 -15
- package/dist/build-json-schema.js +2 -3
- package/dist/prebuild/icon/bundle.zip +0 -0
- package/dist/prebuild/image/bundle.zip +0 -0
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/stack.json +1 -1
- package/package.json +11 -11
package/dist/bin.js
CHANGED
|
@@ -1210,7 +1210,6 @@ var HealthCheckSchema = z23.object({
|
|
|
1210
1210
|
)
|
|
1211
1211
|
}).describe("The health check command and associated configuration parameters for the container.");
|
|
1212
1212
|
var EnvironmentSchema2 = z23.record(z23.string(), z23.string()).optional().describe("Environment variable key-value pairs.");
|
|
1213
|
-
var ArchitectureSchema3 = z23.enum(["x86_64", "arm64"]).describe("The instruction set architecture that the instance supports.");
|
|
1214
1213
|
var ActionSchema2 = z23.string();
|
|
1215
1214
|
var ActionsSchema2 = z23.union([ActionSchema2.transform((v) => [v]), ActionSchema2.array()]);
|
|
1216
1215
|
var ArnSchema2 = z23.string().startsWith("arn:");
|
|
@@ -1262,7 +1261,7 @@ var ISchema = z23.object({
|
|
|
1262
1261
|
log: LogSchema2.optional(),
|
|
1263
1262
|
cpu: CpuSchema.optional(),
|
|
1264
1263
|
memorySize: MemorySizeSchema2.optional(),
|
|
1265
|
-
architecture:
|
|
1264
|
+
// architecture: ArchitectureSchema.optional(),
|
|
1266
1265
|
environment: EnvironmentSchema2.optional(),
|
|
1267
1266
|
permissions: PermissionsSchema2.optional(),
|
|
1268
1267
|
healthCheck: HealthCheckSchema.optional()
|
|
@@ -1279,7 +1278,7 @@ var InstanceDefaultSchema = z23.object({
|
|
|
1279
1278
|
image: ImageSchema.default("public.ecr.aws/aws-cli/aws-cli:amd64"),
|
|
1280
1279
|
cpu: CpuSchema.default(0.25),
|
|
1281
1280
|
memorySize: MemorySizeSchema2.default("512 MB"),
|
|
1282
|
-
architecture:
|
|
1281
|
+
// architecture: ArchitectureSchema.default('arm64'),
|
|
1283
1282
|
environment: EnvironmentSchema2.optional(),
|
|
1284
1283
|
permissions: PermissionsSchema2.optional(),
|
|
1285
1284
|
healthCheck: HealthCheckSchema.optional(),
|
|
@@ -6922,7 +6921,7 @@ import { toDays as toDays8, toSeconds as toSeconds10 } from "@awsless/duration";
|
|
|
6922
6921
|
import { $ as $25, Future as Future4, Group as Group25, resolveInputs as resolveInputs3 } from "@awsless/formation";
|
|
6923
6922
|
import { toMebibytes as toMebibytes4 } from "@awsless/size";
|
|
6924
6923
|
import { generateFileHash as generateFileHash2 } from "@awsless/ts-file-cache";
|
|
6925
|
-
import {
|
|
6924
|
+
import { pascalCase as pascalCase3 } from "change-case";
|
|
6926
6925
|
import deepmerge4 from "deepmerge";
|
|
6927
6926
|
import { join as join16 } from "path";
|
|
6928
6927
|
|
|
@@ -6931,10 +6930,9 @@ import { createHash as createHash4 } from "crypto";
|
|
|
6931
6930
|
import { readFile as readFile4 } from "fs/promises";
|
|
6932
6931
|
import { join as join15 } from "path";
|
|
6933
6932
|
import { exec as exec2 } from "promisify-child-process";
|
|
6934
|
-
var buildExecutable = async (input, outputPath
|
|
6933
|
+
var buildExecutable = async (input, outputPath) => {
|
|
6935
6934
|
const filePath = join15(outputPath, "program");
|
|
6936
|
-
const
|
|
6937
|
-
const args = ["build", input, "--compile", "--target", target, "--outfile", filePath];
|
|
6935
|
+
const args = ["build", input, "--compile", "--target", "bun-linux-x64-modern", "--outfile", filePath];
|
|
6938
6936
|
try {
|
|
6939
6937
|
await exec2(`bun ${args.join(" ")}`);
|
|
6940
6938
|
} catch (error) {
|
|
@@ -6942,7 +6940,7 @@ var buildExecutable = async (input, outputPath, architecture) => {
|
|
|
6942
6940
|
}
|
|
6943
6941
|
const file = await readFile4(filePath);
|
|
6944
6942
|
return {
|
|
6945
|
-
hash: createHash4("sha1").update(file).update(
|
|
6943
|
+
hash: createHash4("sha1").update(file).update("x86_64").digest("hex"),
|
|
6946
6944
|
file
|
|
6947
6945
|
};
|
|
6948
6946
|
};
|
|
@@ -6962,7 +6960,7 @@ var createFargateTask = (parentGroup, ctx, ns, id, local) => {
|
|
|
6962
6960
|
const fingerprint = await generateFileHash2(workspace, local.code.file);
|
|
6963
6961
|
return build3(fingerprint, async (write) => {
|
|
6964
6962
|
const temp = await createTempFolder(`instance--${name}`);
|
|
6965
|
-
const executable = await buildExecutable(local.code.file, temp.path
|
|
6963
|
+
const executable = await buildExecutable(local.code.file, temp.path);
|
|
6966
6964
|
await Promise.all([
|
|
6967
6965
|
//
|
|
6968
6966
|
write("HASH", executable.hash),
|
|
@@ -7096,7 +7094,7 @@ var createFargateTask = (parentGroup, ctx, ns, id, local) => {
|
|
|
7096
7094
|
executionRoleArn: executionRole.arn,
|
|
7097
7095
|
taskRoleArn: role.arn,
|
|
7098
7096
|
runtimePlatform: {
|
|
7099
|
-
cpuArchitecture:
|
|
7097
|
+
cpuArchitecture: "X86_64",
|
|
7100
7098
|
operatingSystemFamily: "LINUX"
|
|
7101
7099
|
},
|
|
7102
7100
|
trackLatest: true,
|
|
@@ -7332,7 +7330,7 @@ var instanceFeature = defineFeature({
|
|
|
7332
7330
|
|
|
7333
7331
|
// src/feature/metric/index.ts
|
|
7334
7332
|
import { $ as $27, Group as Group27 } from "@awsless/formation";
|
|
7335
|
-
import { kebabCase as kebabCase8, constantCase as
|
|
7333
|
+
import { kebabCase as kebabCase8, constantCase as constantCase14 } from "change-case";
|
|
7336
7334
|
import { toSeconds as toSeconds11 } from "@awsless/duration";
|
|
7337
7335
|
var typeGenCode9 = `
|
|
7338
7336
|
import { type PutDataProps, putData, batchPutData } from '@awsless/cloudwatch'
|
|
@@ -7400,7 +7398,7 @@ var metricFeature = defineFeature({
|
|
|
7400
7398
|
});
|
|
7401
7399
|
for (const [id, props] of Object.entries(ctx.stackConfig.metrics ?? {})) {
|
|
7402
7400
|
const group = new Group27(ctx.stack, "metric", id);
|
|
7403
|
-
ctx.addEnv(`METRIC_${
|
|
7401
|
+
ctx.addEnv(`METRIC_${constantCase14(id)}`, props.type);
|
|
7404
7402
|
for (const alarmId in props.alarms ?? []) {
|
|
7405
7403
|
const alarmGroup = new Group27(group, "alarm", alarmId);
|
|
7406
7404
|
const alarmName = kebabCase8(`${id}-${alarmId}`);
|
|
@@ -8917,7 +8915,7 @@ var auth = (program2) => {
|
|
|
8917
8915
|
|
|
8918
8916
|
// src/cli/command/bind.ts
|
|
8919
8917
|
import { log as log18 } from "@awsless/clui";
|
|
8920
|
-
import { constantCase as
|
|
8918
|
+
import { constantCase as constantCase15 } from "change-case";
|
|
8921
8919
|
import { spawn } from "child_process";
|
|
8922
8920
|
var bind = (program2) => {
|
|
8923
8921
|
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 (commands9 = [], opts) => {
|
|
@@ -8946,10 +8944,10 @@ var bind = (program2) => {
|
|
|
8946
8944
|
const configList = opts.config ?? [];
|
|
8947
8945
|
const configs = {};
|
|
8948
8946
|
for (const name of configList) {
|
|
8949
|
-
configs[`CONFIG_${
|
|
8947
|
+
configs[`CONFIG_${constantCase15(name)}`] = name;
|
|
8950
8948
|
}
|
|
8951
8949
|
if (configList.length ?? 0 > 0) {
|
|
8952
|
-
log18.note("Bind Config", configList.map((v) => color.label(
|
|
8950
|
+
log18.note("Bind Config", configList.map((v) => color.label(constantCase15(v))).join("\n"));
|
|
8953
8951
|
}
|
|
8954
8952
|
if (commands9.length === 0) {
|
|
8955
8953
|
return "No command to execute.";
|
|
@@ -602,7 +602,6 @@ var HealthCheckSchema = z20.object({
|
|
|
602
602
|
)
|
|
603
603
|
}).describe("The health check command and associated configuration parameters for the container.");
|
|
604
604
|
var EnvironmentSchema2 = z20.record(z20.string(), z20.string()).optional().describe("Environment variable key-value pairs.");
|
|
605
|
-
var ArchitectureSchema3 = z20.enum(["x86_64", "arm64"]).describe("The instruction set architecture that the instance supports.");
|
|
606
605
|
var ActionSchema2 = z20.string();
|
|
607
606
|
var ActionsSchema2 = z20.union([ActionSchema2.transform((v) => [v]), ActionSchema2.array()]);
|
|
608
607
|
var ArnSchema2 = z20.string().startsWith("arn:");
|
|
@@ -654,7 +653,7 @@ var ISchema = z20.object({
|
|
|
654
653
|
log: LogSchema2.optional(),
|
|
655
654
|
cpu: CpuSchema.optional(),
|
|
656
655
|
memorySize: MemorySizeSchema2.optional(),
|
|
657
|
-
architecture:
|
|
656
|
+
// architecture: ArchitectureSchema.optional(),
|
|
658
657
|
environment: EnvironmentSchema2.optional(),
|
|
659
658
|
permissions: PermissionsSchema2.optional(),
|
|
660
659
|
healthCheck: HealthCheckSchema.optional()
|
|
@@ -671,7 +670,7 @@ var InstanceDefaultSchema = z20.object({
|
|
|
671
670
|
image: ImageSchema.default("public.ecr.aws/aws-cli/aws-cli:amd64"),
|
|
672
671
|
cpu: CpuSchema.default(0.25),
|
|
673
672
|
memorySize: MemorySizeSchema2.default("512 MB"),
|
|
674
|
-
architecture:
|
|
673
|
+
// architecture: ArchitectureSchema.default('arm64'),
|
|
675
674
|
environment: EnvironmentSchema2.optional(),
|
|
676
675
|
permissions: PermissionsSchema2.optional(),
|
|
677
676
|
healthCheck: HealthCheckSchema.optional(),
|
|
Binary file
|
|
Binary file
|
|
Binary file
|