oarepo-runtime 1.5.85__py3-none-any.whl → 1.5.87__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.
@@ -6,6 +6,7 @@ from pathlib import Path
6
6
  import click
7
7
  from flask import current_app
8
8
  from flask.cli import with_appcontext
9
+ from flask_webpackext import current_webpack
9
10
  from importlib_metadata import entry_points
10
11
 
11
12
  from .base import oarepo
@@ -22,7 +23,7 @@ def assets():
22
23
  @click.option("--assets-dir", default=".assets")
23
24
  @with_appcontext
24
25
  def collect(output_file, repository_dir, assets_dir):
25
- aliases, asset_dirs = enumerate_assets()
26
+ aliases, asset_dirs, generated_paths = enumerate_assets()
26
27
 
27
28
  app_and_blueprints = [current_app] + list(current_app.blueprints.values())
28
29
 
@@ -60,6 +61,7 @@ def collect(output_file, repository_dir, assets_dir):
60
61
  "static": static_deps,
61
62
  "@aliases": aliases,
62
63
  "@root_aliases": root_aliases,
64
+ "generated": generated_paths,
63
65
  },
64
66
  f,
65
67
  indent=4,
@@ -69,15 +71,22 @@ def collect(output_file, repository_dir, assets_dir):
69
71
 
70
72
  def enumerate_assets():
71
73
  asset_dirs = []
74
+ generated_paths = []
72
75
  aliases = {}
73
76
  themes = current_app.config["APP_THEME"] or ["semantic-ui"]
77
+ project = current_webpack.project
78
+ if hasattr(project, 'generated_paths'):
79
+ generated_paths += project.generated_paths
80
+
74
81
  for ep in entry_points(group="invenio_assets.webpack"):
75
82
  webpack = ep.load()
76
83
  for wp_theme_name, wp_theme in webpack.themes.items():
77
84
  if wp_theme_name in themes:
78
85
  asset_dirs.append(wp_theme.path)
86
+ if hasattr(wp_theme, "generated_paths"):
87
+ generated_paths += list(set(wp_theme.generated_paths) - set(generated_paths))
79
88
  aliases.update(wp_theme.aliases)
80
- return aliases, asset_dirs
89
+ return aliases, asset_dirs, generated_paths
81
90
 
82
91
 
