Skip to content

Commit 1f3975e

Browse files
committed
fix: 📝 docs, client relogin logic, documentation frontend
1 parent 12b6ee1 commit 1f3975e

File tree

758 files changed

+3456
-8899
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

758 files changed

+3456
-8899
lines changed

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
token: ${{ secrets.GITHUB_TOKEN }}
4848
exclude_types: other,docs,chore
4949

50-
- name: Publish to Deno X
51-
id: create_release_and_publish_to_denox
50+
- name: Create release
51+
id: create_release
5252
if: steps.compare_versions.outputs.create_release == 'true'
5353
uses: actions/create-release@v1
5454
with:
@@ -58,7 +58,7 @@ jobs:
5858
${{ steps.changelog.outputs.changes }}
5959
6060
## Summary
61-
[smartshell-sdk@${{ steps.get_tag.outputs.tag }}...${{ steps.read_version.outputs.version }}](https://github.com/xl-soft/smartshell-sdk/compare/${{ steps.get_tag.outputs.tag }}...${{ steps.read_version.outputs.version }})
61+
[smartshell-sdk@${{ steps.get_tag.outputs.tag }}...${{ steps.read_version.outputs.version }}](https://github.com/xlsft/smartshell-sdk/compare/${{ steps.get_tag.outputs.tag }}...${{ steps.read_version.outputs.version }})
6262
draft: false
6363
prerelease: false
6464
env:

deno.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@xlsoftware/smartshell-sdk",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"exports": {
55
".": "./mod.ts",
66
"./utils": "./utils.ts",

docs/components/Layout.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
1212
const highlighted = hljs.highlight(element.textContent || '', { language: element.getAttribute('lang') || 'typescript' })
1313
element.innerHTML = highlighted.value
14-
element.innerHTML = element.innerHTML.replaceAll(/"\|\|--\['(.*?)','(.*?)'\]--\|\|"/g, (_, href, text) => `<a target="_blank" rel="noreferrer" href="${href}">${text}</a>`)
15-
14+
console.log(element.innerHTML)
15+
element.innerHTML = element.innerHTML.replaceAll(
16+
/\|\|--\[\s*<span[^>]*>'(.*?)'<\/span>\s*,\s*<span[^>]*>'(.*?)'<\/span>\s*\]--\|\|/gm,
17+
(_, href, text) => `<a target="_blank" rel="noreferrer" href="${href}">${text}</a>`
18+
);
1619
const button = document.createElement('button');
1720
button.classList.add('code-copy-button');
1821
button.onclick = () => { useClipboard(element.textContent || ''); toast.info('Скопировано в буфер обмена') }

docs/pages/index.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@
99
'deno': 'deno add jsr:@xlsoftware/smartshell-sdk',
1010
'npm': 'npx jsr add @xlsoftware/smartshell-sdk',
1111
'bun': 'bunx jsr add @xlsoftware/smartshell-sdk',
12-
'yarn': 'yarn dlx jsr add @xlsoftware/smartshell-sdk'
12+
'yarn': 'yarn dlx jsr add @xlsoftware/smartshell-sdk',
13+
'denojsr': 'import { Shell } from "jsr:@xlsoftware/smartshell-sdk";'
1314
}
15+
16+
const version = ref((await $fetch('https://api.github.com/repos/xlsft/smartshell-sdk/releases/latest')).tag_name)
1417
</script>
1518

1619
<template>
1720
<div class="w-full h-fit relative flex flex-col">
18-
<h1 data-no-back>SmartShell SDK</h1> <Badge title="v1.0.1 (Все еще бета)" class="absolute top-0 right-0 hidden lg:flex"/>
21+
<h1 data-no-back>SmartShell SDK</h1> <Badge :title="`v${version} (Все еще бета)`" class="absolute top-0 right-0 hidden lg:flex"/>
1922
<p>Современное, полностью типизированное, динамически генерирующееся, постоянно актуальное SDK для взаимодействия с публичным API ERP системы управления компьютерными клубами SmartShell</p>
2023
<div class="w-full h-full flex flex-wrap items-center justify-center gap-[24px] my-[12px]">
2124
<FactCard title="100% покрытие типами" subtitle="Типы напрямую экспортированные из интроспекции API" art="typescript"/>
@@ -26,12 +29,14 @@
2629
<h3>Установка</h3>
2730
<p>Установите пакет <code>smartshell-sdk </code> с помощью вашего пакетного менеджера. Для хранения пакета используется <code>JSR</code> - реестр пакетов доступный во всех пакетных менеджерах экосистемы JS и TS</p>
2831
<div class="w-full flex items-center justify-center gap-[12px] card my-[24px]">
29-
<Dropdown :options="[{ label: 'PNPM', value: 'pnpm' }, { label: 'Deno', value: 'deno' }, { label: 'NPM', value: 'npm' }, { label: 'Bun', value: 'bun' }, { label: 'Yarn', value: 'yarn' }]" v-model="helper" class="w-[150px]"/>
32+
<Dropdown :options="[{ label: 'PNPM', value: 'pnpm' }, { label: 'Deno', value: 'deno' }, { label: 'NPM', value: 'npm' }, { label: 'Bun', value: 'bun' }, { label: 'Yarn', value: 'yarn' }, { label: 'JSR Import', value: 'denojsr' }]" v-model="helper" class="w-[150px]"/>
3033
<Text readonly @action="() => { useClipboard(install[helper as keyof typeof install]); toast.info('Скопировано в буфер обмена')}" v-model="install[helper as keyof typeof install]" :icon="IconCopy" class="w-full"/>
3134
</div>
3235

3336
<p>Импортируйте пакет в свой проект</p>
34-
<pre><code>import { "||--['/docs/reference/sdk/Shell','Shell']--||" } from "@xlsoftware/smartshell-sdk";</code></pre>
37+
<pre><code>import { ||--['/docs/reference/sdk/Shell','Shell']--|| } from "@xlsoftware/smartshell-sdk";
38+
// ...or with jsr deno import
39+
import { ||--['/docs/reference/sdk/Shell','Shell']--|| } from "jsr:@xlsoftware/smartshell-sdk";</code></pre>
3540

3641
<p>Создайте инстанс класса <code>Shell</code>. Можно указать данные для авторизации, изменить хост (scope) api, или сделать инстанс анонимным для запроса публичной информации без нужды в авторизации</p>
3742
<pre><code>// Shell instance

docs/public/content/reference/api/mutation/applyNewHostDevices

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h3>Input</h3>
44
<pre><code lang="ts">type InputType = { id: number }</code></pre>
55
<h3>Response</h3>
6-
<pre><code lang="ts">type ResponseType = "||--['/docs/reference/types/Host','Host'--||"</code></pre>
6+
<pre><code lang="ts">type ResponseType = ||--['/docs/reference/types/Host','Host'--||</code></pre>
77
<h3>Codegen method map</h3>
88
<pre><code lang="json">{
99
"imports": {

docs/public/content/reference/api/mutation/banClient

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<h1 id="api_mutation_banClient">mutation banClient</h1>
22

33
<h3>Input</h3>
4-
<pre><code lang="ts">type InputType = { uuid: string, input: "||--['/docs/reference/types/FlagInput','FlagInput'--||" }</code></pre>
4+
<pre><code lang="ts">type InputType = { uuid: string, input: ||--['/docs/reference/types/FlagInput','FlagInput'--|| }</code></pre>
55
<h3>Response</h3>
6-
<pre><code lang="ts">type ResponseType = "||--['/docs/reference/types/User','User'--||"</code></pre>
6+
<pre><code lang="ts">type ResponseType = ||--['/docs/reference/types/User','User'--||</code></pre>
77
<h3>Codegen method map</h3>
88
<pre><code lang="json">{
99
"imports": {

docs/public/content/reference/api/mutation/changeClientSessionHost

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
</h1>
44

55
<h3>Input</h3>
6-
<pre><code lang="ts">type InputType = { id: number, input: "||--['/docs/reference/types/ChangeClientSessionHostInput','ChangeClientSessionHostInput'--||" }</code></pre>
6+
<pre><code lang="ts">type InputType = { id: number, input: ||--['/docs/reference/types/ChangeClientSessionHostInput','ChangeClientSessionHostInput'--|| }</code></pre>
77
<h3>Response</h3>
8-
<pre><code lang="ts">type ResponseType = "||--['/docs/reference/types/ClientSession','ClientSession'--||"</code></pre>
8+
<pre><code lang="ts">type ResponseType = ||--['/docs/reference/types/ClientSession','ClientSession'--||</code></pre>
99
<h3>Codegen method map</h3>
1010
<pre><code lang="json">{
1111
"imports": {

docs/public/content/reference/api/mutation/changeGoodsQuantity

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h1 id="api_mutation_changeGoodsQuantity">mutation changeGoodsQuantity</h1>
22

33
<h3>Input</h3>
4-
<pre><code lang="ts">type InputType = { input: "||--['/docs/reference/types/ChangeGoodsQuantityInput','ChangeGoodsQuantityInput'--||" }</code></pre>
4+
<pre><code lang="ts">type InputType = { input: ||--['/docs/reference/types/ChangeGoodsQuantityInput','ChangeGoodsQuantityInput'--|| }</code></pre>
55
<h3>Response</h3>
66
<pre><code lang="ts">type ResponseType = boolean</code></pre>
77
<h3>Codegen method map</h3>

docs/public/content/reference/api/mutation/changeUsersGroup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<h1 id="api_mutation_changeUsersGroup">mutation changeUsersGroup</h1>
22

33
<h3>Input</h3>
4-
<pre><code lang="ts">type InputType = { input: "||--['/docs/reference/types/ChangeUsersGroupInput','ChangeUsersGroupInput'--||" }</code></pre>
4+
<pre><code lang="ts">type InputType = { input: ||--['/docs/reference/types/ChangeUsersGroupInput','ChangeUsersGroupInput'--|| }</code></pre>
55
<h3>Response</h3>
6-
<pre><code lang="ts">type ResponseType = "||--['/docs/reference/types/UserGroup','UserGroup'--||"</code></pre>
6+
<pre><code lang="ts">type ResponseType = ||--['/docs/reference/types/UserGroup','UserGroup'--||</code></pre>
77
<h3>Codegen method map</h3>
88
<pre><code lang="json">{
99
"imports": {

0 commit comments

Comments
 (0)