everything-dev 1.27.0 → 1.28.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 (104) hide show
  1. package/dist/cli/infra.cjs +1 -1
  2. package/dist/cli/infra.mjs +1 -1
  3. package/dist/cli/init.cjs +7 -9
  4. package/dist/cli/init.cjs.map +1 -1
  5. package/dist/cli/init.d.cts +1 -1
  6. package/dist/cli/init.d.cts.map +1 -1
  7. package/dist/cli/init.d.mts +1 -1
  8. package/dist/cli/init.d.mts.map +1 -1
  9. package/dist/cli/init.mjs +7 -9
  10. package/dist/cli/init.mjs.map +1 -1
  11. package/dist/cli/prompts.cjs +28 -24
  12. package/dist/cli/prompts.cjs.map +1 -1
  13. package/dist/cli/prompts.mjs +27 -24
  14. package/dist/cli/prompts.mjs.map +1 -1
  15. package/dist/cli/sync.cjs +4 -1
  16. package/dist/cli/sync.cjs.map +1 -1
  17. package/dist/cli/sync.mjs +4 -1
  18. package/dist/cli/sync.mjs.map +1 -1
  19. package/dist/cli.cjs +187 -12
  20. package/dist/cli.cjs.map +1 -1
  21. package/dist/cli.mjs +186 -11
  22. package/dist/cli.mjs.map +1 -1
  23. package/dist/contract.cjs +1 -1
  24. package/dist/contract.cjs.map +1 -1
  25. package/dist/contract.d.cts +38 -34
  26. package/dist/contract.d.cts.map +1 -1
  27. package/dist/contract.d.mts +38 -34
  28. package/dist/contract.d.mts.map +1 -1
  29. package/dist/contract.mjs +1 -0
  30. package/dist/contract.mjs.map +1 -1
  31. package/dist/dev-session.cjs +0 -1
  32. package/dist/dev-session.mjs +1 -1
  33. package/dist/index.cjs +0 -2
  34. package/dist/index.d.cts +2 -2
  35. package/dist/index.d.mts +2 -2
  36. package/dist/index.mjs +0 -1
  37. package/dist/near-cli.cjs +1 -1
  38. package/dist/near-cli.mjs +1 -1
  39. package/dist/orchestrator.cjs +1 -1
  40. package/dist/orchestrator.mjs +1 -1
  41. package/dist/plugin.cjs +163 -139
  42. package/dist/plugin.cjs.map +1 -1
  43. package/dist/plugin.d.cts +67 -34
  44. package/dist/plugin.d.cts.map +1 -1
  45. package/dist/plugin.d.mts +66 -34
  46. package/dist/plugin.d.mts.map +1 -1
  47. package/dist/plugin.mjs +153 -130
  48. package/dist/plugin.mjs.map +1 -1
  49. package/dist/service-descriptor.d.cts +34 -0
  50. package/dist/service-descriptor.d.cts.map +1 -0
  51. package/dist/service-descriptor.d.mts +36 -0
  52. package/dist/service-descriptor.d.mts.map +1 -0
  53. package/dist/types.d.cts +2 -2
  54. package/dist/types.d.mts +2 -2
  55. package/package.json +2 -2
  56. package/src/api-contract.ts +0 -623
  57. package/src/app.ts +0 -193
  58. package/src/cli/catalog.ts +0 -49
  59. package/src/cli/framework-version.ts +0 -61
  60. package/src/cli/help.ts +0 -13
  61. package/src/cli/infra.ts +0 -190
  62. package/src/cli/init.ts +0 -1145
  63. package/src/cli/parse.ts +0 -147
  64. package/src/cli/prompts.ts +0 -135
  65. package/src/cli/snapshot.ts +0 -46
  66. package/src/cli/status.ts +0 -99
  67. package/src/cli/sync.ts +0 -429
  68. package/src/cli/timing.ts +0 -63
  69. package/src/cli/upgrade.ts +0 -869
  70. package/src/cli.ts +0 -516
  71. package/src/components/dev-view.tsx +0 -352
  72. package/src/components/streaming-view.ts +0 -177
  73. package/src/config.ts +0 -893
  74. package/src/contract.meta.ts +0 -140
  75. package/src/contract.ts +0 -326
  76. package/src/dev-logs.ts +0 -92
  77. package/src/dev-session.ts +0 -283
  78. package/src/fastkv.ts +0 -181
  79. package/src/index.ts +0 -8
  80. package/src/integrity.ts +0 -138
  81. package/src/internal/manifest-normalizer.ts +0 -290
  82. package/src/merge.ts +0 -187
  83. package/src/mf.ts +0 -147
  84. package/src/near-cli.ts +0 -259
  85. package/src/network.ts +0 -3
  86. package/src/orchestrator.ts +0 -493
  87. package/src/plugin.ts +0 -1799
  88. package/src/sdk.ts +0 -14
  89. package/src/service-descriptor.ts +0 -281
  90. package/src/shared.ts +0 -249
  91. package/src/sidebar.ts +0 -140
  92. package/src/types.ts +0 -330
  93. package/src/ui/head.ts +0 -83
  94. package/src/ui/index.ts +0 -5
  95. package/src/ui/metadata.ts +0 -95
  96. package/src/ui/router.ts +0 -88
  97. package/src/ui/runtime.ts +0 -42
  98. package/src/ui/types.ts +0 -65
  99. package/src/utils/banner.ts +0 -21
  100. package/src/utils/linkify.ts +0 -11
  101. package/src/utils/path-match.ts +0 -16
  102. package/src/utils/run.ts +0 -31
  103. package/src/utils/save-config.ts +0 -20
  104. package/src/utils/theme.ts +0 -39