83
92
  COMPONENT_LIST_RE = re.compile(
@@ -115,7 +124,7 @@ COMPONENT_RE = re.compile(
115
124
  @click.argument("output_file", default="-")
116
125
  @with_appcontext
117
126
  def less_components(output_file):
118
- aliases, asset_dirs = enumerate_assets()
127
+ aliases, asset_dirs, _ = enumerate_assets()
119
128
  asset_dirs = [Path(x) for x in asset_dirs]
120
129
  less_component_files = []
121
130
  for asset_dir in asset_dirs:
@@ -11,7 +11,7 @@ from oarepo_runtime.services.generators import RecordOwners
11
11
  from invenio_rdm_records.services.config import RDMRecordServiceConfig
12
12
  from invenio_drafts_resources.services.records.config import RecordServiceConfig as DraftsRecordServiceConfig
13
13
  from invenio_records_resources.services.records.config import RecordServiceConfig as RecordsRecordServiceConfig
14
-
14
+ from invenio_records_resources.services import FileServiceConfig
15
15
  try:
16
16
  from invenio_drafts_resources.services.records.uow import ParentRecordCommitOp
17
17
  except ImportError:
@@ -99,6 +99,7 @@ def process_service_configs(service_config):
99
99
  RDMRecordServiceConfig,
100
100
  DraftsRecordServiceConfig,
101
101
  RecordsRecordServiceConfig,
102
+ FileServiceConfig
102
103
  }
103
104
 
104
105
  for end_index, cls in enumerate(type(service_config).mro()):
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: oarepo-runtime
3
- Version: 1.5.85
3
+ Version: 1.5.87
4
4
  Summary: A set of runtime extensions of Invenio repository
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -6,7 +6,7 @@ oarepo_runtime/proxies.py,sha256=NN_WNj1xuKc-OveoZmzvTFlUonNjSmLIGsv_JUcHGls,285
6
6
  oarepo_runtime/tasks.py,sha256=AciXN1fUq6tzfzNSICh1S6XoHGWiuH76bUqXyzTsOPU,140
7
7
  oarepo_runtime/uow.py,sha256=iyF3R2oCPSVUu38GXoxZallgRD-619q1fWTb8sSaeyQ,4412
8
8
  oarepo_runtime/cli/__init__.py,sha256=daAODgUAB9Nb0O0Kg8vSgJIPKJm92EHMTRuoKwxBCug,373
9
- oarepo_runtime/cli/assets.py,sha256=Yrg9O2dXmrOGH87_3SNxmgrgyt2w4ZzkvQQJVTmLZjk,3634
9
+ oarepo_runtime/cli/assets.py,sha256=ZG80xIOKch7rsU_7QlvZxBQAXNQ9ow5xLsUREsl5MEE,4076
10
10
  oarepo_runtime/cli/base.py,sha256=94RBTa8TOSPxEyEUmYLGXaWen-XktP2-MIbTtZSlCZo,544
11
11
  oarepo_runtime/cli/cf.py,sha256=W0JEJK2JqKubQw8qtZJxohmADDRUBode4JZAqYLDGvc,339
12
12
  oarepo_runtime/cli/check.py,sha256=sCe2PeokSHvNOXHFZ8YHF8NMhsu5nYjyuZuvXHJ6X18,5092
@@ -73,7 +73,7 @@ oarepo_runtime/resources/file_resource.py,sha256=Ta3bFce7l0xwqkkOMOEu9mxbB8BbKj5
73
73
  oarepo_runtime/resources/json_serializer.py,sha256=82_-xQEtxKaPakv8R1oBAFbGnxskF_Ve4tcfcy4PetI,963
74
74
  oarepo_runtime/resources/localized_ui_json_serializer.py,sha256=3V9cJaG_e1PMXKVX_wKfBp1LmbeForwHyBNYdyha4uQ,1878
75
75
  oarepo_runtime/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
- oarepo_runtime/services/components.py,sha256=UuRKnJuUFrOVHBBG229i52T4XhZk1kECo-WKZhieWeI,4811
76
+ oarepo_runtime/services/components.py,sha256=rCdK3amTM2PAihiRFnaoN_Xkm35W-PreAPjm-gAJFww,4902
77
77
  oarepo_runtime/services/generators.py,sha256=j87HitHA_w2awsz0C5IAAJ0qjg9JMtvdO3dvh6FQyfg,250
78
78
  oarepo_runtime/services/results.py,sha256=Ap2mUJHl3V4BSduTrBWPuco0inQVq0QsuCbVhez48uY,5705
79
79
  oarepo_runtime/services/search.py,sha256=9xGTN5Yg6eTdptQ9qjO_umbacf9ooMuHYGXWYfla4-M,6227
@@ -135,9 +135,9 @@ tests/marshmallow_to_json/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
135
135
  tests/marshmallow_to_json/test_datacite_ui_schema.py,sha256=82iLj8nW45lZOUewpWbLX3mpSkpa9lxo-vK-Qtv_1bU,48552
136
136
  tests/marshmallow_to_json/test_simple_schema.py,sha256=izZN9p0v6kovtSZ6AdxBYmK_c6ZOti2_z_wPT_zXIr0,1500
137
137
  tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
138
- oarepo_runtime-1.5.85.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
139
- oarepo_runtime-1.5.85.dist-info/METADATA,sha256=xLjyEEsOykQC2jIlRcsENaEErL8ggHJWWzpXvhsiRWM,4720
140
- oarepo_runtime-1.5.85.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
141
- oarepo_runtime-1.5.85.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
142
- oarepo_runtime-1.5.85.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
143
- oarepo_runtime-1.5.85.dist-info/RECORD,,
138
+ oarepo_runtime-1.5.87.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
139
+ oarepo_runtime-1.5.87.dist-info/METADATA,sha256=_q7RWXnC1qp9a_3JMIlX8P6dV5a-kSXXqo-_4c4pX6o,4720
140
+ oarepo_runtime-1.5.87.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
141
+ oarepo_runtime-1.5.87.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
142
+ oarepo_runtime-1.5.87.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
143
+ oarepo_runtime-1.5.87.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.2.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5