everything-dev 1.51.6 → 1.52.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 (99) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +0 -2
  2. package/dist/api-contract.cjs +61 -16
  3. package/dist/api-contract.cjs.map +1 -1
  4. package/dist/api-contract.mjs +60 -17
  5. package/dist/api-contract.mjs.map +1 -1
  6. package/dist/app.cjs +1 -1
  7. package/dist/app.cjs.map +1 -1
  8. package/dist/app.mjs +1 -1
  9. package/dist/app.mjs.map +1 -1
  10. package/dist/cli/db-doctor.cjs +1 -1
  11. package/dist/cli/db-doctor.cjs.map +1 -1
  12. package/dist/cli/db-doctor.mjs +1 -1
  13. package/dist/cli/db-repair.cjs +1 -1
  14. package/dist/cli/db-repair.cjs.map +1 -1
  15. package/dist/cli/db-repair.mjs +1 -1
  16. package/dist/cli/init.cjs +76 -52
  17. package/dist/cli/init.cjs.map +1 -1
  18. package/dist/cli/init.d.cts +15 -7
  19. package/dist/cli/init.d.cts.map +1 -1
  20. package/dist/cli/init.d.mts +15 -7
  21. package/dist/cli/init.d.mts.map +1 -1
  22. package/dist/cli/init.mjs +70 -47
  23. package/dist/cli/init.mjs.map +1 -1
  24. package/dist/cli/sync.cjs +34 -5
  25. package/dist/cli/sync.cjs.map +1 -1
  26. package/dist/cli/sync.mjs +35 -6
  27. package/dist/cli/sync.mjs.map +1 -1
  28. package/dist/cli/upgrade.cjs +151 -93
  29. package/dist/cli/upgrade.cjs.map +1 -1
  30. package/dist/cli/upgrade.mjs +138 -80
  31. package/dist/cli/upgrade.mjs.map +1 -1
  32. package/dist/cli/utils/helpers.cjs +25 -0
  33. package/dist/cli/utils/helpers.cjs.map +1 -0
  34. package/dist/cli/utils/helpers.mjs +23 -0
  35. package/dist/cli/utils/helpers.mjs.map +1 -0
  36. package/dist/cli.cjs +84 -72
  37. package/dist/cli.cjs.map +1 -1
  38. package/dist/cli.mjs +84 -72
  39. package/dist/cli.mjs.map +1 -1
  40. package/dist/code-artifacts.cjs +1 -1
  41. package/dist/code-artifacts.mjs +1 -1
  42. package/dist/config.cjs +44 -4
  43. package/dist/config.cjs.map +1 -1
  44. package/dist/config.d.cts +1 -1
  45. package/dist/config.d.cts.map +1 -1
  46. package/dist/config.d.mts +1 -1
  47. package/dist/config.d.mts.map +1 -1
  48. package/dist/config.mjs +44 -4
  49. package/dist/config.mjs.map +1 -1
  50. package/dist/contract.cjs +9 -4
  51. package/dist/contract.cjs.map +1 -1
  52. package/dist/contract.d.cts +23 -13
  53. package/dist/contract.d.cts.map +1 -1
  54. package/dist/contract.d.mts +23 -13
  55. package/dist/contract.d.mts.map +1 -1
  56. package/dist/contract.meta.cjs +2 -1
  57. package/dist/contract.meta.cjs.map +1 -1
  58. package/dist/contract.meta.d.cts +3 -0
  59. package/dist/contract.meta.d.mts +3 -0
  60. package/dist/contract.meta.mjs +2 -1
  61. package/dist/contract.meta.mjs.map +1 -1
  62. package/dist/contract.mjs +9 -4
  63. package/dist/contract.mjs.map +1 -1
  64. package/dist/dag.cjs +176 -0
  65. package/dist/dag.cjs.map +1 -0
  66. package/dist/dag.d.cts +24 -0
  67. package/dist/dag.d.cts.map +1 -0
  68. package/dist/dag.d.mts +24 -0
  69. package/dist/dag.d.mts.map +1 -0
  70. package/dist/dag.mjs +167 -0
  71. package/dist/dag.mjs.map +1 -0
  72. package/dist/index.cjs +2 -0
  73. package/dist/index.d.cts +2 -2
  74. package/dist/index.d.mts +2 -2
  75. package/dist/index.mjs +2 -2
  76. package/dist/infra/planner.cjs +1 -1
  77. package/dist/infra/planner.mjs +1 -1
  78. package/dist/infra/preflight.cjs +1 -1
  79. package/dist/infra/preflight.cjs.map +1 -1
  80. package/dist/infra/preflight.mjs +1 -1
  81. package/dist/infra/preflight.mjs.map +1 -1
  82. package/dist/near-cli.cjs +1 -1
  83. package/dist/near-cli.mjs +1 -1
  84. package/dist/plugin.cjs +27 -18
  85. package/dist/plugin.cjs.map +1 -1
  86. package/dist/plugin.d.cts +52 -6
  87. package/dist/plugin.d.mts +52 -6
  88. package/dist/plugin.mjs +28 -19
  89. package/dist/plugin.mjs.map +1 -1
  90. package/dist/types.cjs +41 -6
  91. package/dist/types.cjs.map +1 -1
  92. package/dist/types.d.cts +116 -1
  93. package/dist/types.d.cts.map +1 -1
  94. package/dist/types.d.mts +116 -1
  95. package/dist/types.d.mts.map +1 -1
  96. package/dist/types.mjs +40 -7
  97. package/dist/types.mjs.map +1 -1
  98. package/package.json +8 -2
  99. package/dist/_virtual/_rolldown/runtime.mjs +0 -32
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- import { ApiPluginConfig, ApiPluginConfigSchema, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigSchema, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, CiConfig, CiConfigSchema, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, PluginEntries, PluginEntryValue, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, RailwayCi, RailwayCiSchema, RuntimeConfig, RuntimeConfigSchema, RuntimeLineage, RuntimeLineageSchema, RuntimePluginConfig, RuntimePluginConfigSchema, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SourceMode, SourceModeSchema, UiConfig, UiConfigSchema } from "./types.cjs";
1
+ import { ApiPluginConfig, ApiPluginConfigSchema, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigSchema, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, CiConfig, CiConfigSchema, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, DependencyNodeKind, DependencyNodeKindSchema, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, PluginEntries, PluginEntryValue, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, RailwayCi, RailwayCiSchema, RuntimeConfig, RuntimeConfigSchema, RuntimeDependencyNode, RuntimeDependencyNodeSchema, RuntimeLineage, RuntimeLineageSchema, RuntimePluginConfig, RuntimePluginConfigSchema, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SourceMode, SourceModeSchema, UiConfig, UiConfigSchema } from "./types.cjs";
2
2
  import { BosConfigResult, BuildOptions, BuildOptionsSchema, BuildResultSchema, ConfigOptionsSchema, ConfigResultSchema, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DevOptions, DevOptionsSchema, DevResult, DevResultSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, OverrideSection, OverrideSectionSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginListResult, PluginListResultSchema, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract } from "./contract.cjs";
3
3
  import { BOS_CONFIG_ORDER, mergeBosConfigWithExtends, rebuildOrderedConfig, resolveExtendsRef } from "./merge.cjs";
4
4
  import { BuildRuntimeConfigOptions, ConfigResult, LocalConfigResult, RemoteConfigResult, ResolvedComposableReference, buildRuntimeConfig, buildRuntimePluginsForConfig, clearConfigCache, drainConfigWarnings, findConfigPath, getConfig, getHostDevelopmentPort, getProjectRoot, getResolvedConfigPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadBosConfig, loadGeneratedResolvedConfig, loadLocalConfig, loadRemoteConfig, loadResolvedConfig, parsePort, parseRuntimeOverrideTargets, readBosConfigForBuild, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resumeWarnings, suppressWarnings, writeResolvedConfig } from "./config.cjs";
5
5
  import { CliCommandMeta, cliCommandMeta } from "./contract.meta.cjs";
6
6
  import { NetworkId, PluginManifest, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, fetchBosConfigFromFastKv, fetchRemotePluginManifest, getFastKvBaseUrlForNetwork, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, parseBosUrl } from "./fastkv.cjs";
7
7
  import { AnyContractRouter, AnySchema, Context, Effect, Layer, LoadedPluginWithBinding, Plugin, PluginRuntime, Scope, createPlugin, createPluginRuntime, oc, z } from "./sdk.cjs";
