diff --git a/examples/todo/package-lock.json b/examples/todo/package-lock.json index 86fcb85f..d915402a 100644 --- a/examples/todo/package-lock.json +++ b/examples/todo/package-lock.json @@ -16,7 +16,7 @@ "@salutejs/storage-adapter-memory": "0.6.0", "@sberdevices/spatial-navigation": "1.0.2", "lossless-json": "2.0.8", - "next": "13.5.5", + "next": "13.4.0", "next-transpile-modules": "6.4.1", "react": "18.2.0", "react-dom": "18.2.0", @@ -1266,14 +1266,14 @@ } }, "node_modules/@next/env": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.5.tgz", - "integrity": "sha512-agvIhYWp+ilbScg81s/sLueZo8CNEYLjNOqhISxheLmD/AQI4/VxV7bV76i/KzxH4iHy/va0YS9z0AOwGnw4Fg==" + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/env/-/env-13.4.0.tgz", + "integrity": "sha512-LKofmUuxwGXk2OZJSSJ2SlJE62s6z+56aRsze7chc5TPoVouLR9liTiSWxzYuVzuxk0ui2wtIjyR2tcgS1dIyw==" }, "node_modules/@next/swc-darwin-arm64": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.5.tgz", - "integrity": "sha512-FvTdcJdTA7H1FGY8dKPPbf/O0oDC041/znHZwXA7liiGUhgw5hOQ+9z8tWvuz0M5a/SDjY/IRPBAb5FIFogYww==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.0.tgz", + "integrity": "sha512-C39AGL3ANXA+P3cFclQjFZaJ4RHPmuBhskmyy0N3VyCntDmRrNkS4aXeNY4Xwure9IL1nuw02D8bM55I+FsbuQ==", "cpu": [ "arm64" ], @@ -1286,9 +1286,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.5.tgz", - "integrity": "sha512-mTqNIecaojmyia7appVO2QggBe1Z2fdzxgn6jb3x9qlAk8yY2sy4MAcsj71kC9RlenCqDmr9vtC/ESFf110TPA==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.0.tgz", + "integrity": "sha512-nj6nx6o7rnBXjo1woZFWLk7OUs7y0SQ0k65SX62kc88GqXtYi3BCqbBznjOX8qtrO//NmtAde/Jd5qkjSgINUQ==", "cpu": [ "x64" ], @@ -1301,9 +1301,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.5.tgz", - "integrity": "sha512-U9e+kNkfvwh/T8yo+xcslvNXgyMzPPX1IbwCwnHHFmX5ckb1Uc3XZSInNjFQEQR5xhJpB5sFdal+IiBIiLYkZA==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.0.tgz", + "integrity": "sha512-FBYL7kpzI2KG3lv8gO4xVYmWcFohptjzD9RCLdXsAz+Kqz5VCJILF21DoRcz4Nwj/jMe0SO7l5kBVW4POl4EaQ==", "cpu": [ "arm64" ], @@ -1316,9 +1316,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.5.tgz", - "integrity": "sha512-h7b58eIoNCSmKVC5fr167U0HWZ/yGLbkKD9wIller0nGdyl5zfTji0SsPKJvrG8jvKPFt2xOkVBmXlFOtuKynw==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.0.tgz", + "integrity": "sha512-S3htBbcovnLMgVn0z1ThrP1iAeEM43fw8B7S3KyHTAGe0I21ww4rvUkLdgPCqLNvMpv899lmG7NU5rs6rTkGvg==", "cpu": [ "arm64" ], @@ -1331,9 +1331,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.5.tgz", - "integrity": "sha512-6U4y21T1J6FfcpM9uqzBJicxycpB5gJKLyQ3g6KOfBzT8H1sMwfHTRrvHKB09GIn1BCRy5YJHrA1G26DzqR46w==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.0.tgz", + "integrity": "sha512-H8GhCgQwFl6iWJ6azQ2tG/GY8BUg1nhPtg4Tp2kIPljdyQypTGJe8oRnPDx0N48WWvB2fNeA7LNEwzVuSidH2w==", "cpu": [ "x64" ], @@ -1346,9 +1346,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.5.tgz", - "integrity": "sha512-OuqWSAQHJQM2EsapPFTSU/FLQ0wKm7UeRNatiR/jLeCe1V02aB9xmzuWYo2Neaxxag4rss3S8fj+lvMLzwDaFA==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.0.tgz", + "integrity": "sha512-mztVybRPY39NfPOA3QrRQKzYuw7A/D8ElR6ruvM1cBsXMEfF5xTzdZqfTtrE/gNTPUFug9FJPpiRpkZ4mDUl8w==", "cpu": [ "x64" ], @@ -1361,9 +1361,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.5.tgz", - "integrity": "sha512-+yLrOZIIZDY4uGn9bLOc0wTgs+M8RuOUFSUK3BhmcLav9e+tcAj0jyBHD4aXv2qWhppUeuYMsyBo1I58/eE6Dg==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.0.tgz", + "integrity": "sha512-mdVh/n0QqT2uXqn8kaTywUoLxY1OYqTpiKbt5b51pDwOStqgbIbqBqG0A7XDaiqWa7RKwllOYxPlPm16EDfWUA==", "cpu": [ "arm64" ], @@ -1376,9 +1376,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.5.tgz", - "integrity": "sha512-SyMxXyJtf9ScMH0Dh87THJMXNFvfkRAk841xyW9SeOX3KxM1buXX3hN7vof4kMGk0Yg996OGsX+7C9ueS8ugsw==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.0.tgz", + "integrity": "sha512-GNRqT2mqxxH0x9VthFqziBj8X8HsoBUougmLe3kOouRq/jF73LpKXG0Qs2MYkylqvv/Wg31EYjFNcJnBi1Nimg==", "cpu": [ "ia32" ], @@ -1391,9 +1391,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.5.tgz", - "integrity": "sha512-n5KVf2Ok0BbLwofAaHiiKf+BQCj1M8WmTujiER4/qzYAVngnsNSjqEWvJ03raeN9eURqxDO+yL5VRoDrR33H9A==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.0.tgz", + "integrity": "sha512-0AkvhUBUqeb4WKN75IW1KjPkN3HazQFA0OpMuTK+6ptJUXMaMwDDcF3sIPCI741BJ2fpODB7BPM4C63hXWEypg==", "cpu": [ "x64" ], @@ -1653,9 +1653,9 @@ } }, "node_modules/@swc/helpers": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz", - "integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", + "integrity": "sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==", "dependencies": { "tslib": "^2.4.0" } @@ -2660,11 +2660,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" - }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -4701,9 +4696,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "funding": [ { "type": "github", @@ -4724,37 +4719,39 @@ "dev": true }, "node_modules/next": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/next/-/next-13.5.5.tgz", - "integrity": "sha512-LddFJjpfrtrMMw8Q9VLhIURuSidiCNcMQjRqcPtrKd+Fx07MsG7hYndJb/f2d3I+mTbTotsTJfCnn0eZ/YPk8w==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/next/-/next-13.4.0.tgz", + "integrity": "sha512-y3E+2ZjiVrphkz7zcJvd2rEG6miOekI8krPfWV4AZZ9TaF0LDuFdP/f+RQ5M9wRvsz6GWw8k8+7jsO860GxSqg==", "dependencies": { - "@next/env": "13.5.5", - "@swc/helpers": "0.5.2", + "@next/env": "13.4.0", + "@swc/helpers": "0.5.1", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.31", + "postcss": "8.4.14", "styled-jsx": "5.1.1", - "watchpack": "2.4.0" + "zod": "3.21.4" }, "bin": { "next": "dist/bin/next" }, "engines": { - "node": ">=16.14.0" + "node": ">=16.8.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "13.5.5", - "@next/swc-darwin-x64": "13.5.5", - "@next/swc-linux-arm64-gnu": "13.5.5", - "@next/swc-linux-arm64-musl": "13.5.5", - "@next/swc-linux-x64-gnu": "13.5.5", - "@next/swc-linux-x64-musl": "13.5.5", - "@next/swc-win32-arm64-msvc": "13.5.5", - "@next/swc-win32-ia32-msvc": "13.5.5", - "@next/swc-win32-x64-msvc": "13.5.5" + "@next/swc-darwin-arm64": "13.4.0", + "@next/swc-darwin-x64": "13.4.0", + "@next/swc-linux-arm64-gnu": "13.4.0", + "@next/swc-linux-arm64-musl": "13.4.0", + "@next/swc-linux-x64-gnu": "13.4.0", + "@next/swc-linux-x64-musl": "13.4.0", + "@next/swc-win32-arm64-msvc": "13.4.0", + "@next/swc-win32-ia32-msvc": "13.4.0", + "@next/swc-win32-x64-msvc": "13.4.0" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", + "fibers": ">= 3.1.0", + "node-sass": "^6.0.0 || ^7.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", "sass": "^1.3.0" @@ -4763,6 +4760,12 @@ "@opentelemetry/api": { "optional": true }, + "fibers": { + "optional": true + }, + "node-sass": { + "optional": true + }, "sass": { "optional": true } @@ -5001,9 +5004,9 @@ } }, "node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", "funding": [ { "type": "opencollective", @@ -5012,14 +5015,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.4", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -5744,18 +5743,6 @@ "loose-envify": "^1.0.0" } }, - "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -5907,6 +5894,14 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zod": { + "version": "3.21.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", + "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } }, "dependencies": { @@ -6845,62 +6840,62 @@ } }, "@next/env": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.5.tgz", - "integrity": "sha512-agvIhYWp+ilbScg81s/sLueZo8CNEYLjNOqhISxheLmD/AQI4/VxV7bV76i/KzxH4iHy/va0YS9z0AOwGnw4Fg==" + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/env/-/env-13.4.0.tgz", + "integrity": "sha512-LKofmUuxwGXk2OZJSSJ2SlJE62s6z+56aRsze7chc5TPoVouLR9liTiSWxzYuVzuxk0ui2wtIjyR2tcgS1dIyw==" }, "@next/swc-darwin-arm64": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.5.tgz", - "integrity": "sha512-FvTdcJdTA7H1FGY8dKPPbf/O0oDC041/znHZwXA7liiGUhgw5hOQ+9z8tWvuz0M5a/SDjY/IRPBAb5FIFogYww==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.0.tgz", + "integrity": "sha512-C39AGL3ANXA+P3cFclQjFZaJ4RHPmuBhskmyy0N3VyCntDmRrNkS4aXeNY4Xwure9IL1nuw02D8bM55I+FsbuQ==", "optional": true }, "@next/swc-darwin-x64": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.5.tgz", - "integrity": "sha512-mTqNIecaojmyia7appVO2QggBe1Z2fdzxgn6jb3x9qlAk8yY2sy4MAcsj71kC9RlenCqDmr9vtC/ESFf110TPA==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.0.tgz", + "integrity": "sha512-nj6nx6o7rnBXjo1woZFWLk7OUs7y0SQ0k65SX62kc88GqXtYi3BCqbBznjOX8qtrO//NmtAde/Jd5qkjSgINUQ==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.5.tgz", - "integrity": "sha512-U9e+kNkfvwh/T8yo+xcslvNXgyMzPPX1IbwCwnHHFmX5ckb1Uc3XZSInNjFQEQR5xhJpB5sFdal+IiBIiLYkZA==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.0.tgz", + "integrity": "sha512-FBYL7kpzI2KG3lv8gO4xVYmWcFohptjzD9RCLdXsAz+Kqz5VCJILF21DoRcz4Nwj/jMe0SO7l5kBVW4POl4EaQ==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.5.tgz", - "integrity": "sha512-h7b58eIoNCSmKVC5fr167U0HWZ/yGLbkKD9wIller0nGdyl5zfTji0SsPKJvrG8jvKPFt2xOkVBmXlFOtuKynw==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.0.tgz", + "integrity": "sha512-S3htBbcovnLMgVn0z1ThrP1iAeEM43fw8B7S3KyHTAGe0I21ww4rvUkLdgPCqLNvMpv899lmG7NU5rs6rTkGvg==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.5.tgz", - "integrity": "sha512-6U4y21T1J6FfcpM9uqzBJicxycpB5gJKLyQ3g6KOfBzT8H1sMwfHTRrvHKB09GIn1BCRy5YJHrA1G26DzqR46w==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.0.tgz", + "integrity": "sha512-H8GhCgQwFl6iWJ6azQ2tG/GY8BUg1nhPtg4Tp2kIPljdyQypTGJe8oRnPDx0N48WWvB2fNeA7LNEwzVuSidH2w==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.5.tgz", - "integrity": "sha512-OuqWSAQHJQM2EsapPFTSU/FLQ0wKm7UeRNatiR/jLeCe1V02aB9xmzuWYo2Neaxxag4rss3S8fj+lvMLzwDaFA==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.0.tgz", + "integrity": "sha512-mztVybRPY39NfPOA3QrRQKzYuw7A/D8ElR6ruvM1cBsXMEfF5xTzdZqfTtrE/gNTPUFug9FJPpiRpkZ4mDUl8w==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.5.tgz", - "integrity": "sha512-+yLrOZIIZDY4uGn9bLOc0wTgs+M8RuOUFSUK3BhmcLav9e+tcAj0jyBHD4aXv2qWhppUeuYMsyBo1I58/eE6Dg==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.0.tgz", + "integrity": "sha512-mdVh/n0QqT2uXqn8kaTywUoLxY1OYqTpiKbt5b51pDwOStqgbIbqBqG0A7XDaiqWa7RKwllOYxPlPm16EDfWUA==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.5.tgz", - "integrity": "sha512-SyMxXyJtf9ScMH0Dh87THJMXNFvfkRAk841xyW9SeOX3KxM1buXX3hN7vof4kMGk0Yg996OGsX+7C9ueS8ugsw==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.0.tgz", + "integrity": "sha512-GNRqT2mqxxH0x9VthFqziBj8X8HsoBUougmLe3kOouRq/jF73LpKXG0Qs2MYkylqvv/Wg31EYjFNcJnBi1Nimg==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.5.tgz", - "integrity": "sha512-n5KVf2Ok0BbLwofAaHiiKf+BQCj1M8WmTujiER4/qzYAVngnsNSjqEWvJ03raeN9eURqxDO+yL5VRoDrR33H9A==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.0.tgz", + "integrity": "sha512-0AkvhUBUqeb4WKN75IW1KjPkN3HazQFA0OpMuTK+6ptJUXMaMwDDcF3sIPCI741BJ2fpODB7BPM4C63hXWEypg==", "optional": true }, "@popperjs/core": { @@ -7117,9 +7112,9 @@ } }, "@swc/helpers": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz", - "integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", + "integrity": "sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==", "requires": { "tslib": "^2.4.0" } @@ -7905,11 +7900,6 @@ "path-is-absolute": "^1.0.0" } }, - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" - }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -9430,9 +9420,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==" + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==" }, "natural-compare": { "version": "1.4.0", @@ -9441,26 +9431,26 @@ "dev": true }, "next": { - "version": "13.5.5", - "resolved": "https://registry.npmjs.org/next/-/next-13.5.5.tgz", - "integrity": "sha512-LddFJjpfrtrMMw8Q9VLhIURuSidiCNcMQjRqcPtrKd+Fx07MsG7hYndJb/f2d3I+mTbTotsTJfCnn0eZ/YPk8w==", - "requires": { - "@next/env": "13.5.5", - "@next/swc-darwin-arm64": "13.5.5", - "@next/swc-darwin-x64": "13.5.5", - "@next/swc-linux-arm64-gnu": "13.5.5", - "@next/swc-linux-arm64-musl": "13.5.5", - "@next/swc-linux-x64-gnu": "13.5.5", - "@next/swc-linux-x64-musl": "13.5.5", - "@next/swc-win32-arm64-msvc": "13.5.5", - "@next/swc-win32-ia32-msvc": "13.5.5", - "@next/swc-win32-x64-msvc": "13.5.5", - "@swc/helpers": "0.5.2", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/next/-/next-13.4.0.tgz", + "integrity": "sha512-y3E+2ZjiVrphkz7zcJvd2rEG6miOekI8krPfWV4AZZ9TaF0LDuFdP/f+RQ5M9wRvsz6GWw8k8+7jsO860GxSqg==", + "requires": { + "@next/env": "13.4.0", + "@next/swc-darwin-arm64": "13.4.0", + "@next/swc-darwin-x64": "13.4.0", + "@next/swc-linux-arm64-gnu": "13.4.0", + "@next/swc-linux-arm64-musl": "13.4.0", + "@next/swc-linux-x64-gnu": "13.4.0", + "@next/swc-linux-x64-musl": "13.4.0", + "@next/swc-win32-arm64-msvc": "13.4.0", + "@next/swc-win32-ia32-msvc": "13.4.0", + "@next/swc-win32-x64-msvc": "13.4.0", + "@swc/helpers": "0.5.1", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.31", + "postcss": "8.4.14", "styled-jsx": "5.1.1", - "watchpack": "2.4.0" + "zod": "3.21.4" } }, "next-transpile-modules": { @@ -9626,11 +9616,11 @@ } }, "postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", "requires": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.4", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } @@ -10143,15 +10133,6 @@ "loose-envify": "^1.0.0" } }, - "watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "requires": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - } - }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -10266,6 +10247,11 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true + }, + "zod": { + "version": "3.21.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", + "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==" } } } diff --git a/examples/todo/package.json b/examples/todo/package.json index 899b82f6..ab7fd3cb 100644 --- a/examples/todo/package.json +++ b/examples/todo/package.json @@ -19,7 +19,7 @@ "@salutejs/storage-adapter-memory": "0.6.0", "@sberdevices/spatial-navigation": "1.0.2", "lossless-json": "2.0.8", - "next": "13.5.5", + "next": "13.4.0", "next-transpile-modules": "6.4.1", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/packages/scenario/src/lib/types/salute.ts b/packages/scenario/src/lib/types/salute.ts index 55b96ed4..86a84344 100755 --- a/packages/scenario/src/lib/types/salute.ts +++ b/packages/scenario/src/lib/types/salute.ts @@ -166,6 +166,7 @@ export interface SaluteSession { currentIntent?: string; state: Record; missingVariableName?: string; + expires?: number; } export interface Recognizer { diff --git a/packages/scenario/src/lib/types/storage.ts b/packages/scenario/src/lib/types/storage.ts index 47fc7f11..0a32c8dd 100644 --- a/packages/scenario/src/lib/types/storage.ts +++ b/packages/scenario/src/lib/types/storage.ts @@ -2,6 +2,7 @@ import { SaluteSession } from './salute'; export interface SaluteSessionStorage { resolve: (id: string) => Promise; - save: ({ id, session }: { id: string; session: SaluteSession }) => Promise; + save: (params: { id: string; session: SaluteSession; lifetime?: number }) => Promise; reset: (id: string) => Promise; + validate?: () => Promise; } diff --git a/packages/storage-adapter-memory/src/index.ts b/packages/storage-adapter-memory/src/index.ts index 5b718104..2f5ee6f9 100644 --- a/packages/storage-adapter-memory/src/index.ts +++ b/packages/storage-adapter-memory/src/index.ts @@ -14,8 +14,11 @@ export class SaluteMemoryStorage implements SaluteSessionStorage { ); } - async save({ id, session }: { id: string; session: SaluteSession }) { + async save({ id, session, lifetime = 0 }: { id: string; session: SaluteSession; lifetime?: number }) { this.sessions[id] = session; + if (lifetime > 0) { + this.sessions[id].expires = Date.now() + lifetime; + } return Promise.resolve(); } @@ -30,4 +33,15 @@ export class SaluteMemoryStorage implements SaluteSessionStorage { return Promise.resolve(); } + + async validate() { + Object.keys(this.sessions).forEach((sessionId) => { + const { expires } = this.sessions[sessionId]; + if (expires && expires < Date.now()) { + delete this.sessions[sessionId]; + } + }); + + return Promise.resolve(); + } }