oarepo-runtime 1.5.86__py3-none-any.whl → 1.5.88__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:
@@ -14,10 +14,13 @@ class RecordOwners(Generator):
14
14
  return []
15
15
  if current_app.config.get('INVENIO_RDM_ENABLED', False):
16
16
  owners = getattr(record.parent.access, "owned_by", None)
17
+ if owners is not None:
18
+ owners_list = owners if isinstance(owners, list) else [owners]
19
+ return [UserNeed(owner.owner_id) for owner in owners_list]
17
20
  else:
18
21
  owners = getattr(record.parent, "owners", None)
19
- if owners is not None:
20
- return [UserNeed(owner.id) for owner in owners]
22
+ if owners is not None:
23
+ return [UserNeed(owner.id) for owner in owners]
21
24
  return []
22
25
 
23
26
  def query_filter(self, identity=None, **kwargs):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: oarepo-runtime
3
- Version: 1.5.86
3
+ Version: 1.5.88
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
@@ -103,7 +103,7 @@ oarepo_runtime/services/files/__init__.py,sha256=K8MStrEQf_BUhvzhwPTF93Hkhwrd1dt
103
103
  oarepo_runtime/services/files/components.py,sha256=x6Wd-vvkqTqB1phj2a6h42DNQksN8PuR2XKaOGoNHfw,2400
104
104
  oarepo_runtime/services/files/service.py,sha256=8DH0Pefr9kilM2JnOb-UYsnqerE8Z1Mu4p6DOJ4j_ZU,608
105
105
  oarepo_runtime/services/permissions/__init__.py,sha256=Cgin2Zr1fpaYr-aZcUotdmv0hsrPTUJVQt8ouvU8tuU,95
106
- oarepo_runtime/services/permissions/generators.py,sha256=OAJ_1W5eiLPkNvSXnWTDq0Z4-FU799qHa9tOufiOL3c,1722
106
+ oarepo_runtime/services/permissions/generators.py,sha256=y_jptL-pHDU91xJsLMR0Bfva5EXcZv6JDLZ1x7XxzKQ,1919
107
107
  oarepo_runtime/services/records/__init__.py,sha256=hIoa2fx1AkDr6c-MgY561U2oN9LFeUCtfbVnetpBUOg,78
108
108
  oarepo_runtime/services/records/links.py,sha256=gVe-_hGkLtX7pd6sS6jTbRIhBby2FTn9PXyYPy3yxzs,737
109
109
  oarepo_runtime/services/relations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -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.86.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
139
- oarepo_runtime-1.5.86.dist-info/METADATA,sha256=F6oJ8K7b-A6hNzXd3xLxqaHkYJEcQaEs6r2NEXTOivA,4720
140
- oarepo_runtime-1.5.86.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
141
- oarepo_runtime-1.5.86.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
142
- oarepo_runtime-1.5.86.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
143
- oarepo_runtime-1.5.86.dist-info/RECORD,,
138
+ oarepo_runtime-1.5.88.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
139
+ oarepo_runtime-1.5.88.dist-info/METADATA,sha256=FtYVZcPcE9i3_AG_61zkkHPUNueJDHR6-7da2B8nd_c,4720
140
+ oarepo_runtime-1.5.88.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
141
+ oarepo_runtime-1.5.88.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
142
+ oarepo_runtime-1.5.88.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
143
+ oarepo_runtime-1.5.88.dist-info/RECORD,,