@geekmidas/cli 10.0.0-alpha.35 → 10.0.0-alpha.36

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.cjs CHANGED
@@ -5,7 +5,7 @@ const require_discover = require("./discover-CroTIm0K.cjs");
5
5
  const require_config = require("./config-DgAHy8nY.cjs");
6
6
  const require_workspace = require("./workspace-CAJk6UmC.cjs");
7
7
  const require_storage = require("./storage-C2JC31V9.cjs");
8
- const require_workspace$1 = require("./workspace-CRjZkCTW.cjs");
8
+ const require_workspace$1 = require("./workspace-C0X8xSXV.cjs");
9
9
  const require_OpenApiTsGenerator = require("./OpenApiTsGenerator-D1nhN98m.cjs");
10
10
  const require_openapi = require("./openapi.cjs");
11
11
  const require_ready = require("./ready-CXhoutix.cjs");
@@ -42,7 +42,7 @@ let _geekmidas_constructs_subscribers = require("@geekmidas/constructs/subscribe
42
42
  let _geekmidas_constructs_topic = require("@geekmidas/constructs/topic");
43
43
  let node_dns_promises = require("node:dns/promises");
44
44
  //#region package.json
45
- var version = "10.0.0-alpha.35";
45
+ var version = "10.0.0-alpha.36";
46
46
  //#endregion
47
47
  //#region src/auth/credentials.ts
48
48
  /**
@@ -1092,9 +1092,9 @@ async function workspaceDevCommand(workspace, options) {
1092
1092
  ...reconciled.env
1093
1093
  };
1094
1094
  if (options.migrate || options.seed) {
1095
- const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-nlvT-GnY.cjs"));
1095
+ const { prepareDevDatabases } = await Promise.resolve().then(() => require("./migrate-BsW4xBEO.cjs"));
1096
1096
  await prepareDevDatabases(workspace, reconciled.env, { seed: !!options.seed });
1097
- } else await Promise.resolve().then(() => require("./migrate-nlvT-GnY.cjs")).then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
1097
+ } else await Promise.resolve().then(() => require("./migrate-BsW4xBEO.cjs")).then(({ reportPendingMigrations }) => reportPendingMigrations(workspace, reconciled.env)).catch((error) => {
1098
1098
  logger$10.log(`⚠️ Could not check for pending migrations: ${error instanceof Error ? error.message : String(error)}`);
1099
1099
  });
1100
1100
  const appUrls = {};
@@ -8809,26 +8809,26 @@ function loadPackageJson() {
8809
8809
  * Run: pnpm --filter @geekmidas/cli sync-versions
8810
8810
  */
8811
8811
  const GEEKMIDAS_VERSIONS = {
8812
- "@geekmidas/audit": "~10.0.0-alpha.35",
8813
- "@geekmidas/auth": "~10.0.0-alpha.35",
8814
- "@geekmidas/cache": "~10.0.0-alpha.35",
8815
- "@geekmidas/client": "~10.0.0-alpha.35",
8816
- "@geekmidas/cloud": "~10.0.0-alpha.35",
8817
- "@geekmidas/constructs": "~10.0.0-alpha.35",
8818
- "@geekmidas/db": "~10.0.0-alpha.35",
8819
- "@geekmidas/emailkit": "~10.0.0-alpha.35",
8820
- "@geekmidas/envkit": "~10.0.0-alpha.35",
8821
- "@geekmidas/errors": "~10.0.0-alpha.35",
8822
- "@geekmidas/events": "~10.0.0-alpha.35",
8823
- "@geekmidas/logger": "~10.0.0-alpha.35",
8824
- "@geekmidas/manifest": "~10.0.0-alpha.35",
8825
- "@geekmidas/rate-limit": "~10.0.0-alpha.35",
8826
- "@geekmidas/schema": "~10.0.0-alpha.35",
8827
- "@geekmidas/services": "~10.0.0-alpha.35",
8828
- "@geekmidas/storage": "~10.0.0-alpha.35",
8829
- "@geekmidas/studio": "~10.0.0-alpha.35",
8830
- "@geekmidas/telescope": "~10.0.0-alpha.35",
8831
- "@geekmidas/testkit": "~10.0.0-alpha.35",
8812
+ "@geekmidas/audit": "~10.0.0-alpha.36",
8813
+ "@geekmidas/auth": "~10.0.0-alpha.36",
8814
+ "@geekmidas/cache": "~10.0.0-alpha.36",
8815
+ "@geekmidas/client": "~10.0.0-alpha.36",
8816
+ "@geekmidas/cloud": "~10.0.0-alpha.36",
8817
+ "@geekmidas/constructs": "~10.0.0-alpha.36",
8818
+ "@geekmidas/db": "~10.0.0-alpha.36",
8819
+ "@geekmidas/emailkit": "~10.0.0-alpha.36",
8820
+ "@geekmidas/envkit": "~10.0.0-alpha.36",
8821
+ "@geekmidas/errors": "~10.0.0-alpha.36",
8822
+ "@geekmidas/events": "~10.0.0-alpha.36",
8823
+ "@geekmidas/logger": "~10.0.0-alpha.36",
8824
+ "@geekmidas/manifest": "~10.0.0-alpha.36",
8825
+ "@geekmidas/rate-limit": "~10.0.0-alpha.36",
8826
+ "@geekmidas/schema": "~10.0.0-alpha.36",
8827
+ "@geekmidas/services": "~10.0.0-alpha.36",
8828
+ "@geekmidas/storage": "~10.0.0-alpha.36",
8829
+ "@geekmidas/studio": "~10.0.0-alpha.36",
8830
+ "@geekmidas/telescope": "~10.0.0-alpha.36",
8831
+ "@geekmidas/testkit": "~10.0.0-alpha.36",
8832
8832
  "@geekmidas/cli": `~${loadPackageJson().version}`
8833
8833
  };
8834
8834
  //#endregion
@@ -9607,9 +9607,7 @@ import { EnvironmentParser } from '@geekmidas/envkit';
9607
9607
  * \`MobileApp\` construct's \`.dependsOn([api, auth])\` is where every value
9608
9608
  * here comes from, so none of it is written down.
9609
9609
  *
9610
- * - \`APP_SCHEME\`: the URL scheme for this stage — \`${scheme}\` deployed,
9611
- * \`${scheme}-dev\` locally, so a development build and the store build on
9612
- * one phone never answer each other's links.
9610
+ * - \`APP_SCHEME\`: the URL scheme — \`${scheme}\`, the same on every stage.
9613
9611
  * - \`EXPO_PUBLIC_API_URL\` / \`EXPO_PUBLIC_AUTH_URL\`: where the servers
9614
9612
  * answer. Locally that is their own port on \`localhost\`, which
9615
9613
  * \`config.ts\` points at the machine Metro was served from.
@@ -10920,7 +10918,7 @@ export const authDb = database.schema<Record<string, never>, 'AuthDb'>('AuthDb')
10920
10918
  files.push(usersMigration());
10921
10919
  files.push({
10922
10920
  path: "constructs/auth.ts",
10923
- content: `import { BetterAuth } from '@geekmidas/constructs/auth';
10921
+ content: `${frontendFramework === "expo" ? "import { expo } from '@better-auth/expo';\n" : ""}import { BetterAuth } from '@geekmidas/constructs/auth';
10924
10922
  import { authDb } from './database.ts';
10925
10923
 
10926
10924
  /**
@@ -10935,7 +10933,11 @@ import { authDb } from './database.ts';
10935
10933
  export const auth = new BetterAuth('Auth', {
10936
10934
  path: 'apps/auth',
10937
10935
  database: authDb,
10938
- basePath: '/api/auth',
10936
+ basePath: '/api/auth',${frontendFramework === "expo" ? `
10937
+ // The mobile app signs in through Better Auth's Expo plugin: it sends its
10938
+ // scheme as the origin, and this is what reads it. The construct refuses to
10939
+ // start without it once a MobileApp depends on this server.
10940
+ options: { plugins: [expo()] },` : ""}
10939
10941
  });
10940
10942
  `
10941
10943
  });
