@geekmidas/cli 9.1.0 → 9.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @geekmidas/cli
2
2
 
3
+ ## 9.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#312](https://github.com/geekmidas/toolbox/pull/312) [`bccee5d`](https://github.com/geekmidas/toolbox/commit/bccee5d54b3675f284cd7380c8a1293fdfb6afb7) Thanks [@geekmidas](https://github.com/geekmidas)! - The manifest records each construct's monitors
8
+
9
+ Functions, crons and routes set with `.monitor()` now carry a `monitoring` list in the build manifest, so infrastructure can provision what they report to without reading the code:
10
+
11
+ ```ts
12
+ {
13
+ name: 'nightlySync',
14
+ schedule: 'cron(0 8 * * ? *)',
15
+ environment: ['MONITORING_URL'],
16
+ monitoring: [{ type: 'heartbeat', provider: 'betterStack', env: 'MONITORING_URL' }],
17
+ }
18
+ ```
19
+
20
+ `heartbeat.betterStack()` and `heartbeat.healthchecks()` record their provider; a custom `heartbeat()` records only its `env`, and a hand-written monitor its service name as `type`. A construct without monitors has no `monitoring` field. On the `server` provider, where one route serves the whole app, that route lists the distinct monitors across its endpoints.
21
+
22
+ A heartbeat's URL variable is now required rather than optional, so the manifest lists it as `MONITORING_URL` instead of `MONITORING_URL?` and a deploy that does not set it is caught. If it is still missing at runtime, the monitor is skipped with a warning and the run goes on.
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [[`bccee5d`](https://github.com/geekmidas/toolbox/commit/bccee5d54b3675f284cd7380c8a1293fdfb6afb7)]:
27
+ - @geekmidas/manifest@9.2.0
28
+ - @geekmidas/constructs@9.2.0
29
+ - @geekmidas/envkit@9.2.0
30
+ - @geekmidas/errors@9.2.0
31
+ - @geekmidas/logger@9.2.0
32
+ - @geekmidas/schema@9.2.0
33
+ - @geekmidas/telescope@9.2.0
34
+
3
35
  ## 9.1.0
4
36
 
5
37
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -6,7 +6,7 @@ const require_credentials = require('./credentials-C8DWtnMY.cjs');
6
6
  const require_fullstack_secrets = require('./fullstack-secrets-BYzi6Hwl.cjs');
7
7
  const require_storage = require('./storage-B1wvztiJ.cjs');
8
8
  const require_setup = require('./setup-WZ-xqAQO.cjs');
9
- const require_openapi = require('./openapi-BzNOC7_i.cjs');
9
+ const require_openapi = require('./openapi-B_IGZDVu.cjs');
10
10
  const require_dokploy_api = require('./dokploy-api-CqOIKHme.cjs');
11
11
  const require_encryption = require('./encryption-MfXAiFTm.cjs');
12
12
  const require_CachedStateProvider = require('./CachedStateProvider-klLWZXWF.cjs');
@@ -36,7 +36,7 @@ const prompts = require_chunk.__toESM(require("prompts"));
36
36
 
37
37
  //#region package.json
38
38
  var name = "@geekmidas/cli";
39
- var version = "9.0.2";
39
+ var version = "9.1.0";
40
40
  var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
41
41
  var private$1 = false;
42
42
  var type = "module";
@@ -387,7 +387,8 @@ var CronGenerator = class extends require_openapi.ConstructGenerator {
387
387
  schedule: construct.schedule || "rate(1 hour)",
388
388
  timeout: construct.timeout,
389
389
  memorySize: construct.memorySize,
390
- environment: await construct.getEnvironment({ markOptional: context.markOptional })
390
+ environment: await construct.getEnvironment({ markOptional: context.markOptional }),
391
+ monitoring: construct.getMonitoring()
391
392
  });
392
393
  logger$13.log(`Generated cron handler: ${key}`);
393
394
  }
@@ -437,7 +438,8 @@ var FunctionGenerator = class extends require_openapi.ConstructGenerator {
437
438
  handler: (0, node_path.relative)(process.cwd(), handlerFile).replace(/\.ts$/, ".handler"),
438
439
  timeout: construct.timeout,
439
440
  memorySize: construct.memorySize,
440
- environment: await construct.getEnvironment({ markOptional: context.markOptional })
441
+ environment: await construct.getEnvironment({ markOptional: context.markOptional }),
442
+ monitoring: construct.getMonitoring()
441
443
  });
442
444
  logger$13.log(`Generated function handler: ${key}`);
443
445
  }
@@ -6895,25 +6897,25 @@ const CLI_VERSION = `~${pkg.version}`;
6895
6897
  * Run: pnpm --filter @geekmidas/cli sync-versions
6896
6898
  */
6897
6899
  const GEEKMIDAS_VERSIONS = {
6898
- "@geekmidas/audit": "~9.0.2",
6899
- "@geekmidas/auth": "~9.0.2",
6900
- "@geekmidas/cache": "~9.0.2",
6901
- "@geekmidas/client": "~9.0.2",
6902
- "@geekmidas/cloud": "~9.0.2",
6903
- "@geekmidas/constructs": "~9.0.2",
6904
- "@geekmidas/db": "~9.0.2",
6905
- "@geekmidas/emailkit": "~9.0.2",
6906
- "@geekmidas/envkit": "~9.0.2",
6907
- "@geekmidas/errors": "~9.0.2",
6908
- "@geekmidas/events": "~9.0.2",
6909
- "@geekmidas/logger": "~9.0.2",
6910
- "@geekmidas/rate-limit": "~9.0.2",
6911
- "@geekmidas/schema": "~9.0.2",
6912
- "@geekmidas/services": "~9.0.2",
6913
- "@geekmidas/storage": "~9.0.2",
6914
- "@geekmidas/studio": "~9.0.2",
6915
- "@geekmidas/telescope": "~9.0.2",
6916
- "@geekmidas/testkit": "~9.0.2",
6900
+ "@geekmidas/audit": "~9.1.0",
6901
+ "@geekmidas/auth": "~9.1.0",
6902
+ "@geekmidas/cache": "~9.1.0",
6903
+ "@geekmidas/client": "~9.1.0",
6904
+ "@geekmidas/cloud": "~9.1.0",
6905
+ "@geekmidas/constructs": "~9.1.0",
6906
+ "@geekmidas/db": "~9.1.0",
6907
+ "@geekmidas/emailkit": "~9.1.0",
6908
+ "@geekmidas/envkit": "~9.1.0",
6909
+ "@geekmidas/errors": "~9.1.0",
6910
+ "@geekmidas/events": "~9.1.0",
6911
+ "@geekmidas/logger": "~9.1.0",
6912
+ "@geekmidas/rate-limit": "~9.1.0",
6913
+ "@geekmidas/schema": "~9.1.0",
6914
+ "@geekmidas/services": "~9.1.0",
6915
+ "@geekmidas/storage": "~9.1.0",
6916
+ "@geekmidas/studio": "~9.1.0",
6917
+ "@geekmidas/telescope": "~9.1.0",
6918
+ "@geekmidas/testkit": "~9.1.0",
6917
6919
  "@geekmidas/cli": CLI_VERSION
6918
6920
  };
6919
6921