port-ocean 0.12.7.dev1__py3-none-any.whl → 0.12.7.dev2__py3-none-any.whl

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.

Potentially problematic release.


This version of port-ocean might be problematic. Click here for more details.

@@ -65,4 +65,6 @@ class HttpEventListener(BaseEventListener):
65
65
  async def resync(request: Request) -> None:
66
66
  await self._resync({})
67
67
 
68
- ocean.router.routes.append(Route("/resync", methods=["post"], endpoint=resync))
68
+ ocean.app.starlette_app.routes.append(
69
+ Route("/resync", methods=["post"], endpoint=resync)
70
+ )
port_ocean/ocean.py CHANGED
@@ -44,7 +44,7 @@ class Ocean:
44
44
  ):
45
45
  initialize_port_ocean_context(self)
46
46
 
47
- self.starlette_app = app or Starlette()
47
+ self.starlette_app = app or None
48
48
  self.integration_router = integration_router or Router()
49
49
 
50
50
  self.config = IntegrationConfiguration(
@@ -116,7 +116,7 @@ class Ocean:
116
116
  )
117
117
  await repeated_function()
118
118
 
119
- async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
119
+ def _setup_starlette_app(self):
120
120
  @asynccontextmanager
121
121
  async def lifespan(_: Starlette) -> AsyncIterator[None]:
122
122
  try:
@@ -141,4 +141,8 @@ class Ocean:
141
141
  lifespan=lifespan,
142
142
  )
143
143
 
144
+ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
145
+ if not self.starlette_app:
146
+ self._setup_starlette_app()
147
+
144
148
  await self.starlette_app(scope, receive, send)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.12.7.dev1
3
+ Version: 0.12.7.dev2
4
4
  Summary: Port Ocean is a CLI tool for managing your Port projects.
5
5
  Home-page: https://app.getport.io
6
6
  Keywords: ocean,port-ocean,port
@@ -67,7 +67,7 @@ port_ocean/core/defaults/initialize.py,sha256=qg4JLIWjp0c5-9w09X99muHRYX4k1cGZ_7
67
67
  port_ocean/core/event_listener/__init__.py,sha256=mzJ33wRq0kh60fpVdOHVmvMTUQIvz3vxmifyBgwDn0E,889
68
68
  port_ocean/core/event_listener/base.py,sha256=1Nmpg00OfT2AD2L8eFm4VQEcdG2TClpSWJMhWhAjkEE,2356
69
69
  port_ocean/core/event_listener/factory.py,sha256=AYYfSHPAF7P5H-uQECXT0JVJjKDHrYkWJJBSL4mGkg8,3697
70
- port_ocean/core/event_listener/http.py,sha256=ByO0puywx-NagVqpHwWKv1NldgWqkjTgwCGmkR1Et2k,2562
70
+ port_ocean/core/event_listener/http.py,sha256=CXB4DeylOoIxLvRNlywHYe58viTM7s6kXlbshQTWrOs,2595
71
71
  port_ocean/core/event_listener/kafka.py,sha256=ulidnp4sz-chXwHsbH9JayVjcxy_mG6ts_Im3YKmLpI,6983
72
72
  port_ocean/core/event_listener/once.py,sha256=iL3NkujZOw-7LpxT-EAUJUcAuiAZPm4ZzjHTSt9EdHs,5918
73
73
  port_ocean/core/event_listener/polling.py,sha256=d9E3oRLy-Ogb0oadZNxSDgSLIHe4z92uMVwztscZycg,3667
@@ -115,7 +115,7 @@ port_ocean/log/handlers.py,sha256=k9G_Mb4ga2-Jke9irpdlYqj6EYiwv0gEsh4TgyqqOmI,28
115
115
  port_ocean/log/logger_setup.py,sha256=BaXt-mh9CVXhneh37H46d04lqOdIBixG1pFyGfotuZs,2328
116
116
  port_ocean/log/sensetive.py,sha256=lVKiZH6b7TkrZAMmhEJRhcl67HNM94e56x12DwFgCQk,2920
117
117
  port_ocean/middlewares.py,sha256=K_FGt39YgiC0397W3ON1Z0n0bRIke95sZkw7a0xOiII,2737
118
- port_ocean/ocean.py,sha256=bxxcCAWKjz6j6lCEN40OEH4gG1eTqoQeeUpJi2gXLs4,5468
118
+ port_ocean/ocean.py,sha256=J9WocyCyPqSyoWT-lPVCV0w4QZPvqrV4FomGM9tJaBM,5573
119
119
  port_ocean/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  port_ocean/run.py,sha256=rTxBlrQd4yyrtgErCFJCHCEHs7d1OXrRiJehUYmIbN0,2212
121
121
  port_ocean/sonar-project.properties,sha256=X_wLzDOkEVmpGLRMb2fg9Rb0DxWwUFSvESId8qpvrPI,73
@@ -141,8 +141,8 @@ port_ocean/utils/repeat.py,sha256=0EFWM9d8lLXAhZmAyczY20LAnijw6UbIECf5lpGbOas,32
141
141
  port_ocean/utils/signal.py,sha256=K-6kKFQTltcmKDhtyZAcn0IMa3sUpOHGOAUdWKgx0_E,1369
142
142
  port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
143
143
  port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
144
- port_ocean-0.12.7.dev1.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
145
- port_ocean-0.12.7.dev1.dist-info/METADATA,sha256=EC1_Ph-D2G_JiDaYm3Ex28ZejTgQHe4zJH7C7XKj5tc,6674
146
- port_ocean-0.12.7.dev1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
147
- port_ocean-0.12.7.dev1.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
148
- port_ocean-0.12.7.dev1.dist-info/RECORD,,
144
+ port_ocean-0.12.7.dev2.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
145
+ port_ocean-0.12.7.dev2.dist-info/METADATA,sha256=Wfhk4P4eAaEQa7XLMjvO_uSfzu5uz3tsvZM1UnB6d9c,6674
146
+ port_ocean-0.12.7.dev2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
147
+ port_ocean-0.12.7.dev2.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
148
+ port_ocean-0.12.7.dev2.dist-info/RECORD,,