package/dist/plugin.mjs CHANGED
@@ -3,32 +3,67 @@ import { getNetworkIdForAccount } from "./network.mjs";
3
3
  import { buildRuntimePluginsForConfig, findConfigPath, getHostDevelopmentPort, getProjectRoot, loadConfig, resolveLocalDevelopmentPath, writeResolvedConfig } from "./config.mjs";
4
4
  import { createPlugin, z } from "./sdk.mjs";
5
5
  import { bosContract } from "./contract.mjs";
6
+ import { writePluginSidebarGen } from "./sidebar.mjs";
7
+ import { computeSriHashForUrl } from "./integrity.mjs";
6
8
  import { syncApiContractBridge } from "./api-contract.mjs";
7
9
  import { buildRuntimeConfig, detectLocalPackages, prepareDevelopmentRuntimeConfig } from "./app.mjs";
8
10
  import { ensureEnvFile, writeGeneratedInfra } from "./cli/infra.mjs";
9
11
  import { saveBosConfig } from "./utils/save-config.mjs";
10
- import { buildInitPatterns, copyFilteredFiles, detectGitRemoteUrl, fetchParentConfig, generateDatabaseMigrations, personalizeConfig, removeInitLockfile, resolveSourceDir, runBunInstall, runDockerComposeUp, runTypesGen, scaffoldMinimalProject, stripOrphanedWorkspacesFromLockfile, writeInitSnapshot } from "./cli/init.mjs";
11
- import { promptInitOptions } from "./cli/prompts.mjs";
12
+ import { buildInitPatterns, copyFilteredFiles, detectGitRemoteUrl, fetchParentConfig, generateDatabaseMigrations, personalizeConfig, removeInitLockfile, resolveSourceDir, runBunInstall, runTypesGen, scaffoldMinimalProject, stripOrphanedWorkspacesFromLockfile, writeInitSnapshot } from "./cli/init.mjs";
12
13
  import { getStatus } from "./cli/status.mjs";
13
14
  import { syncTemplate } from "./cli/sync.mjs";
14
- import { timePhase } from "./cli/timing.mjs";
15
15
  import { upgradeTemplate } from "./cli/upgrade.mjs";
16
- import { computeSriHashForUrl } from "./integrity.mjs";
17
16
  import { addFunctionCallAccessKey, ensureNearCli, executeTransaction } from "./near-cli.mjs";
18
17
  import { buildDescription, buildServiceDescriptorMap } from "./service-descriptor.mjs";
