-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6582c4e
Showing
23 changed files
with
475 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# MIT License | ||
# Copyright (C) 2020 Tymko Oleg <[email protected]> and contributors | ||
# All rights reserved. | ||
|
||
name: Контроль качества | ||
# Любой пуш и pr в проекте но с фильтром по основному проекту | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
if: github.repository == 'autumn-library/winow-cli' | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
oscript_version: ['stable'] | ||
|
||
steps: | ||
# Загрузка проекта | ||
- name: Актуализация | ||
uses: actions/checkout@v2 | ||
|
||
# Вычисление имени ветки | ||
- name: Compute branch name | ||
uses: nelonoel/[email protected] | ||
|
||
# Установка OneScript конкретной версии | ||
- name: Установка OneScript | ||
uses: otymko/[email protected] | ||
with: | ||
version: ${{ matrix.oscript_version }} | ||
|
||
# Установка зависимостей пакета | ||
- name: Установка зависимостей | ||
run: | | ||
opm install opm | ||
opm install -l --dev | ||
# Запуск тестов и сбор покрытия кода | ||
- name: Покрытие кода | ||
run: oscript ./tasks/coverage.os | ||
|
||
- name: Извлечение версии пакета | ||
shell: bash | ||
run: echo "##[set-output name=version;]`cat packagedef | grep ".Версия(" | sed 's|[^"]*"||' | sed -r 's/".+//'`" | ||
id: extract_version | ||
|
||
- name: Setup sonarqube | ||
uses: warchant/setup-sonar-scanner@v3 | ||
|
||
# Анализ проекта в SonarQube (ветка) | ||
- name: Анализ в SonarQube (branch) | ||
if: github.event_name == 'push' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: sonar-scanner | ||
-Dsonar.host.url=https://sonar.openbsl.ru | ||
-Dsonar.branch.name=${{ env.BRANCH_NAME }} | ||
-Dsonar.projectVersion=${{ steps.extract_version.outputs.version }} | ||
|
||
# Анализ проекта в SonarQube (PR) | ||
# https://docs.sonarqube.org/latest/analysis/pull-request/ | ||
- name: Анализ в SonarQube (pull-request) | ||
if: github.event_name == 'pull_request' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: sonar-scanner | ||
-Dsonar.host.url=https://sonar.openbsl.ru | ||
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | ||
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} | ||
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} | ||
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Публикация релиза | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
uses: autumn-library/workflows/.github/workflows/release.yml@main | ||
with: | ||
package_mask: "winow-cli-*.ospx" | ||
secrets: | ||
PUSH_TOKEN: ${{ secrets.PUSH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# MIT License | ||
# Copyright (C) 2020 Tymko Oleg <[email protected]> and contributors | ||
# All rights reserved. | ||
|
||
name: Тестирование | ||
# Любой пуш и pr в проекте | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
oscript_version: ['dev', 'stable'] | ||
|
||
steps: | ||
# Загрузка проекта | ||
- name: Актуализация | ||
uses: actions/checkout@v2 | ||
|
||
# Установка OneScript конкретной версии | ||
- name: Установка OneScript | ||
uses: otymko/[email protected] | ||
with: | ||
version: ${{ matrix.oscript_version }} | ||
|
||
# Установка зависимостей пакета | ||
- name: Установка зависимостей | ||
run: | | ||
opm install opm | ||
opm install -l --dev | ||
# Задача тестирования, в результате ожидается успешное выполнение | ||
- name: Тестирование | ||
run: oscript ./tasks/test.os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.vscode | ||
.DS_Store | ||
*.ospx | ||
out/ | ||
oscript_modules/ | ||
tests/tmp |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
| ||
Описание.Имя("winow-cli") | ||
.Версия("1.0.0") | ||
.Автор("Никита Иванченко") | ||
.АдресАвтора("https://github.com/Nivanchenko") | ||
.Описание("Консольная утилита для управления сервером winow") | ||
.ВерсияСреды("1.9.0") | ||
.ВключитьФайл("src") | ||
.ВключитьФайл("packagedef") | ||
.ВключитьФайл("lib.config") | ||
.ВключитьФайл("README.md") | ||
.ВключитьФайл("package-loader.os") | ||
.ЗависитОт("asserts", "1.4.0") | ||
.ЗависитОт("autumn", "4.0.0") | ||
.ЗависитОт("autumn-cli", "1.0.6") | ||
.ЗависитОт("json") | ||
.ЗависитОт("autumn-logos", "1.2.0") | ||
.ЗависитОт("fs") | ||
.ЗависитОт("winow", "0.7.0") | ||
.РазработкаЗависитОт("1commands") | ||
.РазработкаЗависитОт("1testrunner") | ||
.РазработкаЗависитОт("coverage") | ||
.ИсполняемыйФайл("src/main.os", "winow-cli") | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#Использовать autumn | ||
#Использовать autumn-cli | ||
#Использовать autumn-logos | ||
#Использовать ".." | ||
|
||
Поделка = Новый Поделка; | ||
Поделка.ЗапуститьПриложение(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div> | ||
<br><img src="files/wine_and_acorns.jpg" width="150" height="150" alt="Вино и желуди"><br> | ||
WINOW - это тебе не OneScript.WEB | ||
<br> | ||
А так же стоит посмотреть на Библиотеки: | ||
<ul> | ||
{% Для Каждого ИнтереснаяБиблиотека Из Модель.Библиотеки Цикл %} | ||
<li><a href="{{ИнтереснаяБиблиотека.Адрес}}">{{ИнтереснаяБиблиотека.Имя}}</a></li> | ||
{% КонецЦикла; %} | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ "winow": | ||
{ | ||
"КаталогСПриложениями": "./controls", | ||
"АвтоСтарт": false, | ||
"Порт": 3333, | ||
"ИмяХоста": "localhost", | ||
"ЗадержкаПередЧтениемСокета": 65, | ||
"КаталогиСФайлами": { | ||
"/files": "./files" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div> | ||
Все о наших репозиториях можно найти <a href="https://github.com/autumn-library">ТУТ</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div> | ||
Привет, ты на стартовой странице WINOW | ||
<br> | ||
Точное серверное время: {{ТекущаяДата()}} | ||
<br> | ||
Наилучшие пожелания от {{Модель.АвторПожелания}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
// Используйте IntelliSense, чтобы узнать о возможных атрибутах. | ||
// Наведите указатель мыши, чтобы просмотреть описания существующих атрибутов. | ||
// Для получения дополнительной информации посетите: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Отладка 1Script", | ||
"type": "oscript", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/ОтладкаПриложения.os", | ||
"args": [], | ||
"cwd": "${workspaceRoot}", | ||
"env": {}, | ||
"runtimeExecutable": %1, | ||
"runtimeArgs": [], | ||
"debugPort": 2801 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>{{Модель.Заголовок}}</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<style> | ||
body { | ||
margin: 0; | ||
font-family: Arial, Helvetica, sans-serif; | ||
} | ||
|
||
.topnav { | ||
overflow: hidden; | ||
background-color: #333; | ||
} | ||
|
||
.topnav a { | ||
float: left; | ||
color: #f2f2f2; | ||
text-align: center; | ||
padding: 14px 16px; | ||
text-decoration: none; | ||
font-size: 17px; | ||
} | ||
|
||
.topnav a:hover { | ||
background-color: #ddd; | ||
color: black; | ||
} | ||
|
||
.topnav a.active { | ||
background-color: #04AA6D; | ||
color: white; | ||
} | ||
</style> | ||
|
||
</head> | ||
<body> | ||
|
||
<div class="topnav"> | ||
<a class="active" href="/">Главная</a> | ||
<a href="/contact">Контакты</a> | ||
<a href="/about">О нас</a> | ||
</div> | ||
|
||
<div style="padding-left:16px"> | ||
@Контент | ||
</div> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
&Пластилин Перем МенеджерОтображений Экспорт; | ||
|
||
&Контроллер("/") | ||
&Отображение(Шаблон = "./view/main.html", Метод = "ПолучитьМодельКонтрола") | ||
Процедура ПриСозданииОбъекта() | ||
|
||
КонецПроцедуры | ||
|
||
Функция ПолучитьМодельКонтрола() Экспорт | ||
Модель = Новый Структура("Заголовок", "Минималистичный веб сервер WINOW"); | ||
|
||
Возврат Модель; | ||
КонецФункции | ||
|
||
&ТочкаМаршрута("") | ||
&Отображение("./view/index.html") | ||
Процедура Главная(Ответ) Экспорт | ||
Ответ.Модель = Новый Структура("АвторПожелания", "сервер WINOW"); | ||
КонецПроцедуры | ||
|
||
&ТочкаМаршрута("about") | ||
&Отображение("./view/about.html") | ||
Процедура ОСебе(Ответ) Экспорт | ||
Библиотеки = Новый Массив; | ||
Библиотеки.Добавить(Новый Структура("Имя, Адрес", "autumn","https://github.com/autumn-library/autumn")); | ||
Библиотеки.Добавить(Новый Структура("Имя, Адрес", "autumn-dduck ","https://github.com/autumn-library/autumn-dduck")); | ||
Библиотеки.Добавить(Новый Структура("Имя, Адрес", "autumn-killjoy-flavour ","https://github.com/autumn-library/autumn-killjoy-flavour")); | ||
Библиотеки.Добавить(Новый Структура("Имя, Адрес", "autumn-logos ","https://github.com/autumn-library/autumn-logos")); | ||
Библиотеки.Добавить(Новый Структура("Имя, Адрес", "autumn-cli ","https://github.com/autumn-library/autumn-cli")); | ||
|
||
Ответ.Модель = Новый Структура("Библиотеки", Библиотеки); | ||
КонецПроцедуры | ||
|
||
&ТочкаМаршрута("contact") | ||
&Отображение("./view/contact.html") | ||
Процедура Контакты() Экспорт | ||
|
||
КонецПроцедуры |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#Использовать autumn | ||
#Использовать autumn-logos | ||
#Использовать winow | ||
|
||
Поделка = Новый Поделка; | ||
Поделка.ЗапуститьПриложение(); | ||
ЗапускательВебПриложения = Поделка.НайтиЖелудь("ЗапускательВебПриложения"); | ||
ЗапускательВебПриложения.Запустить(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
&Пластилин | ||
Перем ЗапускательВебПриложения; | ||
|
||
&КомандаПриложения(Имя = "start", Описание = "Запуск сервера") | ||
Процедура ПриСозданииОбъекта() | ||
КонецПроцедуры | ||
|
||
&ВыполнениеКоманды | ||
Процедура Запустить() Экспорт | ||
ЗапускательВебПриложения.Запустить(); | ||
КонецПроцедуры |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
&Аргумент(Имя = "PATH", Описание = "Относительный путь инициализации, текущий каталог <.> (точка)") | ||
&ТСтрока | ||
&ПоУмолчанию(".") | ||
Перем Путь; | ||
|
||
&Пластилин | ||
Перем КонструкторВебПриложений; | ||
|
||
&КомандаПриложения(Имя = "init", Описание = "Инициализация нового приложения") | ||
Процедура ПриСозданииОбъекта() | ||
КонецПроцедуры | ||
|
||
&ВыполнениеКоманды | ||
Процедура Запустить() Экспорт | ||
КонструкторВебПриложений.ПроинициализироватьКаталог(Путь); | ||
КонецПроцедуры |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
&Желудь("ОписаниеКонсольногоПриложения") | ||
&Верховный | ||
Процедура ПриСозданииОбъекта() | ||
КонецПроцедуры | ||
|
||
Функция ИмяПриложения() Экспорт | ||
Возврат "winow-cli"; | ||
КонецФункции | ||
|
||
Функция ПолноеИмяПриложения() Экспорт | ||
Возврат "Управление сервером winow"; | ||
КонецФункции | ||
|
||
Функция ВерсияПриложения() Экспорт | ||
Возврат "1.0.0"; | ||
КонецФункции |
Oops, something went wrong.