8
- export { type AnyContractRouter, type AnySchema, ApiPluginConfig, ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigResult, BosConfigSchema, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, BuildOptions, BuildOptionsSchema, BuildResultSchema, BuildRuntimeConfigOptions, CiConfig, CiConfigSchema, CliCommandMeta, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, ConfigOptionsSchema, ConfigResult, ConfigResultSchema, Context, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DevOptions, DevOptionsSchema, DevResult, DevResultSchema, Effect, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, Layer, type LoadedPluginWithBinding, LocalConfigResult, NetworkId, OverrideSection, OverrideSectionSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, type Plugin, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginEntries, PluginEntryValue, PluginListResult, PluginListResultSchema, PluginManifest, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, PluginRuntime, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RailwayCi, RailwayCiSchema, RemoteConfigResult, ResolvedComposableReference, RuntimeConfig, RuntimeConfigSchema, RuntimeLineage, RuntimeLineageSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfig, RuntimePluginConfigSchema, Scope, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SourceMode, SourceModeSchema, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UiConfig, UiConfigSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimePluginsForConfig, clearConfigCache, cliCommandMeta, createPlugin, createPluginRuntime, drainConfigWarnings, fetchBosConfigFromFastKv, fetchRemotePluginManifest, findConfigPath, getConfig, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getProjectRoot, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadBosConfig, loadGeneratedResolvedConfig, loadLocalConfig, loadRemoteConfig, loadResolvedConfig, mergeBosConfigWithExtends, oc, parseBosUrl, parsePort, parseRuntimeOverrideTargets, readBosConfigForBuild, rebuildOrderedConfig, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resumeWarnings, suppressWarnings, writeResolvedConfig, z };
8
+ export { type AnyContractRouter, type AnySchema, ApiPluginConfig, ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigResult, BosConfigSchema, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, BuildOptions, BuildOptionsSchema, BuildResultSchema, BuildRuntimeConfigOptions, CiConfig, CiConfigSchema, CliCommandMeta, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, ConfigOptionsSchema, ConfigResult, ConfigResultSchema, Context, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DependencyNodeKind, DependencyNodeKindSchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DevOptions, DevOptionsSchema, DevResult, DevResultSchema, Effect, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, Layer, type LoadedPluginWithBinding, LocalConfigResult, NetworkId, OverrideSection, OverrideSectionSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, type Plugin, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginEntries, PluginEntryValue, PluginListResult, PluginListResultSchema, PluginManifest, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, PluginRuntime, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RailwayCi, RailwayCiSchema, RemoteConfigResult, ResolvedComposableReference, RuntimeConfig, RuntimeConfigSchema, RuntimeDependencyNode, RuntimeDependencyNodeSchema, RuntimeLineage, RuntimeLineageSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfig, RuntimePluginConfigSchema, Scope, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SourceMode, SourceModeSchema, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UiConfig, UiConfigSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimePluginsForConfig, clearConfigCache, cliCommandMeta, createPlugin, createPluginRuntime, drainConfigWarnings, fetchBosConfigFromFastKv, fetchRemotePluginManifest, findConfigPath, getConfig, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getProjectRoot, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadBosConfig, loadGeneratedResolvedConfig, loadLocalConfig, loadRemoteConfig, loadResolvedConfig, mergeBosConfigWithExtends, oc, parseBosUrl, parsePort, parseRuntimeOverrideTargets, readBosConfigForBuild, rebuildOrderedConfig, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resumeWarnings, suppressWarnings, writeResolvedConfig, z };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import { ApiPluginConfig, ApiPluginConfigSchema, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigSchema, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, CiConfig, CiConfigSchema, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, PluginEntries, PluginEntryValue, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, RailwayCi, RailwayCiSchema, RuntimeConfig, RuntimeConfigSchema, RuntimeLineage, RuntimeLineageSchema, RuntimePluginConfig, RuntimePluginConfigSchema, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SourceMode, SourceModeSchema, UiConfig, UiConfigSchema } from "./types.mjs";
1
+ import { ApiPluginConfig, ApiPluginConfigSchema, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigSchema, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, CiConfig, CiConfigSchema, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, DependencyNodeKind, DependencyNodeKindSchema, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, PluginEntries, PluginEntryValue, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, RailwayCi, RailwayCiSchema, RuntimeConfig, RuntimeConfigSchema, RuntimeDependencyNode, RuntimeDependencyNodeSchema, RuntimeLineage, RuntimeLineageSchema, RuntimePluginConfig, RuntimePluginConfigSchema, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SourceMode, SourceModeSchema, UiConfig, UiConfigSchema } from "./types.mjs";
2
2
  import { BosConfigResult, BuildOptions, BuildOptionsSchema, BuildResultSchema, ConfigOptionsSchema, ConfigResultSchema, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DevOptions, DevOptionsSchema, DevResult, DevResultSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, OverrideSection, OverrideSectionSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginListResult, PluginListResultSchema, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract } from "./contract.mjs";
3
3
  import { BOS_CONFIG_ORDER, mergeBosConfigWithExtends, rebuildOrderedConfig, resolveExtendsRef } from "./merge.mjs";
4
4
  import { BuildRuntimeConfigOptions, ConfigResult, LocalConfigResult, RemoteConfigResult, ResolvedComposableReference, buildRuntimeConfig, buildRuntimePluginsForConfig, clearConfigCache, drainConfigWarnings, findConfigPath, getConfig, getHostDevelopmentPort, getProjectRoot, getResolvedConfigPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadBosConfig, loadGeneratedResolvedConfig, loadLocalConfig, loadRemoteConfig, loadResolvedConfig, parsePort, parseRuntimeOverrideTargets, readBosConfigForBuild, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resumeWarnings, suppressWarnings, writeResolvedConfig } from "./config.mjs";
5
5
  import { CliCommandMeta, cliCommandMeta } from "./contract.meta.mjs";
6
6
  import { NetworkId, PluginManifest, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, fetchBosConfigFromFastKv, fetchRemotePluginManifest, getFastKvBaseUrlForNetwork, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, parseBosUrl } from "./fastkv.mjs";
7
7
  import { AnyContractRouter, AnySchema, Context, Effect, Layer, LoadedPluginWithBinding, Plugin, PluginRuntime, Scope, createPlugin, createPluginRuntime, oc, z } from "./sdk.mjs";
