Skip to content

Commit

Permalink
feat(refactoring)!: полностью переработанная логика работы
Browse files Browse the repository at this point in the history
- добавлена подробная документация
- тесты
  • Loading branch information
wmakeev committed Feb 6, 2025
1 parent 8daeddd commit 2e49ee2
Show file tree
Hide file tree
Showing 22 changed files with 4,968 additions and 597 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

84 changes: 0 additions & 84 deletions .eslintrc.json

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test and coverage action
on:
push:
branches:
- master
jobs:
coverage:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x', '22.x']
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
env:
MOYSKLAD_TOKEN: ${{ secrets.MOYSKLAD_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

# npm
node_modules
package-lock.json

# env
.env*
Expand All @@ -15,3 +14,6 @@ package-lock.json

# build
/build

#coverage
/coverage/
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock.json
78 changes: 74 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,91 @@
{
"type": "node",
"request": "launch",
"name": "Launch TS",
"name": "Launch TS ${file}",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}",
"envFile": "${workspaceFolder}/.env",
"runtimeArgs": [
"-r",
"source-map-support/register"
"--enable-source-maps"
],
"args": ["-p", "31"],
"preLaunchTask": "npm: compile",
"outFiles": [
"${workspaceFolder}/build/**/*.js"
],
"internalConsoleOptions": "openOnSessionStart",
"outputCapture": "std"
},
{
"type": "node",
"request": "launch",
"name": "Launch TS Test ${file}",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}",
"envFile": "${workspaceFolder}/.env",
"runtimeArgs": [
"--enable-source-maps",
"--test-reporter=spec"
],
"preLaunchTask": "npm: compile",
"outFiles": [
"${workspaceFolder}/build/**/*.js"
],
"internalConsoleOptions": "openOnSessionStart",
"outputCapture": "std"
},
{
"type": "node",
"request": "launch",
"name": "Launch TS Test ${file} (--test-only)",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}",
"envFile": "${workspaceFolder}/.env",
"runtimeArgs": [
"--enable-source-maps",
"--test-only",
"--test-reporter=spec"
],
"preLaunchTask": "npm: compile",
"outFiles": [
"${workspaceFolder}/build/**/*.js"
],
"internalConsoleOptions": "openOnSessionStart",
"outputCapture": "std"
},
{
"type": "node",
"request": "launch",
"name": "Launch Demo",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}",
"envFile": "${workspaceFolder}/.env",
"runtimeArgs": [
"--enable-source-maps",
],
"args": ["-p", "99"],
"preLaunchTask": "npm: compile",
"outFiles": [
"${workspaceFolder}/build/**/*.js"
],
"internalConsoleOptions": "openOnSessionStart"
},
{
"type": "node",
"request": "launch",
"name": "Launch JS",
"skipFiles": [
"<node_internals>/**"
],
"program": "${file}",
"envFile": "${workspaceFolder}/.env",
"internalConsoleOptions": "openOnSessionStart"
}
]
Expand Down
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@
"files.exclude": {
"node_modules": true
},
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"cSpell.language": "en,ru",
"cSpell.words": [
"customerorder",
"customerorders",
"invoiceout"
]
}
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Changelog

## 3.0.0 (5 Февраля 2025)

- Полностью переработанная логика работы планировщика.
- Добавлена документация.
- Изменен API.
- Убрана retry логика, т.к. на уровне планировщика сложно обрабатывать ошибки обрыва соединения на этапе получения тела ответа.

## 1.0.0 (4 Июля 2022)

- Более надежный алогоритм расчета задержки
- Стратегия для retry запросов
- Более надежный алгоритм расчета задержки.
- Стратегия для retry запросов.

## 0.0.1 (27 Июня 2021)

- Первая экспериментальная версия планировщика запросов
- Первая экспериментальная версия планировщика запросов.
Loading

0 comments on commit 2e49ee2

Please sign in to comment.