@korajs/cli 0.3.2 → 0.4.0

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 (50) hide show
  1. package/dist/bin.cjs +385 -288
  2. package/dist/bin.cjs.map +1 -1
  3. package/dist/bin.js +25 -11
  4. package/dist/bin.js.map +1 -1
  5. package/dist/{chunk-KTSRAPSE.js → chunk-CMSX76KM.js} +108 -65
  6. package/dist/chunk-CMSX76KM.js.map +1 -0
  7. package/dist/{chunk-ZGYRDYXS.js → chunk-MVP5PDT4.js} +22 -4
  8. package/dist/chunk-MVP5PDT4.js.map +1 -0
  9. package/dist/{chunk-E7OCVRYL.js → chunk-YGVO4POI.js} +242 -215
  10. package/dist/chunk-YGVO4POI.js.map +1 -0
  11. package/dist/create.cjs +122 -66
  12. package/dist/create.cjs.map +1 -1
  13. package/dist/create.js +2 -2
  14. package/dist/index.cjs +348 -278
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +31 -26
  17. package/dist/index.d.ts +31 -26
  18. package/dist/index.js +2 -2
  19. package/package.json +2 -2
  20. package/templates/tauri-react/.env.example +7 -0
  21. package/templates/tauri-react/.github/workflows/release-desktop.yml +107 -0
  22. package/templates/tauri-react/README.md.hbs +148 -0
  23. package/templates/tauri-react/dev.ts +37 -0
  24. package/templates/tauri-react/index.html.hbs +16 -0
  25. package/templates/tauri-react/kora.config.ts +17 -0
  26. package/templates/tauri-react/package.json.hbs +44 -0
  27. package/templates/tauri-react/server.ts +23 -0
  28. package/templates/tauri-react/src/App.tsx +578 -0
  29. package/templates/tauri-react/src/AppShell.tsx +116 -0
  30. package/templates/tauri-react/src/SetupScreen.tsx +239 -0
  31. package/templates/tauri-react/src/main.tsx +9 -0
  32. package/templates/tauri-react/src/schema.ts +15 -0
  33. package/templates/tauri-react/src/sync-config.ts +103 -0
  34. package/templates/tauri-react/src/updater.ts +38 -0
  35. package/templates/tauri-react/src-tauri/Cargo.toml +19 -0
  36. package/templates/tauri-react/src-tauri/build.rs +3 -0
  37. package/templates/tauri-react/src-tauri/capabilities/default.json +12 -0
  38. package/templates/tauri-react/src-tauri/icons/128x128.png +0 -0
  39. package/templates/tauri-react/src-tauri/icons/128x128@2x.png +0 -0
  40. package/templates/tauri-react/src-tauri/icons/32x32.png +0 -0
  41. package/templates/tauri-react/src-tauri/icons/icon.icns +0 -0
  42. package/templates/tauri-react/src-tauri/icons/icon.ico +0 -0
  43. package/templates/tauri-react/src-tauri/src/lib.rs +8 -0
  44. package/templates/tauri-react/src-tauri/src/main.rs +6 -0
  45. package/templates/tauri-react/src-tauri/tauri.conf.json +44 -0
  46. package/templates/tauri-react/tsconfig.json +15 -0
  47. package/templates/tauri-react/vite.config.ts +15 -0
  48. package/dist/chunk-E7OCVRYL.js.map +0 -1
  49. package/dist/chunk-KTSRAPSE.js.map +0 -1
  50. package/dist/chunk-ZGYRDYXS.js.map +0 -1
@@ -5,18 +5,26 @@ import {
5
5
  createPromptClient,
6
6
  findProjectRoot,
7
7
  resolveProjectBinaryEntryPoint
8
- } from "./chunk-KTSRAPSE.js";
8
+ } from "./chunk-CMSX76KM.js";
9
9
 
10
10
  // src/commands/deploy/adapters/adapter.ts