8
- export { type AnyContractRouter, type AnySchema, ApiPluginConfig, ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigResult, BosConfigSchema, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, BuildOptions, BuildOptionsSchema, BuildResultSchema, BuildRuntimeConfigOptions, CiConfig, CiConfigSchema, CliCommandMeta, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, ConfigOptionsSchema, ConfigResult, ConfigResultSchema, Context, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DevOptions, DevOptionsSchema, DevResult, DevResultSchema, Effect, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, Layer, type LoadedPluginWithBinding, LocalConfigResult, NetworkId, OverrideSection, OverrideSectionSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, type Plugin, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginEntries, PluginEntryValue, PluginListResult, PluginListResultSchema, PluginManifest, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, PluginRuntime, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RailwayCi, RailwayCiSchema, RemoteConfigResult, ResolvedComposableReference, RuntimeConfig, RuntimeConfigSchema, RuntimeLineage, RuntimeLineageSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfig, RuntimePluginConfigSchema, Scope, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SourceMode, SourceModeSchema, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UiConfig, UiConfigSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimePluginsForConfig, clearConfigCache, cliCommandMeta, createPlugin, createPluginRuntime, drainConfigWarnings, fetchBosConfigFromFastKv, fetchRemotePluginManifest, findConfigPath, getConfig, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getProjectRoot, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadBosConfig, loadGeneratedResolvedConfig, loadLocalConfig, loadRemoteConfig, loadResolvedConfig, mergeBosConfigWithExtends, oc, parseBosUrl, parsePort, parseRuntimeOverrideTargets, readBosConfigForBuild, rebuildOrderedConfig, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resumeWarnings, suppressWarnings, writeResolvedConfig, z };
8
+ export { type AnyContractRouter, type AnySchema, ApiPluginConfig, ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfig, BosConfigInput, BosConfigInputAppEntry, BosConfigInputSchema, BosConfigResult, BosConfigSchema, BosPluginRef, BosPluginRefSchema, BosStaging, BosStagingSchema, BuildOptions, BuildOptionsSchema, BuildResultSchema, BuildRuntimeConfigOptions, CiConfig, CiConfigSchema, CliCommandMeta, ClientRuntimeConfig, ClientRuntimeConfigSchema, ClientRuntimeInfo, ClientRuntimeInfoSchema, ComposableAppEntry, ComposableAppEntrySchema, ConfigOptionsSchema, ConfigResult, ConfigResultSchema, Context, DbDoctorOptions, DbDoctorOptionsSchema, DbDoctorResult, DbDoctorResultSchema, DbRepairOptions, DbRepairOptionsSchema, DbRepairResult, DbRepairResultSchema, DbStudioOptions, DbStudioOptionsSchema, DbStudioResult, DbStudioResultSchema, DependencyNodeKind, DependencyNodeKindSchema, DeployOptions, DeployOptionsSchema, DeployResult, DeployResultSchema, DevOptions, DevOptionsSchema, DevResult, DevResultSchema, Effect, Extends, ExtendsConfig, ExtendsSchema, FederationEntry, FederationEntrySchema, HostConfig, HostConfigSchema, InitOptions, InitOptionsSchema, InitResult, InitResultSchema, JsonObject, JsonObjectSchema, JsonPrimitive, JsonValue, JsonValueSchema, KeyPublishOptions, KeyPublishOptionsSchema, KeyPublishResult, KeyPublishResultSchema, KillOptions, KillOptionsSchema, KillResult, KillResultSchema, Layer, type LoadedPluginWithBinding, LocalConfigResult, NetworkId, OverrideSection, OverrideSectionSchema, PhaseTiming, PhaseTimingSchema, PidEntry, PidEntrySchema, type Plugin, PluginAddOptions, PluginAddOptionsSchema, PluginAddResult, PluginAddResultSchema, PluginEntries, PluginEntryValue, PluginListResult, PluginListResultSchema, PluginManifest, PluginPublishOptions, PluginPublishOptionsSchema, PluginPublishResult, PluginPublishResultSchema, PluginRemoveOptions, PluginRemoveOptionsSchema, PluginRemoveResult, PluginRemoveResultSchema, PluginRuntime, PluginRuntimeUi, PluginUiConfig, PluginUiConfigSchema, ProcessRole, ProcessRoleSchema, PsResult, PsResultSchema, PublishOptions, PublishOptionsSchema, PublishResult, PublishResultSchema, RailwayCi, RailwayCiSchema, RemoteConfigResult, ResolvedComposableReference, RuntimeConfig, RuntimeConfigSchema, RuntimeDependencyNode, RuntimeDependencyNodeSchema, RuntimeLineage, RuntimeLineageSchema, RuntimeOverrideTarget, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfig, RuntimePluginConfigSchema, Scope, SharedConfig, SharedConfigSchema, SharedDepConfig, SharedDepConfigSchema, SharedDepMapSchema, SourceMode, SourceModeSchema, StartOptions, StartOptionsSchema, StartResult, StartResultSchema, StatusResult, StatusResultSchema, SyncOptions, SyncOptionsSchema, SyncResult, SyncResultSchema, TypesGenOptions, TypesGenOptionsSchema, TypesGenResult, TypesGenResultSchema, UiConfig, UiConfigSchema, UpgradeOptions, UpgradeOptionsSchema, UpgradeResult, UpgradeResultSchema, WorkspaceDeployResult, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimePluginsForConfig, clearConfigCache, cliCommandMeta, createPlugin, createPluginRuntime, drainConfigWarnings, fetchBosConfigFromFastKv, fetchRemotePluginManifest, findConfigPath, getConfig, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getProjectRoot, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadBosConfig, loadGeneratedResolvedConfig, loadLocalConfig, loadRemoteConfig, loadResolvedConfig, mergeBosConfigWithExtends, oc, parseBosUrl, parsePort, parseRuntimeOverrideTargets, readBosConfigForBuild, rebuildOrderedConfig, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resumeWarnings, suppressWarnings, writeResolvedConfig, z };
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, fetchBosConfigFromFastKv, fetchRemotePluginManifest, getFastKvBaseUrlForNetwork, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, parseBosUrl } from "./fastkv.mjs";
2
2
  import { BOS_CONFIG_ORDER, mergeBosConfigWithExtends, rebuildOrderedConfig, resolveExtendsRef } from "./merge.mjs";
3
- import { ApiPluginConfigSchema, BosConfigInputSchema, BosConfigSchema, BosPluginRefSchema, BosStagingSchema, CiConfigSchema, ClientRuntimeConfigSchema, ClientRuntimeInfoSchema, ComposableAppEntrySchema, ExtendsSchema, FederationEntrySchema, HostConfigSchema, JsonObjectSchema, JsonValueSchema, PluginUiConfigSchema, RailwayCiSchema, RuntimeConfigSchema, RuntimeLineageSchema, RuntimePluginConfigSchema, SharedConfigSchema, SharedDepConfigSchema, SharedDepMapSchema, SourceModeSchema, UiConfigSchema } from "./types.mjs";
3
+ import { ApiPluginConfigSchema, BosConfigInputSchema, BosConfigSchema, BosPluginRefSchema, BosStagingSchema, CiConfigSchema, ClientRuntimeConfigSchema, ClientRuntimeInfoSchema, ComposableAppEntrySchema, DependencyNodeKindSchema, ExtendsSchema, FederationEntrySchema, HostConfigSchema, JsonObjectSchema, JsonValueSchema, PluginUiConfigSchema, RailwayCiSchema, RuntimeConfigSchema, RuntimeDependencyNodeSchema, RuntimeLineageSchema, RuntimePluginConfigSchema, SharedConfigSchema, SharedDepConfigSchema, SharedDepMapSchema, SourceModeSchema, UiConfigSchema } from "./types.mjs";
4
4
  import { buildRuntimeConfig, buildRuntimePluginsForConfig, clearConfigCache, drainConfigWarnings, findConfigPath, getConfig, getHostDevelopmentPort, getProjectRoot, getResolvedConfigPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadBosConfig, loadGeneratedResolvedConfig, loadLocalConfig, loadRemoteConfig, loadResolvedConfig, parsePort, parseRuntimeOverrideTargets, readBosConfigForBuild, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resumeWarnings, suppressWarnings, writeResolvedConfig } from "./config.mjs";
5
5
  import { Context, Effect, Layer, PluginRuntime, Scope, createPlugin, createPluginRuntime, oc, z } from "./sdk.mjs";
6
6
  import { BuildOptionsSchema, BuildResultSchema, ConfigOptionsSchema, ConfigResultSchema, DbDoctorOptionsSchema, DbDoctorResultSchema, DbRepairOptionsSchema, DbRepairResultSchema, DbStudioOptionsSchema, DbStudioResultSchema, DeployOptionsSchema, DeployResultSchema, DevOptionsSchema, DevResultSchema, InitOptionsSchema, InitResultSchema, KeyPublishOptionsSchema, KeyPublishResultSchema, KillOptionsSchema, KillResultSchema, OverrideSectionSchema, PhaseTimingSchema, PidEntrySchema, PluginAddOptionsSchema, PluginAddResultSchema, PluginListResultSchema, PluginPublishOptionsSchema, PluginPublishResultSchema, PluginRemoveOptionsSchema, PluginRemoveResultSchema, ProcessRoleSchema, PsResultSchema, PublishOptionsSchema, PublishResultSchema, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, StartOptionsSchema, StartResultSchema, StatusResultSchema, SyncOptionsSchema, SyncResultSchema, TypesGenOptionsSchema, TypesGenResultSchema, UpgradeOptionsSchema, UpgradeResultSchema, WorkspaceDeployResultSchema, bosContract } from "./contract.mjs";
7
7
  import { cliCommandMeta } from "./contract.meta.mjs";
8
8
 
