Skip to content

Commit 8951c4d

Browse files
Merge pull request #35 from MaksymStoianov/max/next
Max/next
2 parents cd0d22f + c196f2d commit 8951c4d

12 files changed

Lines changed: 387 additions & 156 deletions

File tree

.husky/pre-commit

100644100755
Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,3 @@
11
#!/bin/bash
22

3-
# Переходим в корневой каталог репозитория
4-
cd "$(git rev-parse --show-toplevel)" || exit 1
5-
6-
# Проверка на наличие node_modules
7-
echo "[plugin husky:pre-commit]: Checking for node_modules..."
8-
if [ ! -d "node_modules" ]; then
9-
echo " ✗ Error: Missing node_modules. Please run 'npm install' first."
10-
exit 1
11-
fi
12-
echo " ✓ Done."
13-
echo "" # Добавляем пустую строку для лучшей читаемости
14-
15-
# 1. Запуск аудита безопасности
16-
echo "[plugin husky:pre-commit]: Running npm audit..."
17-
npm audit --audit-level=high
18-
if [ $? -ne 0 ]; then
19-
echo " ✗ Error: npm audit failed."
20-
exit 1
21-
fi
22-
echo " ✓ Done."
23-
echo ""
24-
25-
# 2. Проверка типов TypeScript без компиляции
26-
echo "[plugin husky:pre-commit]: Running tsc..."
27-
tsc --noEmit
28-
if [ $? -ne 0 ]; then
29-
echo " ✗ Error: TypeScript check failed."
30-
exit 1
31-
fi
32-
echo " ✓ Done."
33-
echo ""
34-
35-
# 3. Линтинг и форматирование
36-
echo "[plugin husky:pre-commit]: Running lint..."
37-
npm run lint
38-
if [ $? -ne 0 ]; then
39-
echo " ✗ Error: Linting failed."
40-
exit 1
41-
fi
42-
echo " ✓ Done."
43-
echo ""
44-
45-
echo "[plugin husky:pre-commit]: Running format..."
46-
npm run format
47-
if [ $? -ne 0 ]; then
48-
echo " ✗ Error: Formatting failed."
49-
exit 1
50-
fi
51-
echo " ✓ Done."
52-
echo ""
53-
54-
echo "[plugin husky:pre-commit]: All checks passed successfully."
55-
exit 0
3+
bash ./sctipts/pre-commit.sh

.husky/pre-push

100644100755
Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,3 @@
11
#!/bin/bash
22

3-
# Переходим в корневой каталог репозитория
4-
cd "$(git rev-parse --show-toplevel)" || exit 1
5-
6-
# Проверка на наличие node_modules
7-
echo "[plugin husky:pre-push]: Checking for node_modules..."
8-
if [ ! -d "node_modules" ]; then
9-
echo " ✗ Error: Missing node_modules. Please run 'npm install' first."
10-
exit 1
11-
fi
12-
echo " ✓ Done."
13-
echo "" # Добавляем пустую строку для лучшей читаемости
14-
15-
# 1. Запуск аудита безопасности
16-
echo "[plugin husky:pre-push]: Running npm audit..."
17-
npm audit --audit-level=high
18-
if [ $? -ne 0 ]; then
19-
echo " ✗ Error: npm audit failed."
20-
exit 1
21-
fi
22-
echo " ✓ Done."
23-
echo ""
24-
25-
# 2. Проверка типов TypeScript без компиляции
26-
echo "[plugin husky:pre-push]: Running tsc..."
27-
tsc --noEmit
28-
if [ $? -ne 0 ]; then
29-
echo " ✗ Error: TypeScript check failed."
30-
exit 1
31-
fi
32-
echo " ✓ Done."
33-
echo ""
34-
35-
# 3. Линтинг и форматирование
36-
echo "[plugin husky:pre-push]: Running lint..."
37-
npm run lint
38-
if [ $? -ne 0 ]; then
39-
echo " ✗ Error: Linting failed."
40-
exit 1
41-
fi
42-
echo " ✓ Done."
43-
echo ""
44-
45-
echo "[plugin husky:pre-push]: Running format..."
46-
npm run format
47-
if [ $? -ne 0 ]; then
48-
echo " ✗ Error: Formatting failed."
49-
exit 1
50-
fi
51-
echo " ✓ Done."
52-
echo ""
53-
54-
echo "[plugin husky:pre-push]: Running test..."
55-
npm run test
56-
if [ $? -ne 0 ]; then
57-
echo " ✗ Error: Test failed."
58-
exit 1
59-
fi
60-
echo " ✓ Done."
61-
echo ""
62-
63-
echo "[plugin husky:pre-push]: All checks passed successfully."
64-
exit 0
3+
bash ./sctipts/pre-push.sh

