Skip to content

Commit d7eaef6

Browse files
committed
Merge branch 'hotfix/v9.0.3'
# Conflicts: # scripts/sdkjs_common/jsdoc/config/plugins/cell.json # scripts/sdkjs_common/jsdoc/config/plugins/common.json # scripts/sdkjs_common/jsdoc/config/plugins/correct_doclets.js # scripts/sdkjs_common/jsdoc/config/plugins/events/correct_doclets.js # scripts/sdkjs_common/jsdoc/config/plugins/forms.json # scripts/sdkjs_common/jsdoc/config/plugins/methods/cell.json # scripts/sdkjs_common/jsdoc/config/plugins/methods/common.json # scripts/sdkjs_common/jsdoc/config/plugins/methods/forms.json # scripts/sdkjs_common/jsdoc/config/plugins/methods/slide.json # scripts/sdkjs_common/jsdoc/config/plugins/methods/word.json # scripts/sdkjs_common/jsdoc/config/plugins/slide.json # scripts/sdkjs_common/jsdoc/config/plugins/word.json # scripts/sdkjs_common/jsdoc/office-api/config/cell.json # scripts/sdkjs_common/jsdoc/office-api/config/forms.json # scripts/sdkjs_common/jsdoc/office-api/config/pdf.json # scripts/sdkjs_common/jsdoc/office-api/config/slide.json # scripts/sdkjs_common/jsdoc/office-api/config/word.json # scripts/sdkjs_common/jsdoc/office-api/generate_docs_md.py # scripts/sdkjs_common/jsdoc/plugins/config/correct_doclets.js # scripts/sdkjs_common/jsdoc/plugins/generate_docs_events_json.py # version
2 parents 7ef302f + 0c7b8a2 commit d7eaef6

34 files changed

+830
-1367
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ necessary for the compilation process, all the dependencies required for the
88
correct work, as well as to get the latest version of
99
**ONLYOFFICE products** source code and build all their components.
1010

11-
**Important!** We can only guarantee the correct work of the products built from
12-
the `master` branch.
11+
**Important!** We can only guarantee the correct work of the products built
12+
from the `master` branch.
1313

1414
## How to use - Linux
1515

develop/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ but don't want to compile pretty compilcated core product to make those changes.
66

77
## System requirements
88

9+
**Note**: ARM-based architectures are currently **NOT** supported;
10+
attempting to run the images on ARM devices may result in startup failures
11+
or other runtime issues.
12+
913
### Windows
1014

1115
You need the latest

scripts/build_js.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ def make():
109109

110110
# JS build
111111
def _run_npm(directory):
112-
return base.cmd_in_dir(directory, "npm", ["install"])
112+
retValue = base.cmd_in_dir(directory, "npm", ["install"], True)
113+
if (0 != retValue):
114+
retValue = base.cmd_in_dir(directory, "npm", ["install", "--verbose"])
115+
return retValue
113116

114117
def _run_npm_ci(directory):
115118
return base.cmd_in_dir(directory, "npm", ["ci"])
@@ -122,7 +125,7 @@ def _run_grunt(directory, params=[]):
122125

123126
def build_interface(directory):
124127
_run_npm(directory)
125-
_run_grunt(directory, ["--force"] + base.web_apps_addons_param())
128+
_run_grunt(directory, ["--force", "--verbose"] + base.web_apps_addons_param())
126129
return
127130

128131
def get_build_param(minimize=True):

scripts/sdkjs_common/generate_builder_intarface.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def writeFile(path, content):
1313
if (os.path.isfile(path)):
1414
os.remove(path)
1515

16-
with open(path, "w") as file:
16+
with open(path, "w", encoding='utf-8') as file:
1717
file.write(content)
1818
return
1919

@@ -160,6 +160,12 @@ def append_record(self, decoration, code, init=False):
160160
editors_support = decoration[index_type_editors:index_type_editors_end]
161161
if -1 == editors_support.find(self.type):
162162
return
163+
164+
decoration = "\n".join(
165+
line for line in decoration.splitlines()
166+
if "@typeofeditors" not in line and "@see" not in line
167+
)
168+
163169
# optimizations for first file
164170
if 0 == self.numfile:
165171
self.records.append(decoration + "\n" + code + "\n")
@@ -208,7 +214,7 @@ def convert_to_interface(arrFiles, sEditorType):
208214
type=str,
209215
help="Destination directory for the generated documentation",
210216
nargs='?', # Indicates the argument is optional
211-
default="../../../onlyoffice.github.io\sdkjs-plugins\content\macros\libs/" # Default value
217+
default="../../../web-apps/vendor/monaco/libs/" # Default value
212218
)
213219
args = parser.parse_args()
214220

@@ -217,7 +223,7 @@ def convert_to_interface(arrFiles, sEditorType):
217223
if True == os.path.isdir(args.destination):
218224
shutil.rmtree(args.destination, ignore_errors=True)
219225
os.mkdir(args.destination)
220-
convert_to_interface(["word/apiBuilder.js"], "word")
226+
convert_to_interface(["word/apiBuilder.js", "../sdkjs-forms/apiBuilder.js"], "word")
221227
convert_to_interface(["word/apiBuilder.js", "slide/apiBuilder.js"], "slide")
222228
convert_to_interface(["word/apiBuilder.js", "slide/apiBuilder.js", "cell/apiBuilder.js"], "cell")
223229
os.chdir(old_cur)

scripts/sdkjs_common/jsdoc/README.md