9
- export { ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfigInputSchema, BosConfigSchema, BosPluginRefSchema, BosStagingSchema, BuildOptionsSchema, BuildResultSchema, CiConfigSchema, ClientRuntimeConfigSchema, ClientRuntimeInfoSchema, ComposableAppEntrySchema, ConfigOptionsSchema, ConfigResultSchema, Context, DbDoctorOptionsSchema, DbDoctorResultSchema, DbRepairOptionsSchema, DbRepairResultSchema, DbStudioOptionsSchema, DbStudioResultSchema, DeployOptionsSchema, DeployResultSchema, DevOptionsSchema, DevResultSchema, Effect, ExtendsSchema, FederationEntrySchema, HostConfigSchema, InitOptionsSchema, InitResultSchema, JsonObjectSchema, JsonValueSchema, KeyPublishOptionsSchema, KeyPublishResultSchema, KillOptionsSchema, KillResultSchema, Layer, OverrideSectionSchema, PhaseTimingSchema, PidEntrySchema, PluginAddOptionsSchema, PluginAddResultSchema, PluginListResultSchema, PluginPublishOptionsSchema, PluginPublishResultSchema, PluginRemoveOptionsSchema, PluginRemoveResultSchema, PluginRuntime, PluginUiConfigSchema, ProcessRoleSchema, PsResultSchema, PublishOptionsSchema, PublishResultSchema, RailwayCiSchema, RuntimeConfigSchema, RuntimeLineageSchema, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfigSchema, Scope, SharedConfigSchema, SharedDepConfigSchema, SharedDepMapSchema, SourceModeSchema, StartOptionsSchema, StartResultSchema, StatusResultSchema, SyncOptionsSchema, SyncResultSchema, TypesGenOptionsSchema, TypesGenResultSchema, UiConfigSchema, UpgradeOptionsSchema, UpgradeResultSchema, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimePluginsForConfig, clearConfigCache, cliCommandMeta, createPlugin, createPluginRuntime, drainConfigWarnings, fetchBosConfigFromFastKv, fetchRemotePluginManifest, findConfigPath, getConfig, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getProjectRoot, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadBosConfig, loadGeneratedResolvedConfig, loadLocalConfig, loadRemoteConfig, loadResolvedConfig, mergeBosConfigWithExtends, oc, parseBosUrl, parsePort, parseRuntimeOverrideTargets, readBosConfigForBuild, rebuildOrderedConfig, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resumeWarnings, suppressWarnings, writeResolvedConfig, z };
9
+ export { ApiPluginConfigSchema, BOS_CONFIG_ORDER, BosConfigInputSchema, BosConfigSchema, BosPluginRefSchema, BosStagingSchema, BuildOptionsSchema, BuildResultSchema, CiConfigSchema, ClientRuntimeConfigSchema, ClientRuntimeInfoSchema, ComposableAppEntrySchema, ConfigOptionsSchema, ConfigResultSchema, Context, DbDoctorOptionsSchema, DbDoctorResultSchema, DbRepairOptionsSchema, DbRepairResultSchema, DbStudioOptionsSchema, DbStudioResultSchema, DependencyNodeKindSchema, DeployOptionsSchema, DeployResultSchema, DevOptionsSchema, DevResultSchema, Effect, ExtendsSchema, FederationEntrySchema, HostConfigSchema, InitOptionsSchema, InitResultSchema, JsonObjectSchema, JsonValueSchema, KeyPublishOptionsSchema, KeyPublishResultSchema, KillOptionsSchema, KillResultSchema, Layer, OverrideSectionSchema, PhaseTimingSchema, PidEntrySchema, PluginAddOptionsSchema, PluginAddResultSchema, PluginListResultSchema, PluginPublishOptionsSchema, PluginPublishResultSchema, PluginRemoveOptionsSchema, PluginRemoveResultSchema, PluginRuntime, PluginUiConfigSchema, ProcessRoleSchema, PsResultSchema, PublishOptionsSchema, PublishResultSchema, RailwayCiSchema, RuntimeConfigSchema, RuntimeDependencyNodeSchema, RuntimeLineageSchema, RuntimeOverrideTargetBaseSchema, RuntimeOverrideTargetSchema, RuntimePluginConfigSchema, Scope, SharedConfigSchema, SharedDepConfigSchema, SharedDepMapSchema, SourceModeSchema, StartOptionsSchema, StartResultSchema, StatusResultSchema, SyncOptionsSchema, SyncResultSchema, TypesGenOptionsSchema, TypesGenResultSchema, UiConfigSchema, UpgradeOptionsSchema, UpgradeResultSchema, WorkspaceDeployResultSchema, bosContract, buildRegistryConfigUrl, buildRegistryConfigUrlForNetwork, buildRuntimeConfig, buildRuntimePluginsForConfig, clearConfigCache, cliCommandMeta, createPlugin, createPluginRuntime, drainConfigWarnings, fetchBosConfigFromFastKv, fetchRemotePluginManifest, findConfigPath, getConfig, getFastKvBaseUrlForNetwork, getHostDevelopmentPort, getProjectRoot, getRegistryNamespaceForAccount, getRegistryNamespaceForNetwork, getResolvedConfigPath, isLocalDevelopmentTarget, isRuntimeOverrideAllowed, loadBosConfig, loadGeneratedResolvedConfig, loadLocalConfig, loadRemoteConfig, loadResolvedConfig, mergeBosConfigWithExtends, oc, parseBosUrl, parsePort, parseRuntimeOverrideTargets, readBosConfigForBuild, rebuildOrderedConfig, resolveBosConfigPath, resolveComposableReference, resolveConfigComposableEntries, resolveDevelopmentHostUrl, resolveExtendsRef, resolveLocalDevelopmentPath, resolvePluginRuntimeName, resumeWarnings, suppressWarnings, writeResolvedConfig, z };
@@ -3,8 +3,8 @@ const require_infra = require('../cli/infra.cjs');
3
3
  const require_service_descriptor = require('../service-descriptor.cjs');
4
4
  const require_types = require('./types.cjs');
5
5
  let node_path = require("node:path");
6
- let effect = require("effect");
7
6
  let node_crypto = require("node:crypto");
7
+ let effect = require("effect");
8
8
 
9
9
  //#region src/infra/planner.ts
10
10
  const DEFAULT_HOST_PORT = 3e3;