11
- var DEPLOY_PLATFORMS = ["fly", "railway", "aws-ecs", "aws-lightsail", "render", "docker", "kora-cloud"];
11
+ var DEPLOY_PLATFORMS = [
12
+ "fly",
13
+ "railway",
14
+ "aws-ecs",
15
+ "aws-lightsail",
16
+ "render",
17
+ "docker",
18
+ "kora-cloud"
19
+ ];
12
20
  function isDeployPlatform(value) {
13
21
  return DEPLOY_PLATFORMS.includes(value);
14
22
  }
15
23
 
16
24
  // src/commands/deploy/builder/client-builder.ts
17
25
  import { spawn } from "child_process";
18
- import { copyFile, readdir } from "fs/promises";
19
26
  import { existsSync } from "fs";
27
+ import { copyFile, readdir } from "fs/promises";
20
28
  import { join, resolve } from "path";
21
29
  async function buildClient(options) {
22
30
  const viteEntryPoint = await resolveProjectBinaryEntryPoint(options.projectRoot, "vite", "vite");
@@ -940,37 +948,46 @@ var AwsEcsAdapter = class {
940
948
  };
941
949
  const region = config.region ?? "us-east-1";
942
950
  const repoName = `kora/${config.appName}`;
943
- const createRepo = await this.runner.run("aws", [
944
- "ecr",
945
- "create-repository",
946
- "--repository-name",
947
- repoName,
948
- "--region",
949
- region,
950
- "--image-scanning-configuration",
951
- "scanOnPush=true"
952
- ], config.projectRoot);
951
+ const createRepo = await this.runner.run(
952
+ "aws",
953
+ [
954
+ "ecr",
955
+ "create-repository",
956
+ "--repository-name",
957
+ repoName,
958
+ "--region",
959
+ region,
960
+ "--image-scanning-configuration",
961
+ "scanOnPush=true"
962
+ ],
963
+ config.projectRoot
964
+ );
953
965
  if (createRepo.exitCode !== 0 && !createRepo.stderr.includes("RepositoryAlreadyExistsException")) {
954
966
  throw new Error(`Failed to create ECR repository: ${createRepo.stderr}`);
955
967
  }
956
- const identity = await this.runner.run("aws", ["sts", "get-caller-identity", "--query", "Account", "--output", "text"], config.projectRoot);
968
+ const identity = await this.runner.run(
969
+ "aws",
970
+ ["sts", "get-caller-identity", "--query", "Account", "--output", "text"],
971
+ config.projectRoot
972
+ );
957
973
  const accountId = identity.stdout.trim();
958
- await this.runner.run("aws", [
959
- "ecs",
960
- "create-cluster",
961
- "--cluster-name",
962
- config.appName,
963
- "--region",
964
- region
965
- ], config.projectRoot);
966
- await this.runner.run("aws", [
967
- "logs",
968
- "create-log-group",
969
- "--log-group-name",
970
- `/ecs/${config.appName}`,
971
- "--region",
972
- region
973
- ], config.projectRoot);
974
+ await this.runner.run(
975
+ "aws",
976
+ ["ecs", "create-cluster", "--cluster-name", config.appName, "--region", region],
977
+ config.projectRoot
978
+ );
979
+ await this.runner.run(
980
+ "aws",
981
+ [
982
+ "logs",
983
+ "create-log-group",
984
+ "--log-group-name",
985
+ `/ecs/${config.appName}`,
986
+ "--region",
987
+ region
988
+ ],
989
+ config.projectRoot
990
+ );
974
991
  return {
975
992
  applicationId: `${accountId}.dkr.ecr.${region}.amazonaws.com/${repoName}`,
976
993
  databaseId: null,
@@ -1003,50 +1020,42 @@ var AwsEcsAdapter = class {
1003
1020
  const context = this.requireContext();
1004
1021
  const region = context.region ?? "us-east-1";
1005
1022
  const repoName = `kora/${context.appName}`;
1006
- const loginPassword = await this.runner.run("aws", [
1007
- "ecr",
1008
- "get-login-password",
1009
- "--region",
1010
- region
1011
- ], context.projectRoot);
1023
+ const loginPassword = await this.runner.run(
1024
+ "aws",
1025
+ ["ecr", "get-login-password", "--region", region],
1026
+ context.projectRoot
1027
+ );
1012
1028
  if (loginPassword.exitCode !== 0) {
1013
1029
  throw new Error(`ECR login failed: ${loginPassword.stderr}`);
1014
1030
  }
1015
- const identity = await this.runner.run("aws", [
1016
- "sts",
1017
- "get-caller-identity",
1018
- "--query",
1019
- "Account",
1020
- "--output",
1021
- "text"
1022
- ], context.projectRoot);
1031
+ const identity = await this.runner.run(
1032
+ "aws",
1033
+ ["sts", "get-caller-identity", "--query", "Account", "--output", "text"],
1034
+ context.projectRoot
1035
+ );
1023
1036
  const accountId = identity.stdout.trim();
1024
1037
  const ecrUri = `${accountId}.dkr.ecr.${region}.amazonaws.com`;
1025
1038
  const imageUri = `${ecrUri}/${repoName}:latest`;
1026
- const dockerLogin = await this.runner.run("docker", [
1027
- "login",
1028
- "--username",
1029
- "AWS",
1030
- "--password-stdin",
1031
- ecrUri
1032
- ], artifacts.deployDirectory);
1039
+ const dockerLogin = await this.runner.run(
1040
+ "docker",
1041
+ ["login", "--username", "AWS", "--password-stdin", ecrUri],
1042
+ artifacts.deployDirectory
1043
+ );
1033
1044
  this.logger.step("Building Docker image...");
1034
- const dockerBuild = await this.runner.run("docker", [
1035
- "build",
1036
- "--platform",
1037
- "linux/amd64",
1038
- "-t",
1039
- imageUri,
1040
- "."
1041
- ], artifacts.deployDirectory);
1045
+ const dockerBuild = await this.runner.run(
1046
+ "docker",
1047
+ ["build", "--platform", "linux/amd64", "-t", imageUri, "."],
1048
+ artifacts.deployDirectory
1049
+ );
1042
1050
  if (dockerBuild.exitCode !== 0) {
1043
1051
  throw new Error(`Docker build failed: ${dockerBuild.stderr}`);
1044
1052
  }
1045
1053
  this.logger.step("Pushing image to ECR...");
1046
- const dockerPush = await this.runner.run("docker", [
1047
- "push",
1048
- imageUri
1049
- ], artifacts.deployDirectory);
1054
+ const dockerPush = await this.runner.run(
1055
+ "docker",
1056
+ ["push", imageUri],
1057
+ artifacts.deployDirectory
1058
+ );
1050
1059
  if (dockerPush.exitCode !== 0) {
1051
1060
  throw new Error(`Docker push failed: ${dockerPush.stderr}`);
1052
1061
  }
@@ -1057,52 +1066,55 @@ var AwsEcsAdapter = class {
1057
1066
  cpu: "256",
1058
1067
  memory: "512",
1059
1068
  executionRoleArn: `arn:aws:iam::${accountId}:role/ecsTaskExecutionRole`,
1060
- containerDefinitions: [{
1061
- name: context.appName,
1062
- image: imageUri,
1063
- essential: true,
1064
- portMappings: [{ containerPort: 3001, protocol: "tcp" }],
1065
- logConfiguration: {
1066
- logDriver: "awslogs",
1067
- options: {
1068
- "awslogs-group": `/ecs/${context.appName}`,
1069
- "awslogs-region": region,
1070
- "awslogs-stream-prefix": "ecs"
1069
+ containerDefinitions: [
1070
+ {
1071
+ name: context.appName,
1072
+ image: imageUri,
1073
+ essential: true,
1074
+ portMappings: [{ containerPort: 3001, protocol: "tcp" }],
1075
+ logConfiguration: {
1076
+ logDriver: "awslogs",
1077
+ options: {
1078
+ "awslogs-group": `/ecs/${context.appName}`,
1079
+ "awslogs-region": region,
1080
+ "awslogs-stream-prefix": "ecs"
1081
+ }
1082
+ },
1083
+ healthCheck: {
1084
+ command: ["CMD-SHELL", "curl -f http://localhost:3001/health || exit 1"],
1085
+ interval: 30,
1086
+ timeout: 5,
1087
+ retries: 3,
1088
+ startPeriod: 60
1071
1089
  }
1072
- },
1073
- healthCheck: {
1074
- command: ["CMD-SHELL", "curl -f http://localhost:3001/health || exit 1"],
1075
- interval: 30,
1076
- timeout: 5,
1077
- retries: 3,
1078
- startPeriod: 60
1079
1090
  }
1080
- }]
1091
+ ]
1081
1092
  });
1082
- const registerTask = await this.runner.run("aws", [
1083
- "ecs",
1084
- "register-task-definition",
1085
- "--cli-input-json",
1086
- taskDef,
1087
- "--region",
1088
- region
1089
- ], context.projectRoot);
1093
+ const registerTask = await this.runner.run(
1094
+ "aws",
1095
+ ["ecs", "register-task-definition", "--cli-input-json", taskDef, "--region", region],
1096
+ context.projectRoot
1097
+ );
1090
1098
  if (registerTask.exitCode !== 0) {
1091
1099
  throw new Error(`Task definition registration failed: ${registerTask.stderr}`);
1092
1100
  }
1093
- const updateService = await this.runner.run("aws", [
1094
- "ecs",
1095
- "update-service",
1096
- "--cluster",
1097
- context.appName,
1098
- "--service",
1099
- context.appName,
1100
- "--task-definition",
1101
- context.appName,
1102
- "--force-new-deployment",
1103
- "--region",
1104
- region
1105
- ], context.projectRoot);
1101
+ const updateService = await this.runner.run(
1102
+ "aws",
1103
+ [
1104
+ "ecs",
1105
+ "update-service",
1106
+ "--cluster",
1107
+ context.appName,
1108
+ "--service",
1109
+ context.appName,
1110
+ "--task-definition",
1111
+ context.appName,
1112
+ "--force-new-deployment",
1113
+ "--region",
1114
+ region
1115
+ ],
1116
+ context.projectRoot
1117
+ );
1106
1118
  const deploymentId = (/* @__PURE__ */ new Date()).toISOString();
1107
1119
  if (updateService.exitCode !== 0) {
1108
1120
  this.logger.step("Service not found, creating new service...");
@@ -1127,19 +1139,23 @@ var AwsEcsAdapter = class {
1127
1139
  async rollback(deploymentId) {
1128
1140
  const context = this.requireContext();
1129
1141
  const region = context.region ?? "us-east-1";
1130
- const result = await this.runner.run("aws", [
1131
- "ecs",
1132
- "update-service",
1133
- "--cluster",
1134
- context.appName,
1135
- "--service",
1136
- context.appName,
1137
- "--task-definition",
1138
- `${context.appName}:${deploymentId}`,
1139
- "--force-new-deployment",
1140
- "--region",
1141
- region
1142
- ], context.projectRoot);
1142
+ const result = await this.runner.run(
1143
+ "aws",
1144
+ [
1145
+ "ecs",
1146
+ "update-service",
1147
+ "--cluster",
1148
+ context.appName,
1149
+ "--service",
1150
+ context.appName,
1151
+ "--task-definition",
1152
+ `${context.appName}:${deploymentId}`,
1153
+ "--force-new-deployment",
1154
+ "--region",
1155
+ region
1156
+ ],
1157
+ context.projectRoot
1158
+ );
1143
1159
  if (result.exitCode !== 0) {
1144
1160
  throw new Error(`ECS rollback failed: ${result.stderr}`);
1145
1161
  }
@@ -1182,16 +1198,20 @@ var AwsEcsAdapter = class {
1182
1198
  async status() {
1183
1199
  const context = this.requireContext();
1184
1200
  const region = context.region ?? "us-east-1";
1185
- const result = await this.runner.run("aws", [
1186
- "ecs",
1187
- "describe-services",
1188
- "--cluster",
1189
- context.appName,
1190
- "--services",
1191
- context.appName,
1192
- "--region",
1193
- region
1194
- ], context.projectRoot);
1201
+ const result = await this.runner.run(
1202
+ "aws",
1203
+ [
1204
+ "ecs",
1205
+ "describe-services",
1206
+ "--cluster",
1207
+ context.appName,
1208
+ "--services",
1209
+ context.appName,
1210
+ "--region",
1211
+ region
1212
+ ],
1213
+ context.projectRoot
1214
+ );
1195
1215
  if (result.exitCode !== 0) {
1196
1216
  return { state: "failed", message: result.stderr };
1197
1217
  }
@@ -1300,18 +1320,22 @@ var AwsLightsailAdapter = class {
1300
1320
  };
1301
1321
  const region = config.region ?? "us-east-1";
1302
1322
  const serviceName = sanitizeLightsailName(config.appName);
1303
- const createService = await this.runner.run("aws", [
1304
- "lightsail",
1305
- "create-container-service",
1306
- "--service-name",
1307
- serviceName,
1308
- "--power",
1309
- "nano",
1310
- "--scale",
1311
- "1",
1312
- "--region",
1313
- region
1314
- ], config.projectRoot);
1323
+ const createService = await this.runner.run(
1324
+ "aws",
1325
+ [
1326
+ "lightsail",
1327
+ "create-container-service",
1328
+ "--service-name",
1329
+ serviceName,
1330
+ "--power",
1331
+ "nano",
1332
+ "--scale",
1333
+ "1",
1334
+ "--region",
1335
+ region
1336
+ ],
1337
+ config.projectRoot
1338
+ );
1315
1339
  if (createService.exitCode !== 0 && !createService.stderr.includes("already exists")) {
1316
1340
  throw new Error(`Failed to create Lightsail container service: ${createService.stderr}`);
1317
1341
  }
@@ -1349,30 +1373,31 @@ var AwsLightsailAdapter = class {
1349
1373
  const serviceName = sanitizeLightsailName(context.appName);
1350
1374
  const imageTag = `${serviceName}:latest`;
1351
1375
  this.logger.step("Building Docker image...");
1352
- const dockerBuild = await this.runner.run("docker", [
1353
- "build",
1354
- "--platform",
1355
- "linux/amd64",
1356
- "-t",
1357
- imageTag,
1358
- "."
1359
- ], artifacts.deployDirectory);
1376
+ const dockerBuild = await this.runner.run(
1377
+ "docker",
1378
+ ["build", "--platform", "linux/amd64", "-t", imageTag, "."],
1379
+ artifacts.deployDirectory
1380
+ );
1360
1381
  if (dockerBuild.exitCode !== 0) {
1361
1382
  throw new Error(`Docker build failed: ${dockerBuild.stderr}`);
1362
1383
  }
1363
1384
  this.logger.step("Pushing image to Lightsail...");
1364
- const pushImage = await this.runner.run("aws", [
1365
- "lightsail",
1366
- "push-container-image",
1367
- "--service-name",
1368
- serviceName,
1369
- "--label",
1370
- "latest",
1371
- "--image",
1372
- imageTag,
1373
- "--region",
1374
- region
1375
- ], artifacts.deployDirectory);
1385
+ const pushImage = await this.runner.run(
1386
+ "aws",
1387
+ [
1388
+ "lightsail",
1389
+ "push-container-image",
1390
+ "--service-name",
1391
+ serviceName,
1392
+ "--label",
1393
+ "latest",
1394
+ "--image",
1395
+ imageTag,
1396
+ "--region",
1397
+ region
1398
+ ],
1399
+ artifacts.deployDirectory
1400
+ );
1376
1401
  if (pushImage.exitCode !== 0) {
1377
1402
  throw new Error(`Lightsail image push failed: ${pushImage.stderr}`);
1378
1403
  }
@@ -1403,29 +1428,30 @@ var AwsLightsailAdapter = class {
1403
1428
  unhealthyThreshold: 3
1404
1429
  }
1405
1430
  });
1406
- const createDeploy = await this.runner.run("aws", [
1407
- "lightsail",
1408
- "create-container-service-deployment",
1409
- "--service-name",
1410
- serviceName,
1411
- "--containers",
1412
- containers,
1413
- "--public-endpoint",
1414
- publicEndpoint,
1415
- "--region",
1416
- region
1417
- ], context.projectRoot);
1431
+ const createDeploy = await this.runner.run(
1432
+ "aws",
1433
+ [
1434
+ "lightsail",
1435
+ "create-container-service-deployment",
1436
+ "--service-name",
1437
+ serviceName,
1438
+ "--containers",
1439
+ containers,
1440
+ "--public-endpoint",
1441
+ publicEndpoint,
1442
+ "--region",
1443
+ region
1444
+ ],
1445
+ context.projectRoot
1446
+ );
1418
1447
  if (createDeploy.exitCode !== 0) {
1419
1448
  throw new Error(`Lightsail deployment failed: ${createDeploy.stderr}`);
1420
1449
  }
1421
- const serviceInfo = await this.runner.run("aws", [
1422
- "lightsail",
1423
- "get-container-services",
1424
- "--service-name",
1425
- serviceName,
1426
- "--region",
1427
- region
1428
- ], context.projectRoot);
1450
+ const serviceInfo = await this.runner.run(
1451
+ "aws",
1452
+ ["lightsail", "get-container-services", "--service-name", serviceName, "--region", region],
1453
+ context.projectRoot
1454
+ );
1429
1455
  const rawUrl = parseLightsailUrl(serviceInfo.stdout) ?? `https://${serviceName}.${region}.cs.amazonlightsail.com`;
1430
1456
  const serviceUrl = rawUrl.replace(/\/+$/, "");
1431
1457
  const deploymentId = (/* @__PURE__ */ new Date()).toISOString();
@@ -1439,14 +1465,18 @@ var AwsLightsailAdapter = class {
1439
1465
  const context = this.requireContext();
1440
1466
  const region = context.region ?? "us-east-1";
1441
1467
  const serviceName = sanitizeLightsailName(context.appName);
1442
- const deployments = await this.runner.run("aws", [
1443
- "lightsail",
1444
- "get-container-service-deployments",
1445
- "--service-name",
1446
- serviceName,
1447
- "--region",
1448
- region
1449
- ], context.projectRoot);
1468
+ const deployments = await this.runner.run(
1469
+ "aws",
1470
+ [
1471
+ "lightsail",
1472
+ "get-container-service-deployments",
1473
+ "--service-name",
1474
+ serviceName,
1475
+ "--region",
1476
+ region
1477
+ ],
1478
+ context.projectRoot
1479
+ );
1450
1480
  if (deployments.exitCode !== 0) {
1451
1481
  throw new Error(`Lightsail rollback failed: ${deployments.stderr}`);
1452
1482
  }
@@ -1454,18 +1484,22 @@ var AwsLightsailAdapter = class {
1454
1484
  if (!previousDeployment) {
1455
1485
  throw new Error("No previous deployment found to rollback to.");
1456
1486
  }
1457
- const redeploy = await this.runner.run("aws", [
1458
- "lightsail",
1459
- "create-container-service-deployment",
1460
- "--service-name",
1461
- serviceName,
1462
- "--containers",
1463
- JSON.stringify(previousDeployment.containers),
1464
- "--public-endpoint",
1465
- JSON.stringify(previousDeployment.publicEndpoint),
1466
- "--region",
1467
- region
1468
- ], context.projectRoot);
1487
+ const redeploy = await this.runner.run(
1488
+ "aws",
1489
+ [
1490
+ "lightsail",
1491
+ "create-container-service-deployment",
1492
+ "--service-name",
1493
+ serviceName,
1494
+ "--containers",
1495
+ JSON.stringify(previousDeployment.containers),
1496
+ "--public-endpoint",
1497
+ JSON.stringify(previousDeployment.publicEndpoint),
1498
+ "--region",
1499
+ region
1500
+ ],
1501
+ context.projectRoot
1502
+ );
1469
1503
  if (redeploy.exitCode !== 0) {
1470
1504
  throw new Error(`Lightsail rollback deployment failed: ${redeploy.stderr}`);
1471
1505
  }
@@ -1512,14 +1546,11 @@ var AwsLightsailAdapter = class {
1512
1546
  const context = this.requireContext();
1513
1547
  const region = context.region ?? "us-east-1";
1514
1548
  const serviceName = sanitizeLightsailName(context.appName);
1515
- const result = await this.runner.run("aws", [
1516
- "lightsail",
1517
- "get-container-services",
1518
- "--service-name",
1519
- serviceName,
1520
- "--region",
1521
- region
1522
- ], context.projectRoot);
1549
+ const result = await this.runner.run(
1550
+ "aws",
1551
+ ["lightsail", "get-container-services", "--service-name", serviceName, "--region", region],
1552
+ context.projectRoot
1553
+ );
1523
1554
  if (result.exitCode !== 0) {
1524
1555
  return { state: "failed", message: result.stderr };
1525
1556
  }
@@ -1584,12 +1615,7 @@ ${error.message}` });
1584
1615
  });
1585
1616
  }
1586
1617
  };
1587
- var PASSTHROUGH_ENV_VARS = [
1588
- "DATABASE_URL",
1589
- "AUTH_SECRET",
1590
- "PUBLIC_URL",
1591
- "NODE_ENV"
1592
- ];
1618
+ var PASSTHROUGH_ENV_VARS = ["DATABASE_URL", "AUTH_SECRET", "PUBLIC_URL", "NODE_ENV"];
1593
1619
  function sanitizeLightsailName(name) {
1594
1620
  return name.toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-{2,}/g, "-").replace(/^-|-$/g, "").slice(0, 255) || "kora-app";
1595
1621
  }
@@ -1700,7 +1726,8 @@ function generateDeployPackageJson(nativeDependencies) {
1700
1726
  type: "module",
1701
1727
  dependencies: nativeDependencies
1702
1728
  };
1703
- return JSON.stringify(pkg, null, 2) + "\n";
1729
+ return `${JSON.stringify(pkg, null, 2)}
1730
+ `;
1704
1731
  }
1705
1732
  function generateDockerIgnore() {
1706
1733
  return [
@@ -2034,7 +2061,7 @@ var deployCommand = defineCommand({
2034
2061
  nativeDependencies: {
2035
2062
  "better-sqlite3": "^11.0.0",
2036
2063
  "drizzle-orm": "^0.45.2",
2037
- "postgres": "^3.4.0"
2064
+ postgres: "^3.4.0"
2038
2065
  }
2039
2066
  });
2040
2067
  await writeDockerIgnoreArtifact(deployDirectory);
@@ -2299,4 +2326,4 @@ export {
2299
2326
  deployCommand,
2300
2327
  generateTypes
2301
2328
  };
2302
- //# sourceMappingURL=chunk-E7OCVRYL.js.map
2329
+ //# sourceMappingURL=chunk-YGVO4POI.js.map