@@ -10974,7 +10976,7 @@ import { auth } from './auth.ts';
10974
10976
  * The mobile app — a construct like a site, which is what makes it an app.
10975
10977
  *
10976
10978
  * \`.dependsOn()\` is the single fact behind what a mobile app otherwise has
10977
- * written down by hand: its API and auth URLs, its URL scheme per stage, the
10979
+ * written down by hand: its API and auth URLs, its URL scheme, the
10978
10980
  * scheme in the auth server's trusted origins, Better Auth's Expo plugin, and
10979
10981
  * sign-in links a phone can open.
10980
10982
  */
@@ -15158,7 +15160,7 @@ var NoStoredSecrets = class extends Error {
15158
15160
  }
15159
15161
  };
15160
15162
  async function reconcile(secrets, workspace, stage) {
15161
- const { derivedContainers } = await Promise.resolve().then(() => require("./workspace-CRjZkCTW.cjs")).then((n) => n.workspace_exports);
15163
+ const { derivedContainers } = await Promise.resolve().then(() => require("./workspace-C0X8xSXV.cjs")).then((n) => n.workspace_exports);
15162
15164
  const result = require_reconcile.reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
15163
15165
  return result ? {
15164
15166
  secrets: result.secrets,
@@ -15557,7 +15559,7 @@ async function testCommand(options = {}) {
15557
15559
  * starts without the reference data the app needs.
15558
15560
  */
15559
15561
  async function migrateTestStage(workspace, env) {
15560
- const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-nlvT-GnY.cjs"));
15562
+ const { migrateAndSeed } = await Promise.resolve().then(() => require("./migrate-BsW4xBEO.cjs"));
15561
15563
  const { discover } = await Promise.resolve().then(() => require("./discover-CroTIm0K.cjs")).then((n) => n.discover_exports);
15562
15564
  const sources = {};
15563
15565
  const manifest = await discover({
@@ -16002,7 +16004,7 @@ program.command("migrate").description("Apply each database construct's migratio
16002
16004
  try {
16003
16005
  const globalOptions = program.opts();
16004
16006
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
16005
- const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-nlvT-GnY.cjs"));
16007
+ const { migrateCommand } = await Promise.resolve().then(() => require("./migrate-BsW4xBEO.cjs"));
16006
16008
  await migrateCommand({
16007
16009
  ...options,
16008
16010
  ...construct ? { construct } : {}
@@ -16016,7 +16018,7 @@ program.command("seed").description("Migrate, then run each database construct's
16016
16018
  try {
16017
16019
  const globalOptions = program.opts();
16018
16020
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
16019
- const { seedCommand } = await Promise.resolve().then(() => require("./migrate-nlvT-GnY.cjs"));
16021
+ const { seedCommand } = await Promise.resolve().then(() => require("./migrate-BsW4xBEO.cjs"));
16020
16022
  await seedCommand({
16021
16023
  ...options,
16022
16024
  ...construct ? { construct } : {}
@@ -16030,7 +16032,7 @@ program.command("migration").description("Write a construct's next migration: an
16030
16032
  try {
16031
16033
  const globalOptions = program.opts();
16032
16034
  if (globalOptions.cwd) process.chdir(globalOptions.cwd);
16033
- const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-nlvT-GnY.cjs"));
16035
+ const { migrationCommand } = await Promise.resolve().then(() => require("./migrate-BsW4xBEO.cjs"));
16034
16036
  await migrationCommand({
16035
16037
  construct,
16036
16038
  ...name ? { name } : {}
@@ -16198,7 +16200,7 @@ program.command("secrets:reconcile").description("Backfill missing custom secret
16198
16200
  console.error(`No secrets found for stage "${stage}". Run "gkm secrets:init --stage ${stage}" first.`);
16199
16201
  process.exit(1);
16200
16202
  }
16201
- const { derivedContainers } = await Promise.resolve().then(() => require("./workspace-CRjZkCTW.cjs")).then((n) => n.workspace_exports);
16203
+ const { derivedContainers } = await Promise.resolve().then(() => require("./workspace-C0X8xSXV.cjs")).then((n) => n.workspace_exports);
16202
16204
  const result = reconcileMissingSecrets(secrets, workspace, await derivedContainers(workspace, stage));
16203
16205
  if (!result) {
16204
16206
  console.log(`\n✓ Secrets for stage "${stage}" are up-to-date`);