@@ -3,8 +3,8 @@ import { buildDatabaseConfigs, buildOriginMap, buildRedisConfigs, getSecretGroup
3
3
  import { buildDescription } from "../service-descriptor.mjs";
4
4
  import { InfraError } from "./types.mjs";
5
5
  import { resolve } from "node:path";
6
- import { Effect } from "effect";
7
6
  import { createHash } from "node:crypto";
7
+ import { Effect } from "effect";
8
8
 
9
9
  //#region src/infra/planner.ts
10
10
  const DEFAULT_HOST_PORT = 3e3;
@@ -44,7 +44,7 @@ function checkPgConnection(url) {
44
44
  return effect.Effect.gen(function* () {
45
45
  if (!(yield* checkTcpReachable(new URL(url).hostname, Number(new URL(url).port) || 5432, 4e3))) return false;
46
46
  try {
47
- const { Pool } = yield* effect.Effect.promise(() => Promise.resolve().then(() => require("../node_modules/pg/esm/index.cjs")));
47
+ const { Pool } = yield* effect.Effect.promise(() => import("pg"));
48
48
  const pool = new Pool({
49
49
  connectionString: url,
50
50
  connectionTimeoutMillis: 3e3
@@ -1 +1 @@
1
- {"version":3,"file":"preflight.cjs","names":["Effect"],"sources":["../../src/infra/preflight.ts"],"sourcesContent":["import { createConnection } from \"node:net\";\nimport { Effect } from \"effect\";\n\nexport interface PreflightTarget {\n secret: string;\n host: string;\n port: number;\n kind: \"postgres\" | \"redis\";\n url: string;\n}\n\nexport interface PreflightFailure {\n secret: string;\n host: string;\n port: number;\n error: string;\n}\n\nfunction parseLocalUrl(url: string): { host: string; port: number } | null {\n try {\n const match = url.match(/:\\/\\/([^:/]+):(\\d+)/);\n if (!match) return null;\n const host = match[1];\n const port = Number.parseInt(match[2], 10);\n if (Number.isNaN(port)) return null;\n if (host !== \"localhost\" && host !== \"127.0.0.1\") return null;\n return { host, port };\n } catch {\n return null;\n }\n}\n\nfunction checkTcpReachable(host: string, port: number, timeoutMs = 2000): Effect.Effect<boolean> {\n return Effect.async<boolean>((resume) => {\n const socket = createConnection({ host, port });\n const timer = setTimeout(() => {\n socket.destroy();\n resume(Effect.succeed(false));\n }, timeoutMs);\n\n socket.once(\"connect\", () => {\n clearTimeout(timer);\n socket.destroy();\n resume(Effect.succeed(true));\n });\n\n socket.once(\"error\", () => {\n clearTimeout(timer);\n socket.destroy();\n resume(Effect.succeed(false));\n });\n });\n}\n\nfunction checkPgConnection(url: string): Effect.Effect<boolean> {\n return Effect.gen(function* () {\n const reachable = yield* checkTcpReachable(\n new URL(url).hostname,\n Number(new URL(url).port) || 5432,\n 4000,\n );\n if (!reachable) return false;\n\n try {\n const { Pool } = yield* Effect.promise(() => import(\"pg\"));\n const pool = new Pool({ connectionString: url, connectionTimeoutMillis: 3000 });\n const client = yield* Effect.promise(() => pool.connect().then((c) => ({ client: c, pool })));\n try {\n yield* Effect.promise(() => client.client.query(\"SELECT 1\"));\n return true;\n } finally {\n client.client.release();\n yield* Effect.promise(() => client.pool.end().catch(() => {}));\n }\n } catch {\n return false;\n }\n });\n}\n\nfunction preflightTargetsFromEnv(env: Record<string, string>): PreflightTarget[] {\n const targets: PreflightTarget[] = [];\n for (const [secret, value] of Object.entries(env)) {\n if (!value) continue;\n if (secret.endsWith(\"_DATABASE_URL\")) {\n const parsed = parseLocalUrl(value);\n if (parsed) {\n targets.push({\n secret,\n host: parsed.host,\n port: parsed.port,\n kind: \"postgres\",\n url: value,\n });\n }\n } else if (secret.endsWith(\"_REDIS_URL\")) {\n const parsed = parseLocalUrl(value);\n if (parsed) {\n targets.push({ secret, host: parsed.host, port: parsed.port, kind: \"redis\", url: value });\n }\n }\n }\n return targets;\n}\n\nexport function preflightLocalInfra(\n env: Record<string, string>,\n overrides?: Record<string, string>,\n): Effect.Effect<PreflightFailure[], never> {\n const merged = overrides ? { ...env, ...overrides } : env;\n const targets = preflightTargetsFromEnv(merged);\n if (targets.length === 0) return Effect.succeed([]);\n\n return Effect.forEach(\n targets,\n (target) =>\n Effect.gen(function* () {\n if (target.kind === \"postgres\") {\n const ok = yield* checkPgConnection(target.url);\n if (ok) return null;\n const tcpOk = yield* checkTcpReachable(target.host, target.port);\n const pluginContext = target.secret.endsWith(\"_DATABASE_URL\")\n ? ` The plugin for ${target.secret} runs inside the local host process, so this DB must be reachable. Run \\`docker compose up -d --wait\\` to start local Postgres/Redis.`\n : \"\";\n if (tcpOk) {\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} at ${target.host}:${target.port} is reachable but Postgres connection failed. Check credentials and database name.${pluginContext}`,\n } satisfies PreflightFailure;\n }\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} points to ${target.host}:${target.port} but nothing is listening.${pluginContext}`,\n } satisfies PreflightFailure;\n }\n\n const reachable = yield* checkTcpReachable(target.host, target.port);\n if (reachable) return null;\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} points to ${target.host}:${target.port} but nothing is listening`,\n } satisfies PreflightFailure;\n }),\n { concurrency: \"unbounded\" },\n ).pipe(Effect.map((results) => results.filter((r): r is PreflightFailure => r !== null)));\n}\n"],"mappings":";;;;AAkBA,SAAS,cAAc,KAAoD;CACzE,IAAI;EACF,MAAM,QAAQ,IAAI,MAAM,qBAAqB;EAC7C,IAAI,CAAC,OAAO,OAAO;EACnB,MAAM,OAAO,MAAM;EACnB,MAAM,OAAO,OAAO,SAAS,MAAM,IAAI,EAAE;EACzC,IAAI,OAAO,MAAM,IAAI,GAAG,OAAO;EAC/B,IAAI,SAAS,eAAe,SAAS,aAAa,OAAO;EACzD,OAAO;GAAE;GAAM;EAAK;CACtB,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAS,kBAAkB,MAAc,MAAc,YAAY,KAA8B;CAC/F,OAAOA,cAAO,OAAgB,WAAW;EACvC,MAAM,wCAA0B;GAAE;GAAM;EAAK,CAAC;EAC9C,MAAM,QAAQ,iBAAiB;GAC7B,OAAO,QAAQ;GACf,OAAOA,cAAO,QAAQ,KAAK,CAAC;EAC9B,GAAG,SAAS;EAEZ,OAAO,KAAK,iBAAiB;GAC3B,aAAa,KAAK;GAClB,OAAO,QAAQ;GACf,OAAO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"file":"preflight.cjs","names":["Effect"],"sources":["../../src/infra/preflight.ts"],"sourcesContent":["import { createConnection } from \"node:net\";\nimport { Effect } from \"effect\";\n\nexport interface PreflightTarget {\n secret: string;\n host: string;\n port: number;\n kind: \"postgres\" | \"redis\";\n url: string;\n}\n\nexport interface PreflightFailure {\n secret: string;\n host: string;\n port: number;\n error: string;\n}\n\nfunction parseLocalUrl(url: string): { host: string; port: number } | null {\n try {\n const match = url.match(/:\\/\\/([^:/]+):(\\d+)/);\n if (!match) return null;\n const host = match[1];\n const port = Number.parseInt(match[2], 10);\n if (Number.isNaN(port)) return null;\n if (host !== \"localhost\" && host !== \"127.0.0.1\") return null;\n return { host, port };\n } catch {\n return null;\n }\n}\n\nfunction checkTcpReachable(host: string, port: number, timeoutMs = 2000): Effect.Effect<boolean> {\n return Effect.async<boolean>((resume) => {\n const socket = createConnection({ host, port });\n const timer = setTimeout(() => {\n socket.destroy();\n resume(Effect.succeed(false));\n }, timeoutMs);\n\n socket.once(\"connect\", () => {\n clearTimeout(timer);\n socket.destroy();\n resume(Effect.succeed(true));\n });\n\n socket.once(\"error\", () => {\n clearTimeout(timer);\n socket.destroy();\n resume(Effect.succeed(false));\n });\n });\n}\n\nfunction checkPgConnection(url: string): Effect.Effect<boolean> {\n return Effect.gen(function* () {\n const reachable = yield* checkTcpReachable(\n new URL(url).hostname,\n Number(new URL(url).port) || 5432,\n 4000,\n );\n if (!reachable) return false;\n\n try {\n const { Pool } = yield* Effect.promise(() => import(\"pg\"));\n const pool = new Pool({ connectionString: url, connectionTimeoutMillis: 3000 });\n const client = yield* Effect.promise(() => pool.connect().then((c) => ({ client: c, pool })));\n try {\n yield* Effect.promise(() => client.client.query(\"SELECT 1\"));\n return true;\n } finally {\n client.client.release();\n yield* Effect.promise(() => client.pool.end().catch(() => {}));\n }\n } catch {\n return false;\n }\n });\n}\n\nfunction preflightTargetsFromEnv(env: Record<string, string>): PreflightTarget[] {\n const targets: PreflightTarget[] = [];\n for (const [secret, value] of Object.entries(env)) {\n if (!value) continue;\n if (secret.endsWith(\"_DATABASE_URL\")) {\n const parsed = parseLocalUrl(value);\n if (parsed) {\n targets.push({\n secret,\n host: parsed.host,\n port: parsed.port,\n kind: \"postgres\",\n url: value,\n });\n }\n } else if (secret.endsWith(\"_REDIS_URL\")) {\n const parsed = parseLocalUrl(value);\n if (parsed) {\n targets.push({ secret, host: parsed.host, port: parsed.port, kind: \"redis\", url: value });\n }\n }\n }\n return targets;\n}\n\nexport function preflightLocalInfra(\n env: Record<string, string>,\n overrides?: Record<string, string>,\n): Effect.Effect<PreflightFailure[], never> {\n const merged = overrides ? { ...env, ...overrides } : env;\n const targets = preflightTargetsFromEnv(merged);\n if (targets.length === 0) return Effect.succeed([]);\n\n return Effect.forEach(\n targets,\n (target) =>\n Effect.gen(function* () {\n if (target.kind === \"postgres\") {\n const ok = yield* checkPgConnection(target.url);\n if (ok) return null;\n const tcpOk = yield* checkTcpReachable(target.host, target.port);\n const pluginContext = target.secret.endsWith(\"_DATABASE_URL\")\n ? ` The plugin for ${target.secret} runs inside the local host process, so this DB must be reachable. Run \\`docker compose up -d --wait\\` to start local Postgres/Redis.`\n : \"\";\n if (tcpOk) {\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} at ${target.host}:${target.port} is reachable but Postgres connection failed. Check credentials and database name.${pluginContext}`,\n } satisfies PreflightFailure;\n }\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} points to ${target.host}:${target.port} but nothing is listening.${pluginContext}`,\n } satisfies PreflightFailure;\n }\n\n const reachable = yield* checkTcpReachable(target.host, target.port);\n if (reachable) return null;\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} points to ${target.host}:${target.port} but nothing is listening`,\n } satisfies PreflightFailure;\n }),\n { concurrency: \"unbounded\" },\n ).pipe(Effect.map((results) => results.filter((r): r is PreflightFailure => r !== null)));\n}\n"],"mappings":";;;;AAkBA,SAAS,cAAc,KAAoD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,OAAO;IACf,MAAM,OAAO;IACb,MAAM,OAAO;IACb,OAAO,GAAG,OAAO,OAAO,MAAM,OAAO,KAAK,GAAG,OAAO,KAAK,oFAAoF;GAC/I;GAEF,OAAO;IACL,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,MAAM,OAAO;IACb,OAAO,GAAG,OAAO,OAAO,aAAa,OAAO,KAAK,GAAG,OAAO,KAAK,4BAA4B;GAC9F;EACF;EAGA,IAAI,OADqB,kBAAkB,OAAO,MAAM,OAAO,IAAI,GACpD,OAAO;EACtB,OAAO;GACL,QAAQ,OAAO;GACf,MAAM,OAAO;GACb,MAAM,OAAO;GACb,OAAO,GAAG,OAAO,OAAO,aAAa,OAAO,KAAK,GAAG,OAAO,KAAK;EAClE;CACF,CAAC,GACH,EAAE,aAAa,YAAY,CAC7B,CAAC,CAAC,KAAKA,cAAO,KAAK,YAAY,QAAQ,QAAQ,MAA6B,MAAM,IAAI,CAAC,CAAC;AAC1F"}
@@ -44,7 +44,7 @@ function checkPgConnection(url) {
44
44
  return Effect.gen(function* () {
45
45
  if (!(yield* checkTcpReachable(new URL(url).hostname, Number(new URL(url).port) || 5432, 4e3))) return false;
46
46
  try {
47
- const { Pool } = yield* Effect.promise(() => import("../node_modules/pg/esm/index.mjs"));
47
+ const { Pool } = yield* Effect.promise(() => import("pg"));
48
48
  const pool = new Pool({
49
49
  connectionString: url,
50
50
  connectionTimeoutMillis: 3e3
@@ -1 +1 @@
1
- {"version":3,"file":"preflight.mjs","names":[],"sources":["../../src/infra/preflight.ts"],"sourcesContent":["import { createConnection } from \"node:net\";\nimport { Effect } from \"effect\";\n\nexport interface PreflightTarget {\n secret: string;\n host: string;\n port: number;\n kind: \"postgres\" | \"redis\";\n url: string;\n}\n\nexport interface PreflightFailure {\n secret: string;\n host: string;\n port: number;\n error: string;\n}\n\nfunction parseLocalUrl(url: string): { host: string; port: number } | null {\n try {\n const match = url.match(/:\\/\\/([^:/]+):(\\d+)/);\n if (!match) return null;\n const host = match[1];\n const port = Number.parseInt(match[2], 10);\n if (Number.isNaN(port)) return null;\n if (host !== \"localhost\" && host !== \"127.0.0.1\") return null;\n return { host, port };\n } catch {\n return null;\n }\n}\n\nfunction checkTcpReachable(host: string, port: number, timeoutMs = 2000): Effect.Effect<boolean> {\n return Effect.async<boolean>((resume) => {\n const socket = createConnection({ host, port });\n const timer = setTimeout(() => {\n socket.destroy();\n resume(Effect.succeed(false));\n }, timeoutMs);\n\n socket.once(\"connect\", () => {\n clearTimeout(timer);\n socket.destroy();\n resume(Effect.succeed(true));\n });\n\n socket.once(\"error\", () => {\n clearTimeout(timer);\n socket.destroy();\n resume(Effect.succeed(false));\n });\n });\n}\n\nfunction checkPgConnection(url: string): Effect.Effect<boolean> {\n return Effect.gen(function* () {\n const reachable = yield* checkTcpReachable(\n new URL(url).hostname,\n Number(new URL(url).port) || 5432,\n 4000,\n );\n if (!reachable) return false;\n\n try {\n const { Pool } = yield* Effect.promise(() => import(\"pg\"));\n const pool = new Pool({ connectionString: url, connectionTimeoutMillis: 3000 });\n const client = yield* Effect.promise(() => pool.connect().then((c) => ({ client: c, pool })));\n try {\n yield* Effect.promise(() => client.client.query(\"SELECT 1\"));\n return true;\n } finally {\n client.client.release();\n yield* Effect.promise(() => client.pool.end().catch(() => {}));\n }\n } catch {\n return false;\n }\n });\n}\n\nfunction preflightTargetsFromEnv(env: Record<string, string>): PreflightTarget[] {\n const targets: PreflightTarget[] = [];\n for (const [secret, value] of Object.entries(env)) {\n if (!value) continue;\n if (secret.endsWith(\"_DATABASE_URL\")) {\n const parsed = parseLocalUrl(value);\n if (parsed) {\n targets.push({\n secret,\n host: parsed.host,\n port: parsed.port,\n kind: \"postgres\",\n url: value,\n });\n }\n } else if (secret.endsWith(\"_REDIS_URL\")) {\n const parsed = parseLocalUrl(value);\n if (parsed) {\n targets.push({ secret, host: parsed.host, port: parsed.port, kind: \"redis\", url: value });\n }\n }\n }\n return targets;\n}\n\nexport function preflightLocalInfra(\n env: Record<string, string>,\n overrides?: Record<string, string>,\n): Effect.Effect<PreflightFailure[], never> {\n const merged = overrides ? { ...env, ...overrides } : env;\n const targets = preflightTargetsFromEnv(merged);\n if (targets.length === 0) return Effect.succeed([]);\n\n return Effect.forEach(\n targets,\n (target) =>\n Effect.gen(function* () {\n if (target.kind === \"postgres\") {\n const ok = yield* checkPgConnection(target.url);\n if (ok) return null;\n const tcpOk = yield* checkTcpReachable(target.host, target.port);\n const pluginContext = target.secret.endsWith(\"_DATABASE_URL\")\n ? ` The plugin for ${target.secret} runs inside the local host process, so this DB must be reachable. Run \\`docker compose up -d --wait\\` to start local Postgres/Redis.`\n : \"\";\n if (tcpOk) {\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} at ${target.host}:${target.port} is reachable but Postgres connection failed. Check credentials and database name.${pluginContext}`,\n } satisfies PreflightFailure;\n }\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} points to ${target.host}:${target.port} but nothing is listening.${pluginContext}`,\n } satisfies PreflightFailure;\n }\n\n const reachable = yield* checkTcpReachable(target.host, target.port);\n if (reachable) return null;\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} points to ${target.host}:${target.port} but nothing is listening`,\n } satisfies PreflightFailure;\n }),\n { concurrency: \"unbounded\" },\n ).pipe(Effect.map((results) => results.filter((r): r is PreflightFailure => r !== null)));\n}\n"],"mappings":";;;;AAkBA,SAAS,cAAc,KAAoD;CACzE,IAAI;EACF,MAAM,QAAQ,IAAI,MAAM,qBAAqB;EAC7C,IAAI,CAAC,OAAO,OAAO;EACnB,MAAM,OAAO,MAAM;EACnB,MAAM,OAAO,OAAO,SAAS,MAAM,IAAI,EAAE;EACzC,IAAI,OAAO,MAAM,IAAI,GAAG,OAAO;EAC/B,IAAI,SAAS,eAAe,SAAS,aAAa,OAAO;EACzD,OAAO;GAAE;GAAM;EAAK;CACtB,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAS,kBAAkB,M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EACtB,OAAO;GACL,QAAQ,OAAO;GACf,MAAM,OAAO;GACb,MAAM,OAAO;GACb,OAAO,GAAG,OAAO,OAAO,aAAa,OAAO,KAAK,GAAG,OAAO,KAAK;EAClE;CACF,CAAC,GACH,EAAE,aAAa,YAAY,CAC7B,CAAC,CAAC,KAAK,OAAO,KAAK,YAAY,QAAQ,QAAQ,MAA6B,MAAM,IAAI,CAAC,CAAC;AAC1F"}
1
+ {"version":3,"file":"preflight.mjs","names":[],"sources":["../../src/infra/preflight.ts"],"sourcesContent":["import { createConnection } from \"node:net\";\nimport { Effect } from \"effect\";\n\nexport interface PreflightTarget {\n secret: string;\n host: string;\n port: number;\n kind: \"postgres\" | \"redis\";\n url: string;\n}\n\nexport interface PreflightFailure {\n secret: string;\n host: string;\n port: number;\n error: string;\n}\n\nfunction parseLocalUrl(url: string): { host: string; port: number } | null {\n try {\n const match = url.match(/:\\/\\/([^:/]+):(\\d+)/);\n if (!match) return null;\n const host = match[1];\n const port = Number.parseInt(match[2], 10);\n if (Number.isNaN(port)) return null;\n if (host !== \"localhost\" && host !== \"127.0.0.1\") return null;\n return { host, port };\n } catch {\n return null;\n }\n}\n\nfunction checkTcpReachable(host: string, port: number, timeoutMs = 2000): Effect.Effect<boolean> {\n return Effect.async<boolean>((resume) => {\n const socket = createConnection({ host, port });\n const timer = setTimeout(() => {\n socket.destroy();\n resume(Effect.succeed(false));\n }, timeoutMs);\n\n socket.once(\"connect\", () => {\n clearTimeout(timer);\n socket.destroy();\n resume(Effect.succeed(true));\n });\n\n socket.once(\"error\", () => {\n clearTimeout(timer);\n socket.destroy();\n resume(Effect.succeed(false));\n });\n });\n}\n\nfunction checkPgConnection(url: string): Effect.Effect<boolean> {\n return Effect.gen(function* () {\n const reachable = yield* checkTcpReachable(\n new URL(url).hostname,\n Number(new URL(url).port) || 5432,\n 4000,\n );\n if (!reachable) return false;\n\n try {\n const { Pool } = yield* Effect.promise(() => import(\"pg\"));\n const pool = new Pool({ connectionString: url, connectionTimeoutMillis: 3000 });\n const client = yield* Effect.promise(() => pool.connect().then((c) => ({ client: c, pool })));\n try {\n yield* Effect.promise(() => client.client.query(\"SELECT 1\"));\n return true;\n } finally {\n client.client.release();\n yield* Effect.promise(() => client.pool.end().catch(() => {}));\n }\n } catch {\n return false;\n }\n });\n}\n\nfunction preflightTargetsFromEnv(env: Record<string, string>): PreflightTarget[] {\n const targets: PreflightTarget[] = [];\n for (const [secret, value] of Object.entries(env)) {\n if (!value) continue;\n if (secret.endsWith(\"_DATABASE_URL\")) {\n const parsed = parseLocalUrl(value);\n if (parsed) {\n targets.push({\n secret,\n host: parsed.host,\n port: parsed.port,\n kind: \"postgres\",\n url: value,\n });\n }\n } else if (secret.endsWith(\"_REDIS_URL\")) {\n const parsed = parseLocalUrl(value);\n if (parsed) {\n targets.push({ secret, host: parsed.host, port: parsed.port, kind: \"redis\", url: value });\n }\n }\n }\n return targets;\n}\n\nexport function preflightLocalInfra(\n env: Record<string, string>,\n overrides?: Record<string, string>,\n): Effect.Effect<PreflightFailure[], never> {\n const merged = overrides ? { ...env, ...overrides } : env;\n const targets = preflightTargetsFromEnv(merged);\n if (targets.length === 0) return Effect.succeed([]);\n\n return Effect.forEach(\n targets,\n (target) =>\n Effect.gen(function* () {\n if (target.kind === \"postgres\") {\n const ok = yield* checkPgConnection(target.url);\n if (ok) return null;\n const tcpOk = yield* checkTcpReachable(target.host, target.port);\n const pluginContext = target.secret.endsWith(\"_DATABASE_URL\")\n ? ` The plugin for ${target.secret} runs inside the local host process, so this DB must be reachable. Run \\`docker compose up -d --wait\\` to start local Postgres/Redis.`\n : \"\";\n if (tcpOk) {\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} at ${target.host}:${target.port} is reachable but Postgres connection failed. Check credentials and database name.${pluginContext}`,\n } satisfies PreflightFailure;\n }\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} points to ${target.host}:${target.port} but nothing is listening.${pluginContext}`,\n } satisfies PreflightFailure;\n }\n\n const reachable = yield* checkTcpReachable(target.host, target.port);\n if (reachable) return null;\n return {\n secret: target.secret,\n host: target.host,\n port: target.port,\n error: `${target.secret} points to ${target.host}:${target.port} but nothing is listening`,\n } satisfies PreflightFailure;\n }),\n { concurrency: \"unbounded\" },\n ).pipe(Effect.map((results) => results.filter((r): r is PreflightFailure => r !== null)));\n}\n"],"mappings":";;;;AAkBA,SAAS,cAAc,KAAoD;CACzE,IAAI;EACF,MAAM,QAAQ,IAAI,MAAM,qBAAqB;EAC7C,IAAI,CAAC,OAAO,OAAO;EACnB,MAAM,OAAO,MAAM;EACnB,MAAM,OAAO,OAAO,SAAS,MAAM,IAAI,EAAE;EACzC,IAAI,OAAO,MAAM,IAAI,GAAG,OAAO;EAC/B,IAAI,SAAS,eAAe,SAAS,aAAa,OAAO;EACzD,OAAO;GAAE;GAAM;EAAK;CACtB,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAS,kBAAkB,MAAc,MAAc,YAAY,KAA8B;CAC/F,OAAO,OAAO,OAAgB,WAAW;EACvC,MAAM,SAAS,iBAAiB;GAAE;GAAM;EAAK,CAAC;EAC9C,MAAM,QAAQ,iBAAiB;GAC7B,OAAO,QAAQ;GACf,OAAO,OAAO,QAAQ,KAAK,CAAC;EAC9B,GAAG,SAAS;EAEZ,OAAO,KAAK,iBAAiB;GAC3B,aAAa,KAAK;GAClB,OAAO,QAAQ;GACf,OAAO,OAAO,QAAQ,IAAI,CAAC;EAC7B,CAAC;EAED,OAAO,KAAK,eAAe;GACzB,aAAa,KAAK;GAClB,OAAO,QAAQ;GACf,OAAO,OAAO,QAAQ,KAAK,CAAC;EAC9B,CAAC;CACH,CAAC;AACH;AAEA,SAAS,kBAAkB,KAAqC;CAC9D,OAAO,OAAO,IAAI,aAAa;EAM7B,IAAI,EAAC,OALoB,kBACvB,IAAI,IAAI,GAAG,CAAC,CAAC,UACb,OAAO,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,KAAK,MAC7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AO,IAAI,aAAa;EACtB,IAAI,OAAO,SAAS,YAAY;GAE9B,IAAI,OADc,kBAAkB,OAAO,GAAG,GACtC,OAAO;GACf,MAAM,QAAQ,OAAO,kBAAkB,OAAO,MAAM,OAAO,IAAI;GAC/D,MAAM,gBAAgB,OAAO,OAAO,SAAS,eAAe,IACxD,mBAAmB,OAAO,OAAO,yIACjC;GACJ,IAAI,OACF,OAAO;IACL,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,MAAM,OAAO;IACb,OAAO,GAAG,OAAO,OAAO,MAAM,OAAO,KAAK,GAAG,OAAO,KAAK,oFAAoF;GAC/I;GAEF,OAAO;IACL,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,MAAM,OAAO;IACb,OAAO,GAAG,OAAO,OAAO,aAAa,OAAO,KAAK,GAAG,OAAO,KAAK,4BAA4B;GAC9F;EACF;EAGA,IAAI,OADqB,kBAAkB,OAAO,MAAM,OAAO,IAAI,GACpD,OAAO;EACtB,OAAO;GACL,QAAQ,OAAO;GACf,MAAM,OAAO;GACb,MAAM,OAAO;GACb,OAAO,GAAG,OAAO,OAAO,aAAa,OAAO,KAAK,GAAG,OAAO,KAAK;EAClE;CACF,CAAC,GACH,EAAE,aAAa,YAAY,CAC7B,CAAC,CAAC,KAAK,OAAO,KAAK,YAAY,QAAQ,QAAQ,MAA6B,MAAM,IAAI,CAAC,CAAC;AAC1F"}
package/dist/near-cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  const require_theme = require('./utils/theme.cjs');
2
- let effect = require("effect");
3
2
  let node_crypto = require("node:crypto");
3
+ let effect = require("effect");
4
4
  let execa = require("execa");
5
5
 
6
6
  //#region src/near-cli.ts
package/dist/near-cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { colors } from "./utils/theme.mjs";
2
- import { Effect } from "effect";
3
2
  import { generateKeyPairSync } from "node:crypto";
3
+ import { Effect } from "effect";
4
4
  import { execa } from "execa";
5
5
 
6
6
  //#region src/near-cli.ts
package/dist/plugin.cjs CHANGED
@@ -394,7 +394,7 @@ var plugin_default = (0, every_plugin.createPlugin)({
394
394
  timings: devTimings
395
395
  };
396
396
  require_config.suppressWarnings();
397
- const developmentRuntime = require_app.buildRuntimeConfig(deps.bosConfig, {
397
+ const developmentRuntime = await require_app.buildRuntimeConfig(deps.bosConfig, {
398
398
  uiSource,
399
399
  apiSource,
400
400
  authSource,
@@ -517,7 +517,7 @@ var plugin_default = (0, every_plugin.createPlugin)({
517
517
  const isStaging = bosEnv === "staging";
518
518
  const runtimePlugins = await require_config.buildRuntimePluginsForConfig(config, deps.configDir, "production");
519
519
  require_config.suppressWarnings();
520
- const runtimeConfig = require_app.buildRuntimeConfig(config, {
520
+ const runtimeConfig = await require_app.buildRuntimeConfig(config, {
521
521
  uiSource: "remote",
522
522
  apiSource: "remote",
523
523
  authSource: "remote",
@@ -632,7 +632,7 @@ var plugin_default = (0, every_plugin.createPlugin)({
632
632
  skipped: []
633
633
  };
634
634
  require_config.suppressWarnings();
635
- const runtimeConfig = require_app.buildRuntimeConfig(deps.bosConfig, {
635
+ const runtimeConfig = await require_app.buildRuntimeConfig(deps.bosConfig, {
636
636
  uiSource: deps.bosConfig.app.ui?.development ? "local" : "remote",
637
637
  apiSource: deps.bosConfig.app.api?.development ? "local" : "remote",
638
638
  authSource: deps.bosConfig.app.auth?.development ? "local" : "remote",
@@ -1114,7 +1114,8 @@ var plugin_default = (0, every_plugin.createPlugin)({
1114
1114
  const projectDir = (0, node_path.resolve)((0, node_path.dirname)(configPath));
1115
1115
  const refreshed = await require_config.loadResolvedConfig({
1116
1116
  cwd: projectDir,
1117
- env: input.env ?? (node_process.default.env.NODE_ENV === "production" ? "production" : "development")
1117
+ env: input.env ?? (node_process.default.env.NODE_ENV === "production" ? "production" : "development"),
1118
+ remotePlugins: input.remotePlugins
1118
1119
  });
1119
1120
  if (!refreshed) return {
1120
1121
  status: "error",
@@ -1129,23 +1130,29 @@ var plugin_default = (0, every_plugin.createPlugin)({
1129
1130
  const fetched = [];
1130
1131
  const skipped = [];
1131
1132
  const hasLocalApiWorkspace = (0, node_fs.existsSync)((0, node_path.join)(projectDir, "api", "src"));
1132
- if (refreshed.runtime.api.source !== "local") fetched.push(`api (${refreshed.runtime.api.url})`);
1133
- else skipped.push("api (local)");
1134
- if (refreshed.runtime.auth) if (refreshed.runtime.auth.source !== "local") fetched.push(`auth (${refreshed.runtime.auth.url})`);
1135
- else skipped.push("auth (local)");
1136
- for (const [key, plugin] of pluginEntries) if (plugin.url && plugin.source !== "local") fetched.push(`${key} (${plugin.url})`);
1137
- else if (plugin.localPath) skipped.push(`${key} (local)`);
1138
- else skipped.push(`${key} (no URL resolved)`);
1133
+ if (refreshed.runtime.api.source !== "local") fetched.push(`api remote (${refreshed.runtime.api.url})`);
1134
+ else {
1135
+ const path = refreshed.runtime.api.localPath ? ` (${(0, node_path.relative)(projectDir, refreshed.runtime.api.localPath)})` : "";
1136
+ skipped.push(`api local${path}`);
1137
+ }
1138
+ if (refreshed.runtime.auth) if (refreshed.runtime.auth.source !== "local") fetched.push(`auth remote (${refreshed.runtime.auth.url})`);
1139
+ else {
1140
+ const path = refreshed.runtime.auth.localPath ? ` (${(0, node_path.relative)(projectDir, refreshed.runtime.auth.localPath)})` : "";
1141
+ skipped.push(`auth local${path}`);
1142
+ }
1143
+ for (const [key, plugin] of pluginEntries) if (plugin.url && plugin.source !== "local") fetched.push(`${key} remote (${plugin.url})`);
1144
+ else if (plugin.localPath) skipped.push(`${key} local (${(0, node_path.relative)(projectDir, plugin.localPath)})`);
1145
+ else skipped.push(`${key} no URL resolved`);
1139
1146
  const generated = ["ui/src/lib/api-types.gen.ts", "ui/src/lib/auth-types.gen.ts"];
1140
1147
  if (hasLocalApiWorkspace) generated.push("api/src/lib/plugins-types.gen.ts", "api/src/lib/auth-types.gen.ts");
1141
1148
  if ((0, node_fs.existsSync)((0, node_path.join)(projectDir, "host", "src"))) generated.push("host/src/lib/auth-types.gen.ts");
1149
+ for (const [key, _plugin] of pluginEntries) if ((0, node_fs.existsSync)((0, node_path.join)(projectDir, "plugins", key, "src", "lib", "plugins-client.gen.ts"))) generated.push(`plugins/${key}/src/lib/plugins-client.gen.ts`);
1142
1150
  return {
1143
1151
  status: "success",
1144
1152
  generated,
1145
1153
  fetched,
1146
1154
  skipped,
1147
- failed: [],
1148
- source: refreshed.runtime.api.source
1155
+ failed: []
1149
1156
  };
1150
1157
  }
1151
1158
  const artifacts = await require_code_artifacts.generateCodeArtifacts(projectDir, refreshed.config, { runtimeConfig: refreshed.runtime });
@@ -1154,13 +1161,16 @@ var plugin_default = (0, every_plugin.createPlugin)({
1154
1161
  if (hasLocalApiWorkspace) generated.push("api/src/lib/plugins-types.gen.ts", "api/src/lib/auth-types.gen.ts");
1155
1162
  if (refreshed.runtime.auth && (refreshed.runtime.auth.source !== "local" || refreshed.runtime.auth.localPath)) generated.push("ui/src/lib/auth-types.gen.ts");
1156
1163
  if ((0, node_fs.existsSync)((0, node_path.join)(projectDir, "host", "src"))) generated.push("host/src/lib/auth-types.gen.ts");
1164
+ for (const [key, _plugin] of Object.entries(refreshed.runtime.plugins ?? {})) if ((0, node_fs.existsSync)((0, node_path.join)(projectDir, "plugins", key, "src", "lib", "plugins-client.gen.ts"))) generated.push(`plugins/${key}/src/lib/plugins-client.gen.ts`);
1157
1165
  const contractStatus = artifacts?.contractStatus ?? [];
1158
1166
  const fetched = [];
1159
1167
  const skipped = [];
1160
1168
  const failed = [];
1161
- for (const entry of contractStatus) if (entry.source === "remote") fetched.push(entry.url ? `${entry.key} (${entry.url})` : entry.key);
1162
- else if (entry.source === "local") skipped.push(`${entry.key} (local)`);
1163
- else if (entry.source === "skipped") skipped.push(`${entry.key} (no URL resolved)`);
1169
+ for (const entry of contractStatus) if (entry.source === "remote") fetched.push(entry.url ? `${entry.key} remote (${entry.url})` : entry.key);
1170
+ else if (entry.source === "local") {
1171
+ const path = entry.localPath ? ` (${(0, node_path.relative)(projectDir, entry.localPath)})` : "";
1172
+ skipped.push(`${entry.key} local${path}`);
1173
+ } else if (entry.source === "skipped") skipped.push(`${entry.key} no URL resolved`);
1164
1174
  else if (entry.source === "failed") {
1165
1175
  const detail = entry.error ? `: ${entry.error}` : "";
1166
1176
  failed.push(`${entry.key}${detail}`);
@@ -1170,8 +1180,7 @@ var plugin_default = (0, every_plugin.createPlugin)({
1170
1180
  generated,
1171
1181
  fetched,
1172
1182
  skipped,
1173
- failed,
1174
- source: refreshed.runtime.api.source
1183
+ failed
1175
1184
  };
1176
1185
  } catch (error) {
1177
1186
  return {