Lines changed: 76 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
21
# Documentation Generation Guide
32

4-
This guide explains how to generate documentation for Onlyoffice Builder/Plugins API using the provided Python scripts: `generate_docs_json.py`, `generate_docs_plugins_json.py`, `generate_docs_md.py`. These scripts are used to create JSON and Markdown documentation for the `apiBuilder.js` files from the word, cell, and slide editors.
3+
This guide explains how to generate documentation for Onlyoffice Builder
4+
and Plugins (Methods/Events) API using the following Python scripts:
5+
6+
- `office-api/generate_docs_json.py`
7+
- `office-api/generate_docs_md.py`
8+
- `plugins/generate_docs_methods_json.py`
9+
- `plugins/generate_docs_methods_md.py`
10+
- `plugins/generate_docs_events_json.py`
11+
- `plugins/generate_docs_events_md.py`
512

613
## Requirements
714

@@ -20,61 +27,112 @@ npm install
2027

2128
## Scripts Overview
2229

23-
### `generate_docs_json.py`
30+
### `office-api/generate_docs_json.py`
2431

2532
This script generates JSON documentation based on the `apiBuilder.js` files.
2633

2734
- **Usage**:
35+
2836
```bash
2937
python generate_docs_json.py output_path
3038
```
3139

3240
- **Parameters**:
33-
- `output_path` (optional): The directory where the JSON documentation will be saved. If not specified, the default path is `../../../../office-js-api-declarations/office-js-api`.
41+
- `output_path` (optional): The directory where the JSON documentation
42+
will be saved. If not specified, the default path is
43+
`../../../../office-js-api-declarations/office-js-api`.
44+
45+
### `office-api/generate_docs_md.py`
46+
47+
This script generates Markdown documentation from the `apiBuilder.js` files.
48+
49+
- **Usage**:
50+
51+
```bash
52+
python generate_docs_md.py output_path
53+
```
54+
55+
- **Parameters**:
56+
- `output_path` (optional): The directory where the Markdown documentation
57+
will be saved. If not specified, the default path is
58+
`../../../../office-js-api/`.
3459

35-
### `generate_docs_plugins_json.py`
60+
### `plugins/generate_docs_methods_json.py`
3661

3762
This script generates JSON documentation based on the `api_plugins.js` files.
3863

3964
- **Usage**:
65+
4066
```bash
41-
python generate_docs_plugins_json.py output_path
67+
python generate_docs_methods_json.py output_path
4268
```
4369

4470
- **Parameters**:
45-
- `output_path` (optional): The directory where the JSON documentation will be saved. If not specified, the default path is `../../../../office-js-api-declarations/office-js-api-plugins`.
71+
- `output_path` (optional): The directory where the JSON documentation
72+
will be saved. If not specified, the default path is
73+
`../../../../office-js-api-declarations/office-js-api-plugins`.
4674

47-
### `generate_docs_md.py`
75+
### `plugins/generate_docs_events_json.py`
4876

49-
This script generates Markdown documentation from the `apiBuilder.js` files.
77+
This script generates JSON documentation based on the `plugin-events.js` files.
5078

5179
- **Usage**:
80+
5281
```bash
53-
python generate_docs_md.py output_path
82+
python generate_docs_events_json.py output_path
5483
```
5584

5685
- **Parameters**:
57-
- `output_path` (optional): The directory where the Markdown documentation will be saved. If not specified, the default path is `../../../../office-js-api/`.
86+
- `output_path` (optional): The directory where the JSON documentation
87+
will be saved. If not specified, the default path is
88+
`../../../../office-js-api-declarations/office-js-api-plugins`.
89+
90+
### `plugins/generate_docs_methods_md.py`
91+
92+
This script generates Markdown documentation from the `api_plugins.js` files.
93+
94+
- **Usage**:
95+
96+
```bash
97+
python generate_docs_methods_md.py output_path
98+
```
99+
100+
- **Parameters**:
101+
- `output_path` (optional): The directory where the Markdown documentation
102+
will be saved. If not specified, the default path is
103+
`../../../../office-js-api/`.
104+
105+
### `plugins/generate_docs_events_md.py`
106+
107+
This script generates Markdown documentation from the `plugin-events.js` files.
108+
109+
- **Usage**:
110+
111+
```bash
112+
python generate_docs_events_md.py output_path
113+
```
114+
115+
- **Parameters**:
116+
- `output_path` (optional): The directory where the Markdown documentation
117+
will be saved. If not specified, the default path is
118+
`../../../../office-js-api/`.
58119

59120
## Example
60121

61122
To generate JSON documentation with the default output path:
62-
```bash
63-
python generate_docs_json.py /path/to/save/json
64-
```
65123

66-
To generate JSON documentation with the default output path:
67124
```bash
68-
python generate_docs_plugins_json.py /path/to/save/json
125+
python generate_docs_json.py /path/to/save/json
69126
```
70127

71128
To generate Markdown documentation and specify a custom output path:
129+
72130
```bash
73131
python generate_docs_md.py /path/to/save/markdown
74132
```
75133

76134
## Notes
77135

78-
- Make sure to have all necessary permissions to run these scripts and write to the specified directories.
136+
- Make sure to have all necessary permissions to run these scripts and write
137+
to the specified directories.
79138
- The output directories will be created if they do not exist.
80-

scripts/sdkjs_common/jsdoc/config/builder/cell.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

scripts/sdkjs_common/jsdoc/config/builder/slide.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)