Skip to content

Commit a36eea9

Browse files
authored
chore: lib structure rework (#244)
* chore: lib structure rework * chore: update
1 parent e844770 commit a36eea9

24 files changed

Lines changed: 509 additions & 1703 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ connect.lock
3939
.nx/cache/
4040
.nx/workspace-data/
4141
vite.config.*.timestamp-*
42+
.eslintcache
4243

4344
### Tests ###
4445
/coverage/

apps/atrium-telegram/app/utils/init.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@ export async function init(options: {
8282
viewport.bindCssVars()
8383
}
8484

85+
// Application should be in fullscreen mode only on small screens
86+
if (viewport.requestFullscreen.isAvailable()) {
87+
await viewport.requestFullscreen()
88+
89+
setTimeout(() => {
90+
// The app is now in fullscreen
91+
if (window.innerWidth > 600) {
92+
viewport.exitFullscreen()
93+
}
94+
}, 50)
95+
}
96+
8597
if (closingBehavior.mount.isAvailable()) {
8698
closingBehavior.mount()
8799
closingBehavior.enableConfirmation()

apps/atrium-telegram/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
"postinstall": "nuxt prepare"
1414
},
1515
"dependencies": {
16-
"@date-fns/tz": "catalog:",
17-
"@neoconfetti/vue": "catalog:",
18-
"@pinia/nuxt": "catalog:",
16+
"@date-fns/tz": "catalog:integrations",
17+
"@neoconfetti/vue": "catalog:integrations",
18+
"@pinia/nuxt": "catalog:integrations",
1919
"@roll-stack/database": "workspace:*",
2020
"@roll-stack/queue": "workspace:*",
2121
"@roll-stack/schema": "workspace:*",
2222
"@roll-stack/ui": "workspace:*",
23-
"@telegram-apps/init-data-node": "catalog:",
24-
"@tma.js/sdk-vue": "catalog:",
25-
"date-fns": "catalog:",
26-
"libphonenumber-js": "catalog:",
27-
"pinia": "catalog:"
23+
"@telegram-apps/init-data-node": "catalog:integrations",
24+
"@tma.js/sdk-vue": "catalog:integrations",
25+
"date-fns": "catalog:integrations",
26+
"libphonenumber-js": "catalog:integrations",
27+
"pinia": "catalog:integrations"
2828
},
2929
"devDependencies": {
30-
"@types/node": "catalog:",
31-
"eruda": "catalog:",
32-
"nuxt": "catalog:"
30+
"@types/node": "catalog:types",
31+
"eruda": "catalog:dev",
32+
"nuxt": "catalog:dev"
3333
}
3434
}

apps/core-telegram/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
"@roll-stack/database": "workspace:*",
1717
"@roll-stack/queue": "workspace:*",
1818
"@roll-stack/ui": "workspace:*",
19-
"arktype": "catalog:",
20-
"aws4fetch": "catalog:",
21-
"date-fns": "catalog:",
22-
"grammy": "catalog:",
23-
"libphonenumber-js": "catalog:",
24-
"sharp": "catalog:"
19+
"arktype": "catalog:integrations",
20+
"aws4fetch": "catalog:integrations",
21+
"date-fns": "catalog:integrations",
22+
"grammy": "catalog:integrations",
23+
"libphonenumber-js": "catalog:integrations",
24+
"sharp": "catalog:integrations"
2525
},
2626
"devDependencies": {
27-
"@types/node": "catalog:",
28-
"nuxt": "catalog:"
27+
"@types/node": "catalog:types",
28+
"nuxt": "catalog:dev"
2929
}
3030
}

apps/geo-vault/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
},
1515
"dependencies": {
1616
"@roll-stack/geo-database": "workspace:*",
17-
"arktype": "catalog:",
18-
"aws4fetch": "catalog:",
19-
"date-fns": "catalog:",
20-
"ioredis": "catalog:",
21-
"libphonenumber-js": "catalog:",
22-
"ru-nalog-fias-gar": "catalog:",
23-
"sharp": "catalog:"
17+
"arktype": "catalog:integrations",
18+
"aws4fetch": "catalog:integrations",
19+
"date-fns": "catalog:integrations",
20+
"ioredis": "catalog:integrations",
21+
"libphonenumber-js": "catalog:integrations",
22+
"ru-nalog-fias-gar": "1.0.4",
23+
"sharp": "catalog:integrations"
2424
},
2525
"devDependencies": {
26-
"@types/node": "catalog:",
27-
"nuxt": "catalog:",
28-
"nuxt-auth-utils": "catalog:"
26+
"@types/node": "catalog:types",
27+
"nuxt": "catalog:dev",
28+
"nuxt-auth-utils": "catalog:dev"
2929
}
3030
}

