inray 0.0.10 → 0.0.11
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.
- package/LICENSE.md +34 -32
- package/README.md +127 -56
- package/dist/hono/additional-middlewares/swagger-ui/src/assets.d.ts +21 -0
- package/dist/hono/additional-middlewares/swagger-ui/src/assets.d.ts.map +1 -0
- package/dist/hono/additional-middlewares/swagger-ui/src/assets.js +40 -0
- package/dist/hono/additional-middlewares/swagger-ui/src/assets.js.map +1 -0
- package/dist/hono/additional-middlewares/swagger-ui/src/index.d.ts +75 -0
- package/dist/hono/additional-middlewares/swagger-ui/src/index.d.ts.map +1 -0
- package/dist/hono/additional-middlewares/swagger-ui/src/index.js +59 -0
- package/dist/hono/additional-middlewares/swagger-ui/src/index.js.map +1 -0
- package/dist/hono/additional-middlewares/swagger-ui/src/swagger/renderer.d.ts +86 -0
- package/dist/hono/additional-middlewares/swagger-ui/src/swagger/renderer.d.ts.map +1 -0
- package/dist/hono/additional-middlewares/swagger-ui/src/swagger/renderer.js +87 -0
- package/dist/hono/additional-middlewares/swagger-ui/src/swagger/renderer.js.map +1 -0
- package/dist/media_types/_db.d.ts +1 -1
- package/dist/swagger-ui/assets/swagger-ui-bundle.js +2 -0
- package/dist/swagger-ui/assets/swagger-ui-bundle.js.LICENSE.txt +131 -0
- package/dist/swagger-ui/assets/swagger-ui.css +3 -0
- package/dist/swagger-ui/mod.d.ts +3 -0
- package/dist/swagger-ui/mod.d.ts.map +1 -0
- package/dist/swagger-ui/mod.js +2 -0
- package/dist/swagger-ui/mod.js.map +1 -0
- package/dist/swagger-ui/resource.d.ts +37 -0
- package/dist/swagger-ui/resource.d.ts.map +1 -0
- package/dist/swagger-ui/resource.js +43 -0
- package/dist/swagger-ui/resource.js.map +1 -0
- package/package.json +14 -2
package/LICENSE.md
CHANGED
|
@@ -18,38 +18,40 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
18
18
|
|
|
19
19
|
Additional Functionality and integrated external libraries:
|
|
20
20
|
|
|
21
|
-
| Library name | Author | License | Version\* | Modification level\*\*
|
|
22
|
-
| :---------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- | :-----------------------------------------------------------------------------------: | :--------------- |
|
|
23
|
-
| [valibot](https://valibot.dev/) | [Fabian Hiller](https://github.com/fabian-hiller) | [MIT](./src/valibot/LICENSE.md) | **1.5.0** | Zero or low
|
|
24
|
-
| [@valibot/i18n](https://github.com/open-circle/valibot/tree/main/packages/i18n) | [Fabian Hiller](https://github.com/fabian-hiller) | [MIT](./src/valibot/i18n/LICENSE.md) | **1.3.0** | Zero or low
|
|
25
|
-
| [@valibot/to-json-schema](https://github.com/open-circle/valibot/tree/main/packages/to-json-schema) | [Fabian Hiller](https://github.com/fabian-hiller) | [MIT](./src/valibot/to-json-schema/LICENSE.md) | **1.8.0** | Zero
|
|
26
|
-
| [node-cron](https://www.nodecron.com/) | [Lucas Merencia](https://github.com/merencia) | [ISC](./src/node-cron/LICENSE.md) | **4.6.0** | Zero or low
|
|
27
|
-
| [yaml](https://eemeli.org/yaml/#yaml) | [Eemeli Aro](https://github.com/eemeli) | [ISC](./src/yaml/LICENSE.md) | **3.0.0-2 (RC)** | Zero or low
|
|
28
|
-
| [@std/async](https://jsr.io/@std/async) | [Deno authors](https://github.com/denoland) | [MIT](./src/async/LICENSE.md) | **1.5.0** | Zero or low
|
|
29
|
-
| [@std/bytes](https://jsr.io/@std/bytes) | [Deno authors](https://github.com/denoland) | [MIT](./src/bytes/LICENSE.md) | **1.0.6** | Zero or low
|
|
30
|
-
| [@std/collections](https://jsr.io/@std/collections) | [Deno authors](https://github.com/denoland) | [MIT](./src/collections/LICENSE.md) | **1.3.0** | Zero or low
|
|
31
|
-
| [@std/csv](https://jsr.io/@std/csv) | [Deno authors](https://github.com/denoland) | [MIT](./src/csv/LICENSE.md) | **1.0.6** | Low
|
|
32
|
-
| [@std/data-structures](https://jsr.io/@std/data-structures) | [Deno authors](https://github.com/denoland) | [MIT](./src/data-structures/LICENSE.md) | **1.1.1** | Zero or low
|
|
33
|
-
| [@std/encoding](https://jsr.io/@std/encoding) | [Deno authors](https://github.com/denoland) | [MIT](./src/encoding/LICENSE.md) | **1.0.11** | Low
|
|
34
|
-
| [@std/fmt](https://jsr.io/@std/fmt) | [Deno authors](https://github.com/denoland) | [MIT](./src/fmt/LICENSE.md) | **1.0.10** | Low
|
|
35
|
-
| [@std/json](https://jsr.io/@std/json) | [Deno authors](https://github.com/denoland) | [MIT](./src/json/LICENSE.md) | **1.1.0** | Low
|
|
36
|
-
| [@std/jsonc](https://jsr.io/@std/jsonc) | [Deno authors](https://github.com/denoland) | [MIT](./src/jsonc/LICENSE.md) | **1.0.2** | Zero or low
|
|
37
|
-
| [@std/media-types](https://jsr.io/@std/media-types) | [Deno authors](https://github.com/denoland) | [MIT](./src/media_types/LICENSE.md) | **1.1.0** | Zero or low
|
|
38
|
-
| [@std/streams](https://jsr.io/@std/streams) | [Deno authors](https://github.com/denoland) | [MIT](./src/streams/LICENSE.md) | **1.1.1** | Low
|
|
39
|
-
| [jose](https://github.com/panva/jose) | [Filip Skokan](https://github.com/panva) | [MIT](./src/jose/LICENSE.md) | **6.2.15** | Zero or low
|
|
40
|
-
| [date-fns](https://date-fns.org/) | [Sasha Koss](https://github.com/kossnocorp) | [MIT](./src/date-fns/core/LICENSE.md) | **4.4.0** | Zero or low
|
|
41
|
-
| [unidecode](https://github.com/FGRibreau/node-unidecode) | [Francois-Guillaume Ribreau](https://fgribreau.com) | [BSD](./src/unidecode/LICENSE.md) | **1.1.0** | Average
|
|
42
|
-
| [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) | [Nikolay Kuchumov](https://gitlab.com/catamphetamine) | [MIT](./src/phonenumbers/LICENSE.md), [Apache](./src/phonenumbers//LICENSE.Apache.md) | **1.13.11** | High
|
|
43
|
-
| [logtape](https://logtape.org/) and parts: <br> @logtape/config, @logtape/file, <br> @logtape/pretty, @logtape/redaction, @logtape/syslog | [Hong Minhee (洪 民憙)](https://github.com/dahlia) | [MIT](./src/logtape/LICENSE.md) | **2.3.2** | Zero or low
|
|
44
|
-
| [postgres.js](https://github.com/porsager/postgres/tree/master) | [Rasmus Porsager](https://github.com/porsager) | [UNLICENSE](./src/db/postgres/UNLICENSE.md) | **3.4.9** | Zero
|
|
45
|
-
| [hono](https://hono.dev/) | [Yusuke Wada](https://github.com/yusukebe) | [MIT](./src/hono/LICENSE.md) | **4.13.16** | Low
|
|
46
|
-
| [@hono/node-server](https://github.com/honojs/node-server) | [Yusuke Wada](https://github.com/yusukebe) | [MIT](./src/hono/node-server/LICENSE.md) | **2.1.6** | Zero or low
|
|
47
|
-
| [cache-manager](https://cacheable.org/docs/cache-manager/) and parts: keyv, @keyv/serialize, @cacheable/utils, hashery, hookified | [Jared Wray](https://github.com/jaredwray) | [MIT](<./src/caching/LICENSE%20(cache-manager%20and%20parts).md>) | **7.2.9** | Average
|
|
48
|
-
| [commander.js](https://github.com/tj/commander.js) | [TJ Holowaychuk](https://github.com/tj)<br> [John Gee](https://github.com/shadowspawn) | [MIT](./src/cli/LICENSE.md) | **15.0.0** | Average
|
|
49
|
-
| [ley](https://github.com/lukeed/ley) and parts: <br> mk-dirs, totalist | [Luke Edwards](https://github.com/lukeed) | [MIT](./src/db/migrator/LICENSE.md) | **0.8.1** | High
|
|
50
|
-
| [@std/random](https://jsr.io/@std/random) | [Deno authors](https://github.com/denoland) | [MIT](./src/random/LICENSE.md) | **0.1.5** | Zero or low
|
|
51
|
-
| [@std/semver](https://jsr.io/@std/semver) | [Deno authors](https://github.com/denoland)<br> [Isaac Z. Schlueter](https://github.com/isaacs) | [MIT](./src/semver/LICENSE.md), ISC | **1.0.8** | Zero or low
|
|
52
|
-
| [@std/text](https://jsr.io/@std/text) | [Deno authors](https://github.com/denoland)<br> [Isaac Z. Schlueter](https://github.com/isaacs) | [MIT](./src/text/LICENSE.md) | **1.0.19** | Zero or low
|
|
21
|
+
| Library name | Author | License | Version\* | Modification level\*\* | Internal name\*\*\* |
|
|
22
|
+
| :---------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- | :-----------------------------------------------------------------------------------: | :--------------- | ----------------------- | ------------------- |
|
|
23
|
+
| [valibot](https://valibot.dev/) | [Fabian Hiller](https://github.com/fabian-hiller) | [MIT](./src/valibot/LICENSE.md) | **1.5.0** | Zero or low | same |
|
|
24
|
+
| [@valibot/i18n](https://github.com/open-circle/valibot/tree/main/packages/i18n) | [Fabian Hiller](https://github.com/fabian-hiller) | [MIT](./src/valibot/i18n/LICENSE.md) | **1.3.0** | Zero or low | same |
|
|
25
|
+
| [@valibot/to-json-schema](https://github.com/open-circle/valibot/tree/main/packages/to-json-schema) | [Fabian Hiller](https://github.com/fabian-hiller) | [MIT](./src/valibot/to-json-schema/LICENSE.md) | **1.8.0** | Zero | same |
|
|
26
|
+
| [node-cron](https://www.nodecron.com/) | [Lucas Merencia](https://github.com/merencia) | [ISC](./src/node-cron/LICENSE.md) | **4.6.0** | Zero or low | same |
|
|
27
|
+
| [yaml](https://eemeli.org/yaml/#yaml) | [Eemeli Aro](https://github.com/eemeli) | [ISC](./src/yaml/LICENSE.md) | **3.0.0-2 (RC)** | Zero or low | same |
|
|
28
|
+
| [@std/async](https://jsr.io/@std/async) | [Deno authors](https://github.com/denoland) | [MIT](./src/async/LICENSE.md) | **1.5.0** | Zero or low | same as domain |
|
|
29
|
+
| [@std/bytes](https://jsr.io/@std/bytes) | [Deno authors](https://github.com/denoland) | [MIT](./src/bytes/LICENSE.md) | **1.0.6** | Zero or low | same as domain |
|
|
30
|
+
| [@std/collections](https://jsr.io/@std/collections) | [Deno authors](https://github.com/denoland) | [MIT](./src/collections/LICENSE.md) | **1.3.0** | Zero or low | same as domain |
|
|
31
|
+
| [@std/csv](https://jsr.io/@std/csv) | [Deno authors](https://github.com/denoland) | [MIT](./src/csv/LICENSE.md) | **1.0.6** | Low | same as domain |
|
|
32
|
+
| [@std/data-structures](https://jsr.io/@std/data-structures) | [Deno authors](https://github.com/denoland) | [MIT](./src/data-structures/LICENSE.md) | **1.1.1** | Zero or low | same as domain |
|
|
33
|
+
| [@std/encoding](https://jsr.io/@std/encoding) | [Deno authors](https://github.com/denoland) | [MIT](./src/encoding/LICENSE.md) | **1.0.11** | Low | same as domain |
|
|
34
|
+
| [@std/fmt](https://jsr.io/@std/fmt) | [Deno authors](https://github.com/denoland) | [MIT](./src/fmt/LICENSE.md) | **1.0.10** | Low | same as domain |
|
|
35
|
+
| [@std/json](https://jsr.io/@std/json) | [Deno authors](https://github.com/denoland) | [MIT](./src/json/LICENSE.md) | **1.1.0** | Low | same as domain |
|
|
36
|
+
| [@std/jsonc](https://jsr.io/@std/jsonc) | [Deno authors](https://github.com/denoland) | [MIT](./src/jsonc/LICENSE.md) | **1.0.2** | Zero or low | same as domain |
|
|
37
|
+
| [@std/media-types](https://jsr.io/@std/media-types) | [Deno authors](https://github.com/denoland) | [MIT](./src/media_types/LICENSE.md) | **1.1.0** | Zero or low | same as domain |
|
|
38
|
+
| [@std/streams](https://jsr.io/@std/streams) | [Deno authors](https://github.com/denoland) | [MIT](./src/streams/LICENSE.md) | **1.1.1** | Low | same as domain |
|
|
39
|
+
| [jose](https://github.com/panva/jose) | [Filip Skokan](https://github.com/panva) | [MIT](./src/jose/LICENSE.md) | **6.2.15** | Zero or low | same |
|
|
40
|
+
| [date-fns](https://date-fns.org/) | [Sasha Koss](https://github.com/kossnocorp) | [MIT](./src/date-fns/core/LICENSE.md) | **4.4.0** | Zero or low | same |
|
|
41
|
+
| [unidecode](https://github.com/FGRibreau/node-unidecode) | [Francois-Guillaume Ribreau](https://fgribreau.com) | [BSD](./src/unidecode/LICENSE.md) | **1.1.0** | Average | same |
|
|
42
|
+
| [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) | [Nikolay Kuchumov](https://gitlab.com/catamphetamine) | [MIT](./src/phonenumbers/LICENSE.md), [Apache](./src/phonenumbers//LICENSE.Apache.md) | **1.13.11** | High | phonenumbers |
|
|
43
|
+
| [logtape](https://logtape.org/) and parts: <br> @logtape/config, @logtape/file, <br> @logtape/pretty, @logtape/redaction, @logtape/syslog | [Hong Minhee (洪 民憙)](https://github.com/dahlia) | [MIT](./src/logtape/LICENSE.md) | **2.3.2** | Zero or low | same |
|
|
44
|
+
| [postgres.js](https://github.com/porsager/postgres/tree/master) | [Rasmus Porsager](https://github.com/porsager) | [UNLICENSE](./src/db/postgres/UNLICENSE.md) | **3.4.9** | Zero | same |
|
|
45
|
+
| [hono](https://hono.dev/) | [Yusuke Wada](https://github.com/yusukebe) | [MIT](./src/hono/LICENSE.md) | **4.13.16** | Low | same |
|
|
46
|
+
| [@hono/node-server](https://github.com/honojs/node-server) | [Yusuke Wada](https://github.com/yusukebe) | [MIT](./src/hono/node-server/LICENSE.md) | **2.1.6** | Zero or low | same |
|
|
47
|
+
| [cache-manager](https://cacheable.org/docs/cache-manager/) and parts: keyv, @keyv/serialize, @cacheable/utils, hashery, hookified | [Jared Wray](https://github.com/jaredwray) | [MIT](<./src/caching/LICENSE%20(cache-manager%20and%20parts).md>) | **7.2.9** | Average | caching |
|
|
48
|
+
| [commander.js](https://github.com/tj/commander.js) | [TJ Holowaychuk](https://github.com/tj)<br> [John Gee](https://github.com/shadowspawn) | [MIT](./src/cli/LICENSE.md) | **15.0.0** | Average | cli |
|
|
49
|
+
| [ley](https://github.com/lukeed/ley) and parts: <br> mk-dirs, totalist | [Luke Edwards](https://github.com/lukeed) | [MIT](./src/db/migrator/LICENSE.md) | **0.8.1** | High | db-migrator |
|
|
50
|
+
| [@std/random](https://jsr.io/@std/random) | [Deno authors](https://github.com/denoland) | [MIT](./src/random/LICENSE.md) | **0.1.5** | Zero or low | same as domain |
|
|
51
|
+
| [@std/semver](https://jsr.io/@std/semver) | [Deno authors](https://github.com/denoland)<br> [Isaac Z. Schlueter](https://github.com/isaacs) | [MIT](./src/semver/LICENSE.md), ISC | **1.0.8** | Zero or low | same as domain |
|
|
52
|
+
| [@std/text](https://jsr.io/@std/text) | [Deno authors](https://github.com/denoland)<br> [Isaac Z. Schlueter](https://github.com/isaacs) | [MIT](./src/text/LICENSE.md) | **1.0.19** | Zero or low | same as domain |
|
|
53
|
+
| [swagger-ui](https://github.com/swagger-api/swagger-ui) | [Swagger UI Contributors](https://github.com/swagger-api/swagger-ui/blob/main/package.json#L27) | [Apache 2.0](./src/swagger-ui/LICENSE.md) | **5.34.1** | Zero (picked only dist) | swagger-ui |
|
|
54
|
+
| [@hono/swagger-ui](https://github.com/honojs/middleware/tree/main/packages/swagger-ui) | [naporitan](https://github.com/naporin0624) & [sor4chi](https://github.com/sor4chi) | [MIT](./src/hono/additional-middlewares//swagger-ui/LICENSE.md) | **0.6.2** | Low | same |
|
|
53
55
|
|
|
54
56
|
\* - integrated version of library
|
|
55
57
|
|
package/README.md
CHANGED
|
@@ -70,30 +70,32 @@ Inray - all-in-one инструментарий для разработки **No
|
|
|
70
70
|
|
|
71
71
|
<span style="color:purple">IV</span> - "Внедрение", остальные части SDK обновляются и используют новую интегрированную часть, то есть обеспечивается консистентность
|
|
72
72
|
|
|
73
|
-
| Логический домен / область применения | Домен (inray/\*) | Уровень интеграции*
|
|
74
|
-
| :---------------------------------------------------------------- | :---------------------------------- |
|
|
75
|
-
| Вспомогательные асинхронные функции | /async | <span style="color:green">II</span>
|
|
76
|
-
| Работа с байтами | /bytes | <span style="color:green">II</span>
|
|
77
|
-
| Работа с потоками (stream) | /streams | <span style="color:green">II</span>
|
|
78
|
-
| Коллекции и структуры данных | /collections и<br> /data-structures | <span style="color:green">II</span>
|
|
79
|
-
| Кодирование, декодирование, форматирование и транслитерация | /encoding и<br> /unidecode | <span style="color:green">II</span>
|
|
80
|
-
| Работа с датами и временем | /date-fns | <span style="color:green">II</span>
|
|
81
|
-
| Логирование | /logtape | <span style="color:green">II</span>
|
|
82
|
-
| Обработка файлов распространенных форматов | /json, /jsonc, /csv, /yaml | <span style="color:green">II</span>
|
|
83
|
-
| Обработка MIME-типов | /media-types | <span style="color:green">II</span>
|
|
84
|
-
| Задачи по расписанию | /node-cron | <span style="color:green">II</span>
|
|
85
|
-
| Валидация | /valibot | <span style="color:green">II</span>
|
|
86
|
-
| Драйверы к базам данных | /db/postgres |
|
|
87
|
-
| CLI средство для миграций БД | /db-migrator | <span style="color:blue">III</span>
|
|
88
|
-
| Криптографические функции | /jose | <span style="color:green">II</span>
|
|
89
|
-
| Работа с телефонными номерами | /phonenumbers | <span style="color:blue">III</span>
|
|
90
|
-
| Основной серверный фреймворк | /hono | <span style="color:green">II</span>
|
|
91
|
-
| Различные инструменты и вспомогательные функции общего назначения | /utils | <span style="color:blue">III</span>
|
|
92
|
-
| Кеширование | /caching | <span style="color:blue">III</span>
|
|
93
|
-
| Обработка аргументов командной строки (CLI) | /cli | <span style="color:green">II</span>
|
|
94
|
-
| Функции рандомизации | /random | <span style="color:green">II</span>
|
|
95
|
-
| Функции для работы с SemVer | /semver | <span style="color:green">II</span>
|
|
96
|
-
| Дополнительные функции для работы с текстом | /text | <span style="color:green">II</span>
|
|
73
|
+
| Логический домен / область применения | Домен (inray/\*) | Уровень интеграции* | Исходные библиотеки | Комментарий |
|
|
74
|
+
| :---------------------------------------------------------------- | :---------------------------------- | :----------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------- |
|
|
75
|
+
| Вспомогательные асинхронные функции | /async | <span style="color:green">II</span> | [@std/async](https://jsr.io/@std/async/doc) | In progress 🛠️... |
|
|
76
|
+
| Работа с байтами | /bytes | <span style="color:green">II</span> | [@std/bytes](https://jsr.io/@std/bytes/doc) | |
|
|
77
|
+
| Работа с потоками (stream) | /streams | <span style="color:green">II</span> | [@std/streams](https://jsr.io/@std/streams/doc) | |
|
|
78
|
+
| Коллекции и структуры данных | /collections и<br> /data-structures | <span style="color:green">II</span> | [@std/collections](https://jsr.io/@std/collections/doc) <br> [@std/data-structures](https://jsr.io/@std/data-structures/doc) | |
|
|
79
|
+
| Кодирование, декодирование, форматирование и транслитерация | /encoding и<br> /unidecode | <span style="color:green">II</span> | [@std/encoding](https://jsr.io/@std/encoding/doc) <br> [@std/fmt](https://jsr.io/@std/fmt/doc/all_symbols?no_default_entrypoint) <br> [unidecode](https://github.com/FGRibreau/node-unidecode) | |
|
|
80
|
+
| Работа с датами и временем | /date-fns | <span style="color:green">II</span> | [date-fns](https://date-fns.org/v4.4.0/docs/Getting-Started) | |
|
|
81
|
+
| Логирование | /logtape | <span style="color:green">II</span> | [logtape (и его части)](https://logtape.org/) | |
|
|
82
|
+
| Обработка файлов распространенных форматов | /json, /jsonc, /csv, /yaml | <span style="color:green">II</span> | [@std/json](https://jsr.io/@std/json/doc) <br> [@std/jsonc](https://jsr.io/@std/jsonc/doc) <br> [@std/csv](https://jsr.io/@std/csv/doc) <br> [yaml](https://eemeli.org/yaml/#yaml) | |
|
|
83
|
+
| Обработка MIME-типов | /media-types | <span style="color:green">II</span> | [@std/media-types](https://jsr.io/@std/media-types/doc) | |
|
|
84
|
+
| Задачи по расписанию | /node-cron | <span style="color:green">II</span> | [node-cron](https://www.nodecron.com/) | |
|
|
85
|
+
| Валидация | /valibot | <span style="color:green">II</span> | [valibot (и его части)](https://valibot.dev/) | |
|
|
86
|
+
| Драйверы к базам данных | /db/postgres | <span style="color:red">I</span> | [postgres.js](https://github.com/porsager/postgres/tree/master) | |
|
|
87
|
+
| CLI средство для миграций БД | /db-migrator | <span style="color:blue">III</span> | [ley](https://github.com/lukeed/ley) | |
|
|
88
|
+
| Криптографические функции | /jose | <span style="color:green">II</span> | [jose](https://github.com/panva/jose) | |
|
|
89
|
+
| Работа с телефонными номерами | /phonenumbers | <span style="color:blue">III</span> | [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) | |
|
|
90
|
+
| Основной серверный фреймворк | /hono | <span style="color:green">II</span> | [hono](https://hono.dev/docs/) | |
|
|
91
|
+
| Различные инструменты и вспомогательные функции общего назначения | /utils | <span style="color:blue">III</span> | - | |
|
|
92
|
+
| Кеширование | /caching | <span style="color:blue">III</span> | [cache-manager (и его части)](https://cacheable.org/) | |
|
|
93
|
+
| Обработка аргументов командной строки (CLI) | /cli | <span style="color:green">II</span> | [commander.js](https://github.com/tj/commander.js) | |
|
|
94
|
+
| Функции рандомизации | /random | <span style="color:green">II</span> | [@std/random](https://jsr.io/@std/random/doc) | |
|
|
95
|
+
| Функции для работы с SemVer | /semver | <span style="color:green">II</span> | [@std/semver](https://jsr.io/@std/semver/doc) | |
|
|
96
|
+
| Дополнительные функции для работы с текстом | /text | <span style="color:green">II</span> | [@std/text](https://jsr.io/@std/text/doc) | |
|
|
97
|
+
| Open-API (Swagger)... | /swagger-ui | <span style="color:green">I</span> | [swagger-ui](https://github.com/swagger-api/swagger-ui) | |
|
|
98
|
+
| Open-API в рамках серверного фреймворка | /hono/swagger-ui | <span style="color:green">III</span> | [@hono/swagger-ui](https://github.com/honojs/middleware/tree/main/packages/swagger-ui) | |
|
|
97
99
|
|
|
98
100
|
\* _уровень может отображать как итог, так и процесс_
|
|
99
101
|
|
|
@@ -526,6 +528,64 @@ const lines = ReadableStream.from(['a\nb\n', 'c\n']).pipeThrough(new TextLineStr
|
|
|
526
528
|
await Array.fromAsync(lines); // ["a", "b", "c"]
|
|
527
529
|
```
|
|
528
530
|
|
|
531
|
+
### inray/swagger-ui - Swagger/Open API
|
|
532
|
+
|
|
533
|
+
Несколько хелперов, что позволяет Node.js подгатавливать и отдавать Swagger UI для Open-API спецификаций.
|
|
534
|
+
|
|
535
|
+
Так-же включает в себя бандл JS и CSS файлов [Swagger UI](https://github.com/swagger-api/swagger-ui)
|
|
536
|
+
|
|
537
|
+
### inray/hono/swagger-ui - Swagger/Open API для inray/hono
|
|
538
|
+
|
|
539
|
+
Интеграция [Swagger UI](#inrayswagger-ui---swaggeropen-api) с [Hono](#inrayhono---веб-фреймворк-hono-и-его-части), модифицированный middleware [@hono/swagger-ui](https://github.com/honojs/middleware/tree/main/packages/swagger-ui) (v0.6.2):
|
|
540
|
+
|
|
541
|
+
- предоставляет Hono-middleware для едпоинта с Swagger-редактором на основе предоставленной Open-API спецификации
|
|
542
|
+
- позволяет выбрать - использовать-ли CDN для загрузки Swagger UI редактора (с выбором CDN и версии), либо использовать поставляемый inray бандл
|
|
543
|
+
|
|
544
|
+
Стандартное использование, загрузка из CDN по-умолчанию:
|
|
545
|
+
|
|
546
|
+
```ts
|
|
547
|
+
import { swaggerUI } from 'inray/hono/swagger-ui';
|
|
548
|
+
|
|
549
|
+
// Open-API спецификация
|
|
550
|
+
app.get('/open-api/spec.json', (c) => c.json(openApiDoc));
|
|
551
|
+
|
|
552
|
+
// Swagger-UI с CDN по-умолчанию
|
|
553
|
+
app.get('/open-api', swaggerUI({ url: '/open-api/spec.json' } }));
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
Загрузка из установленного CDN и с уточняющей версией:
|
|
557
|
+
|
|
558
|
+
```ts
|
|
559
|
+
import { swaggerUI } from 'inray/hono/swagger-ui';
|
|
560
|
+
|
|
561
|
+
// Open-API спецификация
|
|
562
|
+
app.get('/open-api/spec.json', (c) => c.json(openApiDoc));
|
|
563
|
+
|
|
564
|
+
// Swagger-UI с установленным CDN и версией
|
|
565
|
+
app.get(
|
|
566
|
+
'/open-api',
|
|
567
|
+
swaggerUI({ url: '/open-api/spec.json', assets: { mode: 'remote', baseUrl: 'https://unpkg.com/', version: '5.0.0' } })
|
|
568
|
+
);
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
Использование без загрузки из CDN, используется только inray:
|
|
572
|
+
|
|
573
|
+
```ts
|
|
574
|
+
import { swaggerUI, swaggerUIAssets } from 'inray/hono/swagger-ui';
|
|
575
|
+
|
|
576
|
+
// Раздача статики Swagger UI
|
|
577
|
+
app.route('/open-api/assets', swaggerUIAssets());
|
|
578
|
+
|
|
579
|
+
// Open-API спецификация
|
|
580
|
+
app.get('/open-api/spec.json', (c) => c.json(openApiDoc));
|
|
581
|
+
|
|
582
|
+
// Swagger-UI
|
|
583
|
+
app.get(
|
|
584
|
+
'/open-api',
|
|
585
|
+
swaggerUI({ url: '/open-api/spec.json', assets: { mode: 'bundled', mountAt: '/open-api/assets' } })
|
|
586
|
+
);
|
|
587
|
+
```
|
|
588
|
+
|
|
529
589
|
### inray/text - работа с текстом
|
|
530
590
|
|
|
531
591
|
Различные функции для работы с текстом:
|
|
@@ -707,38 +767,40 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
707
767
|
|
|
708
768
|
Integrated and modified external libraries:
|
|
709
769
|
|
|
710
|
-
| Library name | Author | License | Version\* | Modification level\*\*
|
|
711
|
-
| :---------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- | :---------: | :--------------- |
|
|
712
|
-
| [valibot](https://valibot.dev/) | [Fabian Hiller](https://github.com/fabian-hiller) | MIT | **1.5.0** | Zero or low
|
|
713
|
-
| [@valibot/i18n](https://github.com/open-circle/valibot/tree/main/packages/i18n) | [Fabian Hiller](https://github.com/fabian-hiller) | MIT | **1.3.0** | Zero or low
|
|
714
|
-
| [@valibot/to-json-schema](https://github.com/open-circle/valibot/tree/main/packages/to-json-schema) | [Fabian Hiller](https://github.com/fabian-hiller) | MIT | **1.8.0** | Zero
|
|
715
|
-
| [node-cron](https://www.nodecron.com/) | [Lucas Merencia](https://github.com/merencia) | ISC | **4.6.0** | Zero or low
|
|
716
|
-
| [yaml](https://eemeli.org/yaml/#yaml) | [Eemeli Aro](https://github.com/eemeli) | ISC | **3.0.0-2 (RC)** | Zero or low
|
|
717
|
-
| [@std/async](https://jsr.io/@std/async) | [Deno authors](https://github.com/denoland) | MIT | **1.5.0** | Zero or low
|
|
718
|
-
| [@std/bytes](https://jsr.io/@std/bytes) | [Deno authors](https://github.com/denoland) | MIT | **1.0.6** | Zero or low
|
|
719
|
-
| [@std/collections](https://jsr.io/@std/collections) | [Deno authors](https://github.com/denoland) | MIT | **1.3.0** | Zero or low
|
|
720
|
-
| [@std/csv](https://jsr.io/@std/csv) | [Deno authors](https://github.com/denoland) | MIT | **1.0.6** | Low
|
|
721
|
-
| [@std/data-structures](https://jsr.io/@std/data-structures) | [Deno authors](https://github.com/denoland) | MIT | **1.1.1** | Zero or low
|
|
722
|
-
| [@std/encoding](https://jsr.io/@std/encoding) | [Deno authors](https://github.com/denoland) | MIT | **1.0.11** | Low
|
|
723
|
-
| [@std/fmt](https://jsr.io/@std/fmt) | [Deno authors](https://github.com/denoland) | MIT | **1.0.10** | Low
|
|
724
|
-
| [@std/json](https://jsr.io/@std/json) | [Deno authors](https://github.com/denoland) | MIT | **1.1.0** | Low
|
|
725
|
-
| [@std/jsonc](https://jsr.io/@std/jsonc) | [Deno authors](https://github.com/denoland) | MIT | **1.0.2** | Zero or low
|
|
726
|
-
| [@std/media-types](https://jsr.io/@std/media-types) | [Deno authors](https://github.com/denoland) | MIT | **1.1.0** | Zero or low
|
|
727
|
-
| [@std/streams](https://jsr.io/@std/streams) | [Deno authors](https://github.com/denoland) | MIT | **1.1.1** | Low
|
|
728
|
-
| [jose](https://github.com/panva/jose) | [Filip Skokan](https://github.com/panva) | MIT | **6.2.15** | Zero or low
|
|
729
|
-
| [date-fns](https://date-fns.org/) | [Sasha Koss](https://github.com/kossnocorp) | MIT | **4.4.0** | Zero or low
|
|
730
|
-
| [unidecode](https://github.com/FGRibreau/node-unidecode) | [Francois-Guillaume Ribreau](https://fgribreau.com) | BSD | **1.1.0** | Average
|
|
731
|
-
| [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) | [Nikolay Kuchumov](https://gitlab.com/catamphetamine) | MIT, Apache | **1.13.11** | High
|
|
732
|
-
| [logtape](https://logtape.org/) and parts: <br> @logtape/config, @logtape/file, <br> @logtape/pretty, @logtape/redaction, @logtape/syslog | [Hong Minhee (洪 民憙)](https://github.com/dahlia) | MIT | **2.3.2** | Zero or low
|
|
733
|
-
| [postgres.js](https://github.com/porsager/postgres/tree/master) | [Rasmus Porsager](https://github.com/porsager) | UNLICENSE | **3.4.9** | Zero
|
|
734
|
-
| [hono](https://hono.dev/) | [Yusuke Wada](https://github.com/yusukebe) | MIT | **4.13.16** | Low
|
|
735
|
-
| [@hono/node-server](https://github.com/honojs/node-server) | [Yusuke Wada](https://github.com/yusukebe) | MIT | **2.1.6** | Zero or low
|
|
736
|
-
| [cache-manager](https://cacheable.org/docs/cache-manager/) and parts: keyv, @keyv/serialize, @cacheable/utils, hashery, hookified | [Jared Wray](https://github.com/jaredwray) | MIT | **7.2.9** | Average
|
|
737
|
-
| [commander.js](https://github.com/tj/commander.js) | [TJ Holowaychuk](https://github.com/tj)<br> [John Gee](https://github.com/shadowspawn) | MIT | **15.0.0** | Average
|
|
738
|
-
| [ley](https://github.com/lukeed/ley) and parts: <br> mk-dirs, totalist | [Luke Edwards](https://github.com/lukeed) | MIT | **0.8.1** | High
|
|
739
|
-
| [@std/random](https://jsr.io/@std/random) | [Deno authors](https://github.com/denoland) | MIT | **0.1.5** | Zero or low
|
|
740
|
-
| [@std/semver](https://jsr.io/@std/semver) | [Deno authors](https://github.com/denoland)<br> [Isaac Z. Schlueter](https://github.com/isaacs) | MIT, ISC | **1.0.8** | Zero or low
|
|
741
|
-
| [@std/text](https://jsr.io/@std/text) | [Deno authors](https://github.com/denoland) | MIT | **1.0.19** | Zero or low
|
|
770
|
+
| Library name | Author | License | Version\* | Modification level\*\* | Internal name\*\*\* |
|
|
771
|
+
| :---------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- | :---------: | :--------------- | ----------------------- | ------------------- |
|
|
772
|
+
| [valibot](https://valibot.dev/) | [Fabian Hiller](https://github.com/fabian-hiller) | MIT | **1.5.0** | Zero or low | same |
|
|
773
|
+
| [@valibot/i18n](https://github.com/open-circle/valibot/tree/main/packages/i18n) | [Fabian Hiller](https://github.com/fabian-hiller) | MIT | **1.3.0** | Zero or low | same |
|
|
774
|
+
| [@valibot/to-json-schema](https://github.com/open-circle/valibot/tree/main/packages/to-json-schema) | [Fabian Hiller](https://github.com/fabian-hiller) | MIT | **1.8.0** | Zero | same |
|
|
775
|
+
| [node-cron](https://www.nodecron.com/) | [Lucas Merencia](https://github.com/merencia) | ISC | **4.6.0** | Zero or low | same |
|
|
776
|
+
| [yaml](https://eemeli.org/yaml/#yaml) | [Eemeli Aro](https://github.com/eemeli) | ISC | **3.0.0-2 (RC)** | Zero or low | same |
|
|
777
|
+
| [@std/async](https://jsr.io/@std/async) | [Deno authors](https://github.com/denoland) | MIT | **1.5.0** | Zero or low | same as domain |
|
|
778
|
+
| [@std/bytes](https://jsr.io/@std/bytes) | [Deno authors](https://github.com/denoland) | MIT | **1.0.6** | Zero or low | same as domain |
|
|
779
|
+
| [@std/collections](https://jsr.io/@std/collections) | [Deno authors](https://github.com/denoland) | MIT | **1.3.0** | Zero or low | same as domain |
|
|
780
|
+
| [@std/csv](https://jsr.io/@std/csv) | [Deno authors](https://github.com/denoland) | MIT | **1.0.6** | Low | same as domain |
|
|
781
|
+
| [@std/data-structures](https://jsr.io/@std/data-structures) | [Deno authors](https://github.com/denoland) | MIT | **1.1.1** | Zero or low | same as domain |
|
|
782
|
+
| [@std/encoding](https://jsr.io/@std/encoding) | [Deno authors](https://github.com/denoland) | MIT | **1.0.11** | Low | same as domain |
|
|
783
|
+
| [@std/fmt](https://jsr.io/@std/fmt) | [Deno authors](https://github.com/denoland) | MIT | **1.0.10** | Low | same as domain |
|
|
784
|
+
| [@std/json](https://jsr.io/@std/json) | [Deno authors](https://github.com/denoland) | MIT | **1.1.0** | Low | same as domain |
|
|
785
|
+
| [@std/jsonc](https://jsr.io/@std/jsonc) | [Deno authors](https://github.com/denoland) | MIT | **1.0.2** | Zero or low | same as domain |
|
|
786
|
+
| [@std/media-types](https://jsr.io/@std/media-types) | [Deno authors](https://github.com/denoland) | MIT | **1.1.0** | Zero or low | same as domain |
|
|
787
|
+
| [@std/streams](https://jsr.io/@std/streams) | [Deno authors](https://github.com/denoland) | MIT | **1.1.1** | Low | same as domain |
|
|
788
|
+
| [jose](https://github.com/panva/jose) | [Filip Skokan](https://github.com/panva) | MIT | **6.2.15** | Zero or low | same |
|
|
789
|
+
| [date-fns](https://date-fns.org/) | [Sasha Koss](https://github.com/kossnocorp) | MIT | **4.4.0** | Zero or low | same |
|
|
790
|
+
| [unidecode](https://github.com/FGRibreau/node-unidecode) | [Francois-Guillaume Ribreau](https://fgribreau.com) | BSD | **1.1.0** | Average | same |
|
|
791
|
+
| [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) | [Nikolay Kuchumov](https://gitlab.com/catamphetamine) | MIT, Apache | **1.13.11** | High | phonenumbers |
|
|
792
|
+
| [logtape](https://logtape.org/) and parts: <br> @logtape/config, @logtape/file, <br> @logtape/pretty, @logtape/redaction, @logtape/syslog | [Hong Minhee (洪 民憙)](https://github.com/dahlia) | MIT | **2.3.2** | Zero or low | same |
|
|
793
|
+
| [postgres.js](https://github.com/porsager/postgres/tree/master) | [Rasmus Porsager](https://github.com/porsager) | UNLICENSE | **3.4.9** | Zero | same |
|
|
794
|
+
| [hono](https://hono.dev/) | [Yusuke Wada](https://github.com/yusukebe) | MIT | **4.13.16** | Low | same |
|
|
795
|
+
| [@hono/node-server](https://github.com/honojs/node-server) | [Yusuke Wada](https://github.com/yusukebe) | MIT | **2.1.6** | Zero or low | same |
|
|
796
|
+
| [cache-manager](https://cacheable.org/docs/cache-manager/) and parts: keyv, @keyv/serialize, @cacheable/utils, hashery, hookified | [Jared Wray](https://github.com/jaredwray) | MIT | **7.2.9** | Average | caching |
|
|
797
|
+
| [commander.js](https://github.com/tj/commander.js) | [TJ Holowaychuk](https://github.com/tj)<br> [John Gee](https://github.com/shadowspawn) | MIT | **15.0.0** | Average | cli |
|
|
798
|
+
| [ley](https://github.com/lukeed/ley) and parts: <br> mk-dirs, totalist | [Luke Edwards](https://github.com/lukeed) | MIT | **0.8.1** | High | db-migrator |
|
|
799
|
+
| [@std/random](https://jsr.io/@std/random) | [Deno authors](https://github.com/denoland) | MIT | **0.1.5** | Zero or low | same as domain |
|
|
800
|
+
| [@std/semver](https://jsr.io/@std/semver) | [Deno authors](https://github.com/denoland)<br> [Isaac Z. Schlueter](https://github.com/isaacs) | MIT, ISC | **1.0.8** | Zero or low | same as domain |
|
|
801
|
+
| [@std/text](https://jsr.io/@std/text) | [Deno authors](https://github.com/denoland) | MIT | **1.0.19** | Zero or low | same as domain |
|
|
802
|
+
| [swagger-ui](https://github.com/swagger-api/swagger-ui) | [Swagger UI Contributors](https://github.com/swagger-api/swagger-ui/blob/main/package.json#L27) | Apache 2.0 | **5.34.1** | Zero (picked only dist) | swagger-ui |
|
|
803
|
+
| [@hono/swagger-ui](https://github.com/honojs/middleware/tree/main/packages/swagger-ui) | [naporitan](https://github.com/naporin0624) & [sor4chi](https://github.com/sor4chi) | MIT | **0.6.2** | Low | same |
|
|
742
804
|
|
|
743
805
|
\* - integrated version of library
|
|
744
806
|
|
|
@@ -793,5 +855,14 @@ However, sometimes integrated libraries change their original name for one or mo
|
|
|
793
855
|
- [John Gee](https://github.com/shadowspawn)
|
|
794
856
|
- [Luke Edwards](https://github.com/lukeed)
|
|
795
857
|
- [Isaac Z. Schlueter](https://github.com/isaacs)
|
|
858
|
+
- Anna Bodnia
|
|
859
|
+
- Buu Nguyen
|
|
860
|
+
- Josh Ponelat
|
|
861
|
+
- Kyle Shockey
|
|
862
|
+
- Robert Barnwell
|
|
863
|
+
- Sahar Jafari
|
|
864
|
+
- Vladimir Gorej
|
|
865
|
+
- [naporitan](https://github.com/naporin0624)
|
|
866
|
+
- [sor4chi](https://github.com/sor4chi)
|
|
796
867
|
|
|
797
868
|
</details>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Original library: @hono/swagger-ui
|
|
3
|
+
* - Copyright (c) naporitan & Sorachi Kawamura
|
|
4
|
+
*
|
|
5
|
+
* Modified and integrated in "Inray":
|
|
6
|
+
* - Evgeniy Bushin with assistance of GLM 5.3 (Z.AI)
|
|
7
|
+
*/
|
|
8
|
+
/***/
|
|
9
|
+
import { Hono } from '../../../src/index.ts';
|
|
10
|
+
/**
|
|
11
|
+
* Саб-апп, раздающий вендоренные файлы swagger-ui-dist из модуля `inray/swagger-ui`.
|
|
12
|
+
* Маунтится по пути, который затем передаётся в `swaggerUI()` через опцию
|
|
13
|
+
* `assets: { mode: 'bundled', mountAt }`:
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* app.route('/doc/v0/assets', swaggerUIAssets())
|
|
17
|
+
* app.get('/doc/v0', swaggerUI({ url: '/doc/v0/spec.json', assets: { mode: 'bundled', mountAt: '/doc/v0/assets' } }))
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare const swaggerUIAssets: () => Hono;
|
|
21
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../../../src/hono/additional-middlewares/swagger-ui/src/assets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,KAAK;AAEL,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAS7C;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,QAAO,IAiBlC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Original library: @hono/swagger-ui
|
|
3
|
+
* - Copyright (c) naporitan & Sorachi Kawamura
|
|
4
|
+
*
|
|
5
|
+
* Modified and integrated in "Inray":
|
|
6
|
+
* - Evgeniy Bushin with assistance of GLM 5.3 (Z.AI)
|
|
7
|
+
*/
|
|
8
|
+
/***/
|
|
9
|
+
import { Hono } from "../../../src/index.js";
|
|
10
|
+
import { readSwaggerUIAsset } from "../../../../swagger-ui/resource.js";
|
|
11
|
+
const ROUTES = [
|
|
12
|
+
{ path: '/swagger-ui.css', asset: 'swagger-ui.css' },
|
|
13
|
+
{ path: '/swagger-ui-bundle.js', asset: 'swagger-ui-bundle.js' }
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* Саб-апп, раздающий вендоренные файлы swagger-ui-dist из модуля `inray/swagger-ui`.
|
|
17
|
+
* Маунтится по пути, который затем передаётся в `swaggerUI()` через опцию
|
|
18
|
+
* `assets: { mode: 'bundled', mountAt }`:
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* app.route('/doc/v0/assets', swaggerUIAssets())
|
|
22
|
+
* app.get('/doc/v0', swaggerUI({ url: '/doc/v0/spec.json', assets: { mode: 'bundled', mountAt: '/doc/v0/assets' } }))
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export const swaggerUIAssets = () => {
|
|
26
|
+
const app = new Hono();
|
|
27
|
+
for (const { path, asset } of ROUTES) {
|
|
28
|
+
app.get(path, async (c) => {
|
|
29
|
+
const { body, contentType } = await readSwaggerUIAsset(asset);
|
|
30
|
+
// readFile отдаёт Buffer (Uint8Array<ArrayBufferLike>), hono ждёт Uint8Array<ArrayBuffer>
|
|
31
|
+
const bytes = new Uint8Array(body);
|
|
32
|
+
return c.body(bytes, 200, {
|
|
33
|
+
'content-type': contentType,
|
|
34
|
+
'cache-control': 'public, max-age=31536000, immutable'
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return app;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../../../../src/hono/additional-middlewares/swagger-ui/src/assets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,KAAK;AAEL,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,MAAM,MAAM,GAAkD;IAC5D,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACpD,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,sBAAsB,EAAE;CACjE,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAS,EAAE;IACxC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IAEvB,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,MAAM,EAAE,CAAC;QACrC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;YACxB,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC9D,0FAA0F;YAC1F,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;YAEnC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE;gBACxB,cAAc,EAAE,WAAW;gBAC3B,eAAe,EAAE,qCAAqC;aACvD,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Original library: @hono/swagger-ui
|
|
3
|
+
* - Copyright (c) naporitan & Sorachi Kawamura
|
|
4
|
+
*
|
|
5
|
+
* Modified and integrated in "Inray":
|
|
6
|
+
* - Evgeniy Bushin with assistance of GLM 5.3 (Z.AI)
|
|
7
|
+
*/
|
|
8
|
+
/***/
|
|
9
|
+
/**
|
|
10
|
+
* Original library: @hono/swagger-ui (v0.6.2)
|
|
11
|
+
* - Copyright (c) naporitan0624, sor4chi and Hono contributors
|
|
12
|
+
*
|
|
13
|
+
* Modified and integrated in "Inray":
|
|
14
|
+
* - Evgeniy Bushin
|
|
15
|
+
*/
|
|
16
|
+
/***/
|
|
17
|
+
import type { Env, MiddlewareHandler } from '../../../src/types.ts';
|
|
18
|
+
import type { AssetURLs, RemoteAssetsConfig } from '../../../../swagger-ui/resource.ts';
|
|
19
|
+
import type { DistSwaggerUIOptions } from './swagger/renderer.ts';
|
|
20
|
+
/**
|
|
21
|
+
* Источник файлов swagger-ui для страницы документации:
|
|
22
|
+
* - `bundled` — вендоренные файлы из модуля `inray/swagger-ui`, раздаваемые
|
|
23
|
+
* саб-аппом `swaggerUIAssets()` по пути `mountAt`. Работает в закрытом
|
|
24
|
+
* контуре, де-факто рекомендуемый вариант;
|
|
25
|
+
* - `remote` — CDN (поведение апстрима), файлы браузер забирает сам.
|
|
26
|
+
*/
|
|
27
|
+
export type SwaggerUIAssetsConfig = ({
|
|
28
|
+
mode: 'bundled';
|
|
29
|
+
} & {
|
|
30
|
+
mountAt: string;
|
|
31
|
+
}) | ({
|
|
32
|
+
mode: 'remote';
|
|
33
|
+
} & RemoteAssetsConfig);
|
|
34
|
+
type OriginalSwaggerUIOptions = {
|
|
35
|
+
/** CDN base URL, e.g. https://unpkg.com for internal network mirror */
|
|
36
|
+
baseUrl?: string;
|
|
37
|
+
version?: string;
|
|
38
|
+
assets?: SwaggerUIAssetsConfig;
|
|
39
|
+
/**
|
|
40
|
+
* manuallySwaggerUIHtml is a string that is used to render SwaggerUI.
|
|
41
|
+
* If this is set, all other options will be ignored except version.
|
|
42
|
+
* The string will be inserted into the body of the HTML.
|
|
43
|
+
* This is useful when you want to fully customize the UI.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const swaggerUI = SwaggerUI({
|
|
48
|
+
* manuallySwaggerUIHtml: (asset) => `
|
|
49
|
+
* <div>
|
|
50
|
+
* <div id="swagger-ui"></div>
|
|
51
|
+
* ${asset.css.map((url) => `<link rel="stylesheet" href="${url}" />`)}
|
|
52
|
+
* ${asset.js.map((url) => `<script src="${url}" crossorigin="anonymous"></script>`)}
|
|
53
|
+
* <script>
|
|
54
|
+
* window.onload = () => {
|
|
55
|
+
* window.ui = SwaggerUIBundle({
|
|
56
|
+
* dom_id: '#swagger-ui',
|
|
57
|
+
* url: 'https://petstore.swagger.io/v2/swagger.json',
|
|
58
|
+
* })
|
|
59
|
+
* }
|
|
60
|
+
* </script>
|
|
61
|
+
* </div>
|
|
62
|
+
* `,
|
|
63
|
+
* })
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
manuallySwaggerUIHtml?: (asset: AssetURLs) => string;
|
|
67
|
+
title?: string;
|
|
68
|
+
};
|
|
69
|
+
type SwaggerUIOptions = OriginalSwaggerUIOptions & DistSwaggerUIOptions;
|
|
70
|
+
declare const SwaggerUI: ({ baseUrl, version, assets, ...options }: SwaggerUIOptions) => string;
|
|
71
|
+
declare const middleware: <E extends Env>(options: SwaggerUIOptions) => MiddlewareHandler<E>;
|
|
72
|
+
export { middleware as swaggerUI, SwaggerUI };
|
|
73
|
+
export type { SwaggerUIOptions };
|
|
74
|
+
export { swaggerUIAssets } from './assets.ts';
|
|
75
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/hono/additional-middlewares/swagger-ui/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,KAAK;AAEL;;;;;;GAMG;AACH,KAAK;AAEL,OAAO,KAAK,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAGlE;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAC/B,CAAC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG,kBAAkB,CAAC,CAAC;AAE1F,KAAK,wBAAwB,GAAG;IAC9B,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,CAAC;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,gBAAgB,GAAG,wBAAwB,GAAG,oBAAoB,CAAC;AAExE,QAAA,MAAM,SAAS,GAAI,0CAA0C,gBAAgB,KAAG,MA8B/E,CAAC;AAEF,QAAA,MAAM,UAAU,GACb,CAAC,SAAS,GAAG,EAAE,SAAS,gBAAgB,KAAG,iBAAiB,CAAC,CAAC,CAiB9D,CAAC;AAEJ,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,SAAS,EAAE,CAAC;AAC9C,YAAY,EAAE,gBAAgB,EAAE,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|