.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<a name="top"></a>
22

3-
![Project banner for Google Apps Script Utils](docs/assets/google-apps-script-utils-author-MaksymStoianov-artist-DarynaMikhailenko.jpg)
3+
![Project banner for Google Apps Script Utils](docs/assets/images/banner-1280x640.jpg)
44

55
<p align="right">
66
<i>Artist: <a href="https://darynamikhailenko.com/?utm_source=github&utm_medium=readme&utm_campaign=appsscript-utils&utm_content=banner-artist-credit" title="Portfolio of Daryna Mikhailenko, the artist">Daryna Mikhailenko</a></i>
@@ -54,7 +54,7 @@ Functions that enable various operations on a collection of base utility methods
5454
<details open><summary>Functions</summary>
5555

5656
| Function | Description |
57-
|:----------------------------------------------------|:---------------------------------------|
57+
| :-------------------------------------------------- | :------------------------------------- |
5858
| [`getByteSize`](src/appsscript/base/getByteSize.ts) | Returns the size of a string in bytes. |
5959

6060
</details>
@@ -71,7 +71,7 @@ Functions that enable various operations on Google Drive.
7171
<details open><summary>Functions</summary>
7272

7373
| Function | Description |
74-
|:---------|:------------|
74+
| :------- | :---------- |
7575
| | |
7676

7777
</details>
@@ -83,7 +83,7 @@ Functions that enable various operations on Google Docs.
8383
<details open><summary>Functions</summary>
8484

8585
| Function | Description |
86-
|:---------|:------------|
86+
| :------- | :---------- |
8787
| | |
8888

8989
</details>
@@ -95,7 +95,7 @@ Functions that enable various operations on Google Forms.
9595
<details open><summary>Functions</summary>
9696

9797
| Function | Description |
98-
|:---------|:------------|
98+
| :------- | :---------- |
9999
| | |
100100

101101
</details>
@@ -107,7 +107,7 @@ Functions that enable various operations on Google Sheets.
107107
<details open><summary>Functions</summary>
108108

109109
| Function | Description |
110-
|:----------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------|
110+
| :-------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
111111
| [`appendColumn`](src/appsscript/sheet/appendColumn.ts) | Appends a single column of data to the sheet. |
112112
| [`appendColumns`](src/appsscript/sheet/appendColumns.ts) | Appends multiple columns of data to the sheet. |
113113
| [`appendRow`](src/appsscript/sheet/appendRow.ts) | Appends a single row of data to the sheet. |
@@ -154,7 +154,7 @@ Functions that enable various operations on Google Slides.
154154
<details open><summary>Functions</summary>
155155

156156
| Function | Description |
157-
|:---------|:------------|
157+
| :------- | :---------- |
158158
| | |
159159

160160
</details>
@@ -166,7 +166,7 @@ Functions that enable various operations on the user interface, including sideba
166166
<details open><summary>Functions</summary>
167167