apps/storefront-telegram/app/app.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<script setup lang="ts">
1818
import * as locales from '@nuxt/ui/locale'
19-
import { retrieveLaunchParams, themeParams } from '@tma.js/sdk-vue'
19+
import { themeParams } from '@tma.js/sdk-vue'
2020
2121
const { locale } = useI18n()
2222
@@ -34,17 +34,17 @@ useHead({
3434
}],
3535
})
3636
37-
// App
38-
const isDev = (retrieveLaunchParams().startParam === 'debug' || import.meta.env.DEV) ?? false
39-
await init({
40-
debug: false,
37+
// Telegram
38+
const isDev = import.meta.env.DEV
39+
40+
init({
41+
debug: isDev,
4142
eruda: isDev,
4243
mockForMacOS: false,
44+
}).then(() => {
45+
useBackButton()
4346
})
4447
45-
// Telegram
46-
useBackButton()
47-
4848
// Fix system theme
4949
const isDark = computed(() => themeParams.isDark())
5050
const colorMode = useColorMode()

apps/storefront-telegram/app/utils/init.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,18 @@ export async function init(options: {
8080
if (viewport.mount.isAvailable()) {
8181
await viewport.mount()
8282
viewport.bindCssVars()
83+
}
8384

84-
if (viewport.requestFullscreen.isAvailable()) {
85-
await viewport.requestFullscreen()
85+
// Application should be in fullscreen mode only on small screens
86+
if (viewport.requestFullscreen.isAvailable()) {
87+
await viewport.requestFullscreen()
8688

87-
setTimeout(() => {
88-
// The app is now in fullscreen
89-
if (window.innerWidth > 600) {
90-
// Application should be in fullscreen mode only on small screens!
91-
viewport.exitFullscreen()
92-
}
93-
}, 100)
94-
}
89+
setTimeout(() => {
90+
// The app is now in fullscreen
91+
if (window.innerWidth > 600) {
92+
viewport.exitFullscreen()
93+
}
94+
}, 50)
9595
}
9696

9797
if (closingBehavior.mount.isAvailable()) {

apps/storefront-telegram/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
"postinstall": "nuxt prepare"
1414
},
1515
"dependencies": {
16-
"@neoconfetti/vue": "catalog:",
17-
"@pinia/nuxt": "catalog:",
16+
"@neoconfetti/vue": "catalog:integrations",
17+
"@pinia/nuxt": "catalog:integrations",
1818
"@roll-stack/database": "workspace:*",
1919
"@roll-stack/ui": "workspace:*",
20-
"@telegram-apps/init-data-node": "catalog:",
21-
"@tma.js/sdk-vue": "catalog:",
22-
"date-fns": "catalog:",
23-
"libphonenumber-js": "catalog:",
24-
"pinia": "catalog:"
20+
"@telegram-apps/init-data-node": "catalog:integrations",
21+
"@tma.js/sdk-vue": "catalog:integrations",
22+
"date-fns": "catalog:integrations",
23+
"libphonenumber-js": "catalog:integrations",
24+
"pinia": "catalog:integrations"
2525
},
2626
"devDependencies": {
27-
"@types/node": "catalog:",
28-
"eruda": "catalog:",
29-
"nuxt": "catalog:"
27+
"@types/node": "catalog:types",
28+
"eruda": "catalog:dev",
29+
"nuxt": "catalog:dev"
3030
}
3131
}

apps/web-app/package.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,35 @@
66
"scripts": {
77
"build": "nuxt build",
88
"dev": "nuxt dev --port 3501",
9+
"dev:compose": "docker compose -f ./../../docker/web-app/docker-compose.yaml up -d",
910
"preview": "PORT=3501 nuxt preview",
1011
"clean": "rm -rf .output",
1112
"clean:modules": "rm -rf .nuxt node_modules",
1213
"typecheck": "nuxt typecheck",
1314
"postinstall": "nuxt prepare"
1415
},
1516
"dependencies": {
16-
"@neoconfetti/vue": "catalog:",
17-
"@openai/agents": "catalog:",
18-
"@pinia/nuxt": "catalog:",
17+
"@neoconfetti/vue": "catalog:integrations",
18+
"@openai/agents": "catalog:integrations",
19+
"@pinia/nuxt": "catalog:integrations",
1920
"@roll-stack/database": "workspace:*",
2021
"@roll-stack/queue": "workspace:*",
2122
"@roll-stack/schema": "workspace:*",
2223
"@roll-stack/ui": "workspace:*",
23-
"aws4fetch": "catalog:",
24-
"date-fns": "catalog:",
25-
"ioredis": "catalog:",
26-
"libphonenumber-js": "catalog:",
27-
"node-xlsx": "catalog:",
28-
"nuxt-tiptap-editor": "catalog:",
29-
"openai": "catalog:",
30-
"pinia": "catalog:",
31-
"sharp": "catalog:",
32-
"uqr": "catalog:"
24+
"aws4fetch": "catalog:integrations",
25+
"date-fns": "catalog:integrations",
26+
"ioredis": "catalog:integrations",
27+
"libphonenumber-js": "catalog:integrations",
28+
"node-xlsx": "0.24.0",
29+
"nuxt-tiptap-editor": "catalog:integrations",
30+
"openai": "catalog:integrations",
31+
"pinia": "catalog:integrations",
32+
"sharp": "catalog:integrations",
33+
"uqr": "0.1.2"
3334
},
3435
"devDependencies": {
35-
"@types/node": "catalog:",
36-
"nuxt": "catalog:",
37-
"nuxt-auth-utils": "catalog:"
36+
"@types/node": "catalog:types",
37+
"nuxt": "catalog:dev",
38+
"nuxt-auth-utils": "catalog:dev"
3839
}
3940
}

apps/web-app/server/utils/tests/unit/permission.spec.ts renamed to apps/web-app/server/utils/test/unit/permission.spec.ts

File renamed without changes.

0 commit comments

Comments
 (0)