19
18
  import { syncAndGenerateSharedUi } from "./shared.mjs";
20
- import { writePluginSidebarGen } from "./sidebar.mjs";
21
19
  import { run } from "./utils/run.mjs";
22
- import { colors } from "./utils/theme.mjs";
23
20
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
24
21
  import { basename, dirname, join, resolve } from "node:path";
22
+ import { EventEmitter } from "node:events";
25
23
  import process from "node:process";
26
- import * as p from "@clack/prompts";
27
24
  import { Effect } from "effect";
28
25
 
29
26
  //#region src/plugin.ts
30
- async function loadDevSession() {
31
- return import("./dev-session.mjs");
27
+ const pluginEvents = new EventEmitter();
28
+ let pendingSession = null;
29
+ let pendingStartSummary = null;
30
+ function consumeDevSession() {
31
+ const data = pendingSession;
32
+ const summary = pendingStartSummary;
33
+ pendingSession = null;
34
+ pendingStartSummary = null;
35
+ if (!data) return null;
36
+ return summary ? {
37
+ ...data,
38
+ summary
39
+ } : data;
40
+ }
41
+ async function timePhase(timings, name, fn) {
42
+ pluginEvents.emit("progress", {
43
+ phase: name,
44
+ status: "running"
45
+ });
46
+ const startedAt = Date.now();
47
+ try {
48
+ const result = await fn();
49
+ timings.push({
50
+ name,
51
+ durationMs: Date.now() - startedAt
52
+ });
53
+ pluginEvents.emit("progress", {
54
+ phase: name,
55
+ status: "done",
56
+ durationMs: Date.now() - startedAt
57
+ });
58
+ return result;
59
+ } catch (error) {
60
+ pluginEvents.emit("progress", {
61
+ phase: name,
62
+ status: "error",
63
+ durationMs: Date.now() - startedAt
64
+ });
65
+ throw error;
66
+ }
32
67
  }
33
68
  const buildCommands = {
34
69
  host: {
@@ -435,6 +470,10 @@ var plugin_default = createPlugin({
435
470
  }),
436
471
  dev: builder.dev.handler(async ({ input }) => {
437
472
  ensureEnvFile(deps.configDir);
473
+ pluginEvents.emit("progress", {
474
+ phase: "config",
475
+ status: "running"
476
+ });
438
477
  const localPackages = detectLocalPackages(deps.bosConfig ?? void 0, deps.runtimeConfig ?? void 0);
439
478
  const hostSource = localPackages.includes("host") ? parseSourceMode(input.host, "local") : "remote";
440
479
  const uiSource = localPackages.includes("ui") ? parseSourceMode(input.ui, "local") : "remote";
@@ -447,9 +486,41 @@ var plugin_default = createPlugin({
447
486
  hostMode: hostSource,
448
487
  bosConfig: deps.bosConfig ?? void 0,
449
488
  extendsChain: []
450
- })).catalogChanged) await run("bun", ["install"], { cwd: deps.configDir });
451
- if (apiSource === "local" && !proxy || localPackages.some((pkg) => pkg.startsWith("plugin:"))) await buildEveryPluginQuietly(deps.configDir);
489
+ })).catalogChanged) {
490
+ pluginEvents.emit("progress", {
491
+ phase: "install",
492
+ status: "running"
493
+ });
494
+ await run("bun", ["install"], { cwd: deps.configDir });
495
+ pluginEvents.emit("progress", {
496
+ phase: "install",
497
+ status: "done"
498
+ });
499
+ }
500
+ if (apiSource === "local" && !proxy || localPackages.some((pkg) => pkg.startsWith("plugin:"))) {
501
+ pluginEvents.emit("progress", {
502
+ phase: "build plugin",
503
+ status: "running"
504
+ });
505
+ await buildEveryPluginQuietly(deps.configDir);
506
+ pluginEvents.emit("progress", {
507
+ phase: "build plugin",
508
+ status: "done"
509
+ });
510
+ }
511
+ pluginEvents.emit("progress", {
512
+ phase: "build",
513
+ status: "running"
514
+ });
452
515
  await buildEverythingDevQuietly(deps.configDir);
