@geekmidas/cli 9.3.0 → 9.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.
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import { getCredentialsPath, getDokployCredentials, getDokployRegistryId, getDok
6
6
  import { createStageSecrets, generateDbPassword, generateDbUrl, generateFullstackCustomSecrets, rotateServicePassword } from "./fullstack-secrets-l8s3II_H.mjs";
7
7
  import { getKeyPath, maskPassword, readStageSecrets, secretsExist, setCustomSecret, toEmbeddableSecrets, writeStageSecrets } from "./storage-dbb9RyBl.mjs";
8
8
  import { createCredentialsPreload, createEntryWrapper, findAvailablePort, isPortAvailable, loadEnvFiles, loadSecretsForApp, prepareEntryCredentials, resolveServicePorts, rewriteUrlsWithPorts, setupCommand, startWorkspaceServices } from "./setup-A-BX8JUm.mjs";
9
- import { ConstructGenerator, EndpointGenerator, OPENAPI_OUTPUT_PATH, generateOpenApi, isPartitionedRoutes, normalizeRoutes, openapiCommand, resolveOpenApiConfig } from "./openapi-BlIiUahn.mjs";
9
+ import { ConstructGenerator, EndpointGenerator, OPENAPI_OUTPUT_PATH, generateOpenApi, isPartitionedRoutes, normalizeRoutes, openapiCommand, resolveOpenApiConfig } from "./openapi-Dm1_sCxe.mjs";
10
10
  import { DokployApi } from "./dokploy-api-sfZFlWuE.mjs";
11
11
  import { encryptSecrets } from "./encryption-CO5Q4Bhf.mjs";
12
12
  import { CachedStateProvider } from "./CachedStateProvider-CzyFct42.mjs";
@@ -25,7 +25,7 @@ import fg from "fast-glob";
25
25
  import { parse as parse$1 } from "yaml";
26
26
  import { randomBytes } from "node:crypto";
27
27
  import { Cron } from "@geekmidas/constructs/crons";
28
- import { InvalidCronExpressionError, toAwsCron } from "@geekmidas/manifest";
28
+ import { InvalidCronExpressionError, cronPeriod, toAwsCron } from "@geekmidas/manifest";
29
29
  import { Function } from "@geekmidas/constructs/functions";
30
30
  import { Queue } from "@geekmidas/constructs/queue";
31
31
  import { Subscriber } from "@geekmidas/constructs/subscribers";
@@ -37,7 +37,7 @@ import prompts from "prompts";
37
37
 
38
38
  //#region package.json
39
39
  var name = "@geekmidas/cli";
40
- var version = "9.2.1";
40
+ var version = "9.3.0";
41
41
  var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
42
42
  var private$1 = false;
43
43
  var type = "module";
@@ -383,14 +383,19 @@ var CronGenerator = class extends ConstructGenerator {
383
383
  await mkdir(cronsDir, { recursive: true });
384
384
  for (const { key, construct, path } of constructs) {
385
385
  const handlerFile = await this.generateCronHandler(cronsDir, path.relative, key, context);
386
+ const schedule = schedules.get(key);
387
+ const uptime = construct.getUptime();
386
388
  cronInfos.push({
387
389
  name: key,
388
390
  handler: relative(process.cwd(), handlerFile).replace(/\.ts$/, ".handler"),
389
- schedule: schedules.get(key),
391
+ schedule,
390
392
  timeout: construct.timeout,
391
393
  memorySize: construct.memorySize,
392
394
  environment: await construct.getEnvironment({ markOptional: context.markOptional }),
393
- monitoring: construct.getMonitoring()
395
+ ...uptime && { uptime: {
396
+ ...uptime,
397
+ period: cronPeriod(schedule)
398
+ } }
394
399
  });
395
400
  logger$13.log(`Generated cron handler: ${key}`);
396
401
  }
@@ -484,8 +489,7 @@ var FunctionGenerator = class extends ConstructGenerator {
484
489
  handler: relative(process.cwd(), handlerFile).replace(/\.ts$/, ".handler"),
485
490
  timeout: construct.timeout,
486
491
  memorySize: construct.memorySize,
487
- environment: await construct.getEnvironment({ markOptional: context.markOptional }),
488
- monitoring: construct.getMonitoring()
492
+ environment: await construct.getEnvironment({ markOptional: context.markOptional })
489
493
  });
490
494
  logger$13.log(`Generated function handler: ${key}`);
491
495
  }
@@ -6943,25 +6947,25 @@ const CLI_VERSION = `~${pkg.version}`;
6943
6947
  * Run: pnpm --filter @geekmidas/cli sync-versions
6944
6948
  */
6945
6949
  const GEEKMIDAS_VERSIONS = {
6946
- "@geekmidas/audit": "~9.2.1",
6947
- "@geekmidas/auth": "~9.2.1",
6948
- "@geekmidas/cache": "~9.2.1",
6949
- "@geekmidas/client": "~9.2.1",
6950
- "@geekmidas/cloud": "~9.2.1",
6951
- "@geekmidas/constructs": "~9.2.1",
6952
- "@geekmidas/db": "~9.2.1",
6953
- "@geekmidas/emailkit": "~9.2.1",
6954
- "@geekmidas/envkit": "~9.2.1",
6955
- "@geekmidas/errors": "~9.2.1",
6956
- "@geekmidas/events": "~9.2.1",
6957
- "@geekmidas/logger": "~9.2.1",
6958
- "@geekmidas/rate-limit": "~9.2.1",
6959
- "@geekmidas/schema": "~9.2.1",
6960
- "@geekmidas/services": "~9.2.1",
6961
- "@geekmidas/storage": "~9.2.1",
6962
- "@geekmidas/studio": "~9.2.1",
6963
- "@geekmidas/telescope": "~9.2.1",
6964
- "@geekmidas/testkit": "~9.2.1",
6950
+ "@geekmidas/audit": "~9.3.0",
6951
+ "@geekmidas/auth": "~9.3.0",
6952
+ "@geekmidas/cache": "~9.3.0",
6953
+ "@geekmidas/client": "~9.3.0",
6954
+ "@geekmidas/cloud": "~9.3.0",
6955
+ "@geekmidas/constructs": "~9.3.0",
6956
+ "@geekmidas/db": "~9.3.0",
6957
+ "@geekmidas/emailkit": "~9.3.0",
6958
+ "@geekmidas/envkit": "~9.3.0",
6959
+ "@geekmidas/errors": "~9.3.0",
6960
+ "@geekmidas/events": "~9.3.0",
6961
+ "@geekmidas/logger": "~9.3.0",
6962
+ "@geekmidas/rate-limit": "~9.3.0",
6963
+ "@geekmidas/schema": "~9.3.0",
6964
+ "@geekmidas/services": "~9.3.0",
6965
+ "@geekmidas/storage": "~9.3.0",
6966
+ "@geekmidas/studio": "~9.3.0",
6967
+ "@geekmidas/telescope": "~9.3.0",
6968
+ "@geekmidas/testkit": "~9.3.0",
6965
6969
  "@geekmidas/cli": CLI_VERSION
6966
6970
  };
6967
6971