168168
| Function | Description |
169-
|:--------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------|
169+
| :------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------- |
170170
| [`checkMultipleAccount`](src/appsscript/ui/checkMultipleAccount.ts) | Checks if multiple Google accounts are in use. |
171171
| [`isHtmlOutput`](src/appsscript/ui/isHtmlOutput.ts) | Checks if an object is an [`HtmlOutput`](https://developers.google.com/apps-script/reference/html/html-output). |
172172
| [`isTextOutput`](src/appsscript/ui/isTextOutput.ts) | Checks if an object is a [`TextOutput`](https://developers.google.com/apps-script/reference/content/text-output). |
@@ -183,7 +183,7 @@ This package contains core utility functions that are not tied to a specific App
183183
<details open><summary>Functions</summary>
184184

185185
| Function | Description |
186-
|:--------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|
186+
| :------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------- |
187187
| [`chunk`](src/lang/array/chunk.ts) | Splits an array into chunks of a specified size. |
188188
| [`decodeHtml`](src/html/decodeHtml.ts) | Decodes HTML entities. |
189189
| [`encodeHtml`](src/html/encodeHtml.ts) | Encodes a string for safe use in HTML. |
@@ -254,14 +254,14 @@ This package is for all exception classes.
254254
<details open><summary>Functions</summary>
255255

256256
| Exception | Description |
257-
|:-------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------|
257+
| :----------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------ |
258258
| [`AdminDirectoryException`](src/exception/appsscript/admin/AdminDirectoryException.ts) | Represents an exception thrown when the Admin SDK Directory Service is not available or enabled. |
259259
| [`InvalidGridRangeException`](src/exception/appsscript/sheet/InvalidGridRangeException.ts) | Represents an exception thrown when an invalid [`GridRange`](src/appsscript/sheet/types/GridRange.ts) object is provided. |
260260
| [`InvalidRangeException`](src/exception/appsscript/sheet/InvalidRangeException.ts) | Represents an exception thrown when an invalid [range](https://developers.google.com/apps-script/reference/spreadsheet/sheet) object is provided. |
261261
| [`InvalidSheetException`](src/exception/appsscript/sheet/InvalidSheetException.ts) | Represents an exception thrown when an invalid [sheet](https://developers.google.com/apps-script/reference/spreadsheet/sheet) object is provided. |
262262

263263
| Exception | Description |
264-
|:------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|
264+
| :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- |
265265
| [`Exception`](src/exception/Exception.ts) | Base exception class. |
266266
| [`RuntimeException`](src/exception/RuntimeException.ts) | Exception for runtime errors. |
267267
| [`EmptyStringException`](src/exception/EmptyStringException.ts) | Exception for empty strings. |
@@ -279,7 +279,7 @@ Functions for working with file paths and URLs.
279279
<details open><summary>Functions</summary>
280280

281281
| Function | Description |
282-
|:-------------------------------------------------|:----------------------------------------------------------------|
282+
| :----------------------------------------------- | :-------------------------------------------------------------- |
283283
| [`isAbsolute`](src/net/path/isAbsolute.ts) | Checks if a path is absolute. |
284284
| [`isRelative`](src/net/path/isRelative.ts) | Checks if a path is relative. |
285285
| [`isValidDomain`](src/net/path/isValidDomain.ts) | Checks if a string is a valid domain name. |
@@ -294,15 +294,15 @@ Functions for working with file paths and URLs.
294294
<details open><summary>Functions</summary>
295295

296296
| Abstract | Description |
297-
|:-----------------------------|:------------|
297+
| :--------------------------- | :---------- |
298298
| [`Class`](src/lang/Class.ts) | |
299299

300300
</details>
301301

302302
<details open><summary>Functions</summary>
303303

304304
| Interface | Description |
305-
|:-----------------------------------|:-------------------------|
305+
| :--------------------------------- | :----------------------- |
306306
| [`Iterator`](src/lang/Iterator.ts) | Interface for iterators. |
307307

308308
</details>

docs/assets/google-apps-script-utils-author-MaksymStoianov-artist-DarynaMikhailenko.jpg renamed to docs/assets/images/banner-1280x640.jpg

File renamed without changes.

docs/assets/google-apps-script-utils-author-MaksymStoianov-artist-DarynaMikhailenko-2.jpg renamed to docs/assets/images/banner-1280x926.jpg

File renamed without changes.

0 commit comments

Comments
 (0)