516
+ pluginEvents.emit("progress", {
517
+ phase: "build",
518
+ status: "done"
519
+ });
520
+ pluginEvents.emit("progress", {
521
+ phase: "config",
522
+ status: "done"
523
+ });
453
524
  const refreshed = await loadConfig({ cwd: deps.configDir });
454
525
  deps.bosConfig = refreshed?.config ?? deps.bosConfig;
455
526
  deps.runtimeConfig = refreshed?.runtime ?? deps.runtimeConfig;
@@ -497,8 +568,11 @@ var plugin_default = createPlugin({
497
568
  port: runtimeConfig.host.port,
498
569
  interactive: input.interactive
499
570
  };
500
- const { devApp } = await loadDevSession();
501
- devApp(orchestrator, services, runtimeConfig);
571
+ pendingSession = {
572
+ orchestrator,
573
+ services,
574
+ runtimeConfig
575
+ };
502
576
  return {
503
577
  status: "started",
504
578
  description: orchestrator.description,
@@ -507,6 +581,10 @@ var plugin_default = createPlugin({
507
581
  }),
508
582
  start: builder.start.handler(async ({ input }) => {
509
583
  ensureEnvFile(deps.configDir);
584
+ pluginEvents.emit("progress", {
585
+ phase: "config",
586
+ status: "running"
587
+ });
510
588
  const account = input.account ?? process.env.BOS_ACCOUNT;
511
589
  const domain = input.domain ?? process.env.BOS_GATEWAY;
512
590
  let config = null;
@@ -541,10 +619,18 @@ var plugin_default = createPlugin({
541
619
  env: "production",
542
620
  plugins: runtimePlugins
543
621
  });
622
+ pluginEvents.emit("progress", {
623
+ phase: "generate artifacts",
624
+ status: "running"
625
+ });
544
626
  await generateCodeArtifacts(deps.configDir, config, {
545
627
  env: "production",
546
628
  runtimeConfig
547
629
  });
630
+ pluginEvents.emit("progress", {
631
+ phase: "generate artifacts",
632
+ status: "done"
633
+ });
548
634
  const productionEnv = {};
549
635
  const warnings = [];
550
636
  if (!process.env.CORS_ORIGIN && config.domain) {
@@ -564,32 +650,40 @@ var plugin_default = createPlugin({
564
650
  if (missingSecrets.length > 0) warnings.push(`Missing ${missingSecrets.length} secret(s): ${missingSecrets.join(", ")}`);
565
651
  const services = buildServiceDescriptorMap(runtimeConfig);
566
652
  const stagingEnvVars = isStaging ? { BOS_GATEWAY: config.staging?.domain ?? config.domain ?? "" } : {};
567
- const configSource = remoteConfig ? `bos://${account}/${domain}` : findConfigPath() ?? "bos.config.json";
568
- const configSourceHttp = remoteConfig && account && domain ? buildRegistryConfigUrl(account, domain) : void 0;
569
- const summaryLines = ["", ` ${colors.dim("Config Source:")} ${configSource}`];
570
- if (configSourceHttp) summaryLines.push(` ${colors.dim(configSourceHttp)}`);
571
- summaryLines.push(` ${colors.dim("Account:")} ${config.account}`, ` ${colors.dim("Domain:")} ${config.domain ?? "not configured"}`, "", ` ${colors.dim("Modules:")}`, ` ${colors.dim("HOST")} → ${runtimeConfig.host.remoteUrl ?? runtimeConfig.host.url ?? "local"}`, ` ${colors.dim("UI")} → ${runtimeConfig.ui.url ?? "local"}`, ` ${colors.dim("API")} → ${runtimeConfig.api.url ?? "local"}`);
572
- if (runtimeConfig.auth) summaryLines.push(` ${colors.dim("AUTH")} → ${runtimeConfig.auth.url ?? "local"}`);
573
- if (warnings.length > 0) {
574
- summaryLines.push("");
575
- for (const w of warnings) summaryLines.push(` ${colors.yellow(w)}`);
576
- }
577
- summaryLines.push("");
578
- console.log(summaryLines.join("\n"));
579
- const orchestrator = {
580
- packages: ["host"],
581
- env: {
582
- NODE_ENV: "production",
583
- ...productionEnv,
584
- ...stagingEnvVars
653
+ const summary = {
654
+ configSource: remoteConfig ? `bos://${account}/${domain}` : findConfigPath() ?? "bos.config.json",
655
+ configSourceHttp: remoteConfig && account && domain ? buildRegistryConfigUrl(account, domain) : void 0,
656
+ account: config.account,
657
+ domain: config.domain ?? void 0,
658
+ modules: {
659
+ host: runtimeConfig.host.remoteUrl ?? runtimeConfig.host.url ?? "local",
660
+ ui: runtimeConfig.ui.url ?? "local",
661
+ api: runtimeConfig.api.url ?? "local",
662
+ auth: runtimeConfig.auth?.url ?? void 0
585
663
  },
586
- description: `${isStaging ? "Staging" : "Production"} Mode (${config.account})`,
587
- port,
588
- interactive: input.interactive,
589
- noLogs: true
664
+ warnings
590
665
  };
591
- const { startApp } = await loadDevSession();
592
- startApp(orchestrator, services, runtimeConfig);
666
+ pendingSession = {
667
+ orchestrator: {
668
+ packages: ["host"],
669
+ env: {
670
+ NODE_ENV: "production",
671
+ ...productionEnv,
672
+ ...stagingEnvVars
673
+ },
674
+ description: `${isStaging ? "Staging" : "Production"} Mode (${config.account})`,
675
+ port,
676
+ interactive: input.interactive,
677
+ noLogs: true
678
+ },
679
+ services,
680
+ runtimeConfig
681
+ };
682
+ pendingStartSummary = summary;
683
+ pluginEvents.emit("progress", {
684
+ phase: "config",
685
+ status: "done"
686
+ });
593
687
  return {
594
688
  status: "running",
595
689
  url: `http://localhost:${port}`
@@ -779,8 +873,8 @@ var plugin_default = createPlugin({
779
873
  let extendsAccount = "";
780
874
  let extendsGateway = "";
781
875
  let directory = input.directory;
782
- let account = input.account;
783
- let domain = input.domain;
876
+ const account = input.account;
877
+ const domain = input.domain;
784
878
  let overrides = input.overrides;
785
879
  let plugins = input.plugins;
786
880
  if (input.extends) {
@@ -792,77 +886,22 @@ var plugin_default = createPlugin({
792
886
  }
793
887
  extendsAccount = extendsAccount || "dev.everything.near";
794
888
  extendsGateway = extendsGateway || "everything.dev";
795
- const s = p.spinner();
796
- s.start("Initializing project");
797
889
  let parentPluginKeys = [];
798
890
  let parentConfig = null;
799
891
  try {
800
- parentConfig = await timePhase(timings, "parent config", () => fetchParentConfig(extendsAccount, extendsGateway), s);
892
+ parentConfig = await timePhase(timings, "parent config", () => fetchParentConfig(extendsAccount, extendsGateway));
801
893
  if (parentConfig?.plugins && typeof parentConfig.plugins === "object") parentPluginKeys = Object.keys(parentConfig.plugins);
802
894
  } catch {}
803
- if (!input.noInteractive) {
804
- s.stop("Config fetched");
805
- const initialExtendsAccount = extendsAccount;
806
- const initialExtendsGateway = extendsGateway;
807
- const prompted = await promptInitOptions({
808
- extends: `bos://${extendsAccount}/${extendsGateway}`,
809
- directory,
810
- account,
811
- domain,
812
- plugins,
813
- overrides,
814
- parentPluginKeys
815
- });
816
- extendsAccount = prompted.extendsAccount;
817
- extendsGateway = prompted.extendsGateway;
818
- directory = prompted.directory;
819
- account = prompted.account;
820
- domain = prompted.domain;
821
- plugins = prompted.plugins;
822
- overrides = prompted.overrides;
823
- if (!parentConfig || prompted.extendsAccount !== initialExtendsAccount || prompted.extendsGateway !== initialExtendsGateway) {
824
- try {
825
- parentConfig = await timePhase(timings, "parent config", () => fetchParentConfig(prompted.extendsAccount, prompted.extendsGateway), s);
826
- if (parentConfig?.plugins && typeof parentConfig.plugins === "object") parentPluginKeys = Object.keys(parentConfig.plugins);
827
- else parentPluginKeys = [];
828
- } catch {
829
- return {
830
- status: "error",
831
- directory,
832
- extendsRef: `bos://${prompted.extendsAccount}/${prompted.extendsGateway}`,
833
- account,
834
- domain,
835
- extends: `bos://${prompted.extendsAccount}/${prompted.extendsGateway}`,
836
- plugins,
837
- overrides,
838
- filesCopied: 0,
839
- timings,
840
- error: `No config found at bos://${prompted.extendsAccount}/${prompted.extendsGateway} — are you sure this is the right parent?`
841
- };
842
- }
843
- s.stop("Config fetched");
844
- }
845
- if (typeof parentConfig?.title === "string" && parentConfig.title.trim() && typeof parentConfig.description === "string" && parentConfig.description.trim()) {
846
- const shouldContinue = await p.confirm({
847
- message: `You will be extending ${parentConfig.title} - ${parentConfig.description}. Continue?`,
848
- initialValue: true
849
- });
850
- if (p.isCancel(shouldContinue) || !shouldContinue) process.exit(0);
851
- }
852
- s.start("Setting up project");
853
- }
854
895
  overrides = overrides?.length ? overrides : ["ui", "api"];
855
- if (overrides.includes("plugins") && !plugins?.length) plugins = parentPluginKeys;
896
+ if (overrides.includes("plugins") && plugins === void 0) plugins = parentPluginKeys;
856
897
  plugins = plugins ?? [];
857
898
  directory = directory || domain || extendsGateway;
858
899
  const targetDir = resolve(directory);
859
900
  const extendsRef = `bos://${extendsAccount}/${extendsGateway}`;
860
- if (overrides.includes("plugins") && !plugins.length) {}
861
901
  const repository = await detectGitRemoteUrl(process.cwd()).catch(() => void 0) ?? parentConfig?.repository;
862
902
  if (!parentConfig) try {
863
- parentConfig = await timePhase(timings, "parent config", () => fetchParentConfig(extendsAccount, extendsGateway), s);
903
+ parentConfig = await timePhase(timings, "parent config", () => fetchParentConfig(extendsAccount, extendsGateway));
864
904
  } catch {
865
- s.stop("Failed");
866
905
  return {
867
906
  status: "error",
868
907
  directory,
@@ -881,7 +920,7 @@ var plugin_default = createPlugin({
881
920
  extendsAccount,
882
921
  extendsGateway,
883
922
  source: input.source
884
- }), s);
923
+ }));
885
924
  parentConfig = resolvedParentConfig;
886
925
  const isMinimalScaffold = sourceDir === "";
887
926
  try {
@@ -897,7 +936,7 @@ var plugin_default = createPlugin({
897
936
  repository,
898
937
  title: parentConfig?.title,
899
938
  description: parentConfig?.description
900
- }), s);
939
+ }));
901
940
  await timePhase(timings, "personalize config", () => personalizeConfig(targetDir, {
902
941
  extendsAccount,
903
942
  extendsGateway,
@@ -911,13 +950,13 @@ var plugin_default = createPlugin({
911
950
  description: parentConfig?.description,
912
951
  testnet: parentConfig?.testnet,
913
952
  staging: parentConfig?.staging
914
- }), s);
953
+ }));
915
954
  } else {
916
955
  const patterns = buildInitPatterns(overrides, plugins);
917
956
  filesCopied = await timePhase(timings, "copy files", () => copyFilteredFiles(sourceDir, targetDir, patterns, {
918
957
  overrides,
919
958
  plugins
920
- }), s);
959
+ }));
921
960
  await timePhase(timings, "personalize config", () => personalizeConfig(targetDir, {
922
961
  extendsAccount,
923
962
  extendsGateway,
@@ -931,45 +970,28 @@ var plugin_default = createPlugin({
931
970
  description: parentConfig?.description,
932
971
  testnet: parentConfig?.testnet,
933
972
  staging: parentConfig?.staging
934
- }), s);
973
+ }));
935
974
  await timePhase(timings, "write snapshot", () => writeInitSnapshot(targetDir, extendsAccount, extendsGateway, sourceDir, patterns, {
936
975
  overrides,
937
976
  plugins
938
- }), s);
977
+ }));
939
978
  }
