@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/CHANGELOG.md +36 -0
- package/dist/index.cjs +29 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +30 -26
- package/dist/index.mjs.map +1 -1
- package/dist/{openapi-BlIiUahn.mjs → openapi-Dm1_sCxe.mjs} +4 -8
- package/dist/openapi-Dm1_sCxe.mjs.map +1 -0
- package/dist/{openapi-C-YgZHyd.cjs → openapi-ayEknaaM.cjs} +4 -8
- package/dist/openapi-ayEknaaM.cjs.map +1 -0
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.mjs +1 -1
- package/package.json +9 -9
- package/src/generators/CronGenerator.ts +6 -2
- package/src/generators/EndpointGenerator.ts +0 -13
- package/src/generators/FunctionGenerator.ts +0 -1
- package/src/generators/__tests__/CronGenerator.spec.ts +14 -7
- package/src/generators/__tests__/EndpointGenerator.spec.ts +2 -80
- package/src/generators/__tests__/FunctionGenerator.spec.ts +0 -20
- package/src/init/versions.ts +19 -19
- package/dist/openapi-BlIiUahn.mjs.map +0 -1
- package/dist/openapi-C-YgZHyd.cjs.map +0 -1
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-
|
|
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.
|
|
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
|
|
391
|
+
schedule,
|
|
390
392
|
timeout: construct.timeout,
|
|
391
393
|
memorySize: construct.memorySize,
|
|
392
394
|
environment: await construct.getEnvironment({ markOptional: context.markOptional }),
|
|
393
|
-
|
|
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.
|
|
6947
|
-
"@geekmidas/auth": "~9.
|
|
6948
|
-
"@geekmidas/cache": "~9.
|
|
6949
|
-
"@geekmidas/client": "~9.
|
|
6950
|
-
"@geekmidas/cloud": "~9.
|
|
6951
|
-
"@geekmidas/constructs": "~9.
|
|
6952
|
-
"@geekmidas/db": "~9.
|
|
6953
|
-
"@geekmidas/emailkit": "~9.
|
|
6954
|
-
"@geekmidas/envkit": "~9.
|
|
6955
|
-
"@geekmidas/errors": "~9.
|
|
6956
|
-
"@geekmidas/events": "~9.
|
|
6957
|
-
"@geekmidas/logger": "~9.
|
|
6958
|
-
"@geekmidas/rate-limit": "~9.
|
|
6959
|
-
"@geekmidas/schema": "~9.
|
|
6960
|
-
"@geekmidas/services": "~9.
|
|
6961
|
-
"@geekmidas/storage": "~9.
|
|
6962
|
-
"@geekmidas/studio": "~9.
|
|
6963
|
-
"@geekmidas/telescope": "~9.
|
|
6964
|
-
"@geekmidas/testkit": "~9.
|
|
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
|
|