port-ocean 0.28.14__py3-none-any.whl → 0.28.15__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.

@@ -808,5 +808,12 @@ class JQEntityProcessor(BaseEntityProcessor):
808
808
  ) -> dict[str, Any]:
809
809
  if isinstance(data, tuple):
810
810
  raw_data = json.loads(data[1])
811
- return {items_to_parse_name: data[0], **raw_data}
811
+ return {
812
+ **(
813
+ data[0]
814
+ if items_to_parse_name in data[0]
815
+ else {items_to_parse_name: data[0]}
816
+ ),
817
+ **raw_data,
818
+ }
812
819
  return data
@@ -123,7 +123,7 @@ class SyncRawMixin(HandlerMixin, EventsMixin):
123
123
  f"Found sync function for {resource_config.kind} name: {task.__qualname__}"
124
124
  )
125
125
  task = typing.cast(Callable[[str], Awaitable[RAW_RESULT]], task)
126
- tasks.append(resync_function_wrapper(task, resource_config.kind))
126
+ tasks.append(resync_function_wrapper(task, resource_config.kind, resource_config.port.items_to_parse))
127
127
 
128
128
  logger.info(
129
129
  f"Found {len(tasks) + len(results)} resync tasks for {resource_config.kind}"
@@ -56,7 +56,7 @@ def _process_path_type_items(
56
56
  content = json.loads(f.read())
57
57
  # Create a copy of the item with the content field
58
58
  processed_item = item.copy()
59
- processed_item["content"] = content
59
+ processed_item["file"]["content"] = content
60
60
  processed_result.append(processed_item)
61
61
  else:
62
62
  # If file doesn't exist, keep the original item
@@ -97,12 +97,12 @@ def resync_error_handling() -> Generator[None, None, None]:
97
97
 
98
98
 
99
99
  async def resync_function_wrapper(
100
- fn: Callable[[str], Awaitable[RAW_RESULT]], kind: str
100
+ fn: Callable[[str], Awaitable[RAW_RESULT]], kind: str, items_to_parse: str | None = None
101
101
  ) -> RAW_RESULT:
102
102
  with resync_error_handling():
103
103
  results = await fn(kind)
104
104
  validated_results = validate_result(results)
105
- return _process_path_type_items(validated_results)
105
+ return _process_path_type_items(validated_results, items_to_parse)
106
106
 
107
107
 
108
108
  async def resync_generator_wrapper(
@@ -117,7 +117,7 @@ async def resync_generator_wrapper(
117
117
  result = await anext(generator)
118
118
  if not ocean.config.yield_items_to_parse:
119
119
  validated_result = validate_result(result)
120
- processed_result = _process_path_type_items(validated_result)
120
+ processed_result = _process_path_type_items(validated_result,items_to_parse)
121
121
  yield processed_result
122
122
  else:
123
123
  if items_to_parse:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.28.14
3
+ Version: 0.28.15
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
@@ -101,7 +101,7 @@ port_ocean/core/handlers/entities_state_applier/port/get_related_entities.py,sha
101
101
  port_ocean/core/handlers/entities_state_applier/port/order_by_entities_dependencies.py,sha256=lyv6xKzhYfd6TioUgR3AVRSJqj7JpAaj1LxxU2xAqeo,1720
102
102
  port_ocean/core/handlers/entity_processor/__init__.py,sha256=FvFCunFg44wNQoqlybem9MthOs7p1Wawac87uSXz9U8,156
103
103
  port_ocean/core/handlers/entity_processor/base.py,sha256=PsnpNRqjHth9xwOvDRe7gKu8cjnVV0XGmTIHGvOelX0,1867
104
- port_ocean/core/handlers/entity_processor/jq_entity_processor.py,sha256=VEL_aEme7gGrS0jvKgYMcBPIX02ntW7lT5V1KG12pJA,32003
104
+ port_ocean/core/handlers/entity_processor/jq_entity_processor.py,sha256=Z0njO1z2FUh8hX4GTdH7CmO0Afv-WeYRtxPs34mxKWE,32181
105
105
  port_ocean/core/handlers/entity_processor/jq_input_evaluator.py,sha256=hInrBMQBbOqZApB53CMLyTgLtC7FltRtqK9PqD0CgM0,4803
106
106
  port_ocean/core/handlers/port_app_config/__init__.py,sha256=8AAT5OthiVM7KCcM34iEgEeXtn2pRMrT4Dze5r1Ixbk,134
107
107
  port_ocean/core/handlers/port_app_config/api.py,sha256=r_Th66NEw38IpRdnXZcRvI8ACfvxW_A6V62WLwjWXlQ,1044
@@ -124,8 +124,8 @@ port_ocean/core/integrations/mixins/events.py,sha256=2L7P3Jhp8XBqddh2_o9Cn4N261n
124
124
  port_ocean/core/integrations/mixins/handler.py,sha256=mZ7-0UlG3LcrwJttFbMe-R4xcOU2H_g33tZar7PwTv8,3771
125
125
  port_ocean/core/integrations/mixins/live_events.py,sha256=zM24dhNc7uHx9XYZ6toVhDADPA90EnpOmZxgDegFZbA,4196
126
126
  port_ocean/core/integrations/mixins/sync.py,sha256=Vm_898pLKBwfVewtwouDWsXoxcOLicnAy6pzyqqk6U8,4053
127
- port_ocean/core/integrations/mixins/sync_raw.py,sha256=Zga3fSxALuXmAMKmIS0hZYWRe22lSGhiSVFWUCI4f1U,40972
128
- port_ocean/core/integrations/mixins/utils.py,sha256=vfKBwJFKI2zN5VgimOZQzCXE7bbpSCkBP8QT-9hJiBs,14516
127
+ port_ocean/core/integrations/mixins/sync_raw.py,sha256=TrdgwaCNbE-VEJBDRqWmLQR_1Epz6y5nEIbPaLZbe3A,41009
128
+ port_ocean/core/integrations/mixins/utils.py,sha256=hRIkvxw1bIfilq6n_2fqUiv_5OSKFMl6HmJfimH2hTA,14590
129
129
  port_ocean/core/models.py,sha256=DNbKpStMINI2lIekKprTqBevqkw_wFuFayN19w1aDfQ,2893
130
130
  port_ocean/core/ocean_types.py,sha256=bkLlTd8XfJK6_JDl0eXUHfE_NygqgiInSMwJ4YJH01Q,1399
131
131
  port_ocean/core/utils/entity_topological_sorter.py,sha256=MDUjM6OuDy4Xj68o-7InNN0w1jqjxeDfeY8U02vySNI,3081
@@ -211,8 +211,8 @@ port_ocean/utils/repeat.py,sha256=U2OeCkHPWXmRTVoPV-VcJRlQhcYqPWI5NfmPlb1JIbc,32
211
211
  port_ocean/utils/signal.py,sha256=J1sI-e_32VHP_VUa5bskLMFoJjJOAk5isrnewKDikUI,2125
212
212
  port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
213
213
  port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
214
- port_ocean-0.28.14.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
215
- port_ocean-0.28.14.dist-info/METADATA,sha256=_w_kDhykkm9LosWg6OOe8HhARPQXRoL4duh__TvB68U,7016
216
- port_ocean-0.28.14.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
217
- port_ocean-0.28.14.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
218
- port_ocean-0.28.14.dist-info/RECORD,,
214
+ port_ocean-0.28.15.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
215
+ port_ocean-0.28.15.dist-info/METADATA,sha256=aayam8J_hnYiAJuesIJZy_Y13XcnfYjtg21DM0-Znt8,7016
216
+ port_ocean-0.28.15.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
217
+ port_ocean-0.28.15.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
218
+ port_ocean-0.28.15.dist-info/RECORD,,