940
979
  const lockfilePath = join(targetDir, "bun.lock");
941
980
  stripOrphanedWorkspacesFromLockfile(lockfilePath, computeAllowedWorkspaces(overrides, plugins));
942
981
  removeInitLockfile(lockfilePath);
943
- const initConfig = await timePhase(timings, "resolve config", () => loadConfig({ cwd: targetDir }), s);
982
+ const initConfig = await timePhase(timings, "resolve config", () => loadConfig({ cwd: targetDir }));
944
983
  if (initConfig?.runtime) await timePhase(timings, "generate env/docker", async () => {
945
984
  writeGeneratedInfra(targetDir, initConfig.runtime);
946
- }, s);
985
+ });
947
986
  await timePhase(timings, "create env file", async () => {
948
987
  ensureEnvFile(targetDir);
949
- }, s);
988
+ });
950
989
  if (!input.noInstall) {
951
- await timePhase(timings, "install dependencies", () => runBunInstall(targetDir, s ?? void 0));
952
- await timePhase(timings, "generate types", () => runTypesGen(targetDir, s ?? void 0));
953
- await timePhase(timings, "generate migrations", () => generateDatabaseMigrations(targetDir), s);
954
- }
955
- if (input.noInstall && initConfig?.config) await timePhase(timings, "generate code artifacts", () => generateCodeArtifacts(targetDir, initConfig.config), s);
956
- s.stop("Project initialized");
957
- if (!input.noInteractive) {
958
- if (await p.confirm({
959
- message: "Run docker compose up -d --wait?",
960
- initialValue: true
961
- }) === true) {
962
- const dockerSpinner = p.spinner();
963
- dockerSpinner.start("Starting Docker services");
964
- try {
965
- await timePhase(timings, "docker compose up", () => runDockerComposeUp(targetDir));
966
- dockerSpinner.stop("Docker services ready");
967
- } catch (error) {
968
- dockerSpinner.stop("Docker services not started");
969
- p.log.warn(`docker compose up -d --wait failed: ${error instanceof Error ? error.message : error}`);
970
- }
971
- }
990
+ await timePhase(timings, "install dependencies", () => runBunInstall(targetDir));
991
+ await timePhase(timings, "generate types", () => runTypesGen(targetDir));
992
+ await timePhase(timings, "generate migrations", () => generateDatabaseMigrations(targetDir));
972
993
  }
994
+ if (input.noInstall && initConfig?.config) await timePhase(timings, "generate code artifacts", () => generateCodeArtifacts(targetDir, initConfig.config));
973
995
  return {
974
996
  status: "initialized",
975
997
  directory,
@@ -980,7 +1002,8 @@ var plugin_default = createPlugin({
980
1002
  plugins,
981
1003
  overrides,
982
1004
  filesCopied,
983
- timings
1005
+ timings,
1006
+ targetDir
984
1007
  };
985
1008
  } finally {
986
1009
  await cleanup();
@@ -1155,10 +1178,10 @@ function computeAllowedWorkspaces(overrides, plugins) {
1155
1178
  if (section === "ui") workspaces.push("ui");
1156
1179
  if (section === "api") workspaces.push("api");
1157
1180
  }
1158
- if (plugins) for (const plugin of plugins) workspaces.push(`plugins/${plugin}`);
1181
+ if (plugins && plugins.length > 0) workspaces.push("plugins/*");
1159
1182
  return workspaces;
1160
1183
  }
1161
1184
 
1162
1185
  //#endregion
1163
- export { plugin_default as default };
1186
+ export { consumeDevSession, plugin_default as default, pluginEvents };
1164
1187
  //# sourceMappingURL=plugin.mjs.map