diff --git a/.gitignore b/.gitignore index b27a916..4bbe5c9 100644 --- a/.gitignore +++ b/.gitignore @@ -14,5 +14,6 @@ package.json package-lock.json favicon_io.zip classcreator.py +achievements.py *token* *.secret \ No newline at end of file diff --git a/discordbot.py b/discordbot.py index 4ea3ee3..eb59b6a 100644 --- a/discordbot.py +++ b/discordbot.py @@ -18,6 +18,7 @@ classes_collection = db['classes'] weapons_collection = db['weapons'] skins_collection = db['skins'] users_collection = db['users'] +achievements_collection = db['achievements'] intents = discord.Intents.all() diff --git a/game_server.py b/game_server.py index 35eb04d..02d28a9 100644 --- a/game_server.py +++ b/game_server.py @@ -52,6 +52,7 @@ classes_collection = db['classes'] enemies_collection = db['enemies'] active_sockets_collection = db['active_sockets'] oauth_states = db['oauth_states'] +achievements_collection = db['achievements'] def decode_token(token): try: @@ -68,10 +69,13 @@ def token_required(f): token = request.headers.get('Authorization') if not token: return jsonify({'error': 'Token is missing'}), 401 - user_id = decode_token(token) - if not user_id: + try: + current_user_id = decode_token(token) + if not current_user_id: + raise ValueError('Invalid token') + except: return jsonify({'error': 'Token is invalid or expired'}), 401 - return f(user_id, *args, **kwargs) + return f(current_user_id, *args, **kwargs) return decorated @@ -81,6 +85,35 @@ main_room = 'main_game_room' MAP_WIDTH = 3000 MAP_HEIGHT = 2000 +def award_achievement(user_id, achievement_id): + user = users_collection.find_one({'_id': ObjectId(user_id)}) + if not user: + return False + + achievement = achievements_collection.find_one({'id': achievement_id}) + if not achievement: + return False + + if 'achievements' not in user: + users_collection.update_one({'_id': ObjectId(user_id)}, {'$set': {'achievements': []}}) + + if achievement_id not in user.get('achievements', []): + users_collection.update_one( + {'_id': ObjectId(user_id)}, + {'$push': {'achievements': achievement_id}} + ) + + # Check for classes to unlock + classes_to_unlock = list(classes_collection.find({'unlock_requirements.achievement': achievement_id})) + for class_doc in classes_to_unlock: + if str(class_doc['_id']) not in user.get('unlocked_classes', []): + users_collection.update_one( + {'_id': ObjectId(user_id)}, + {'$push': {'unlocked_classes': str(class_doc['_id'])}} + ) + + return True + return False def send_discord_alert(message): @@ -311,6 +344,16 @@ def discord_callback(): }} ) + # Award the achievement + if award_achievement(user_id, 'discord_linked'): + socketio.emit('achievement_unlocked', { + 'achievement_id': 'discord_linked', + 'name': 'Discord Linked', + 'description': 'Successfully linked your Discord account', + 'image': 'discord_achievement.png' + }, room=request.sid) + + # After successfully updating the user in the database: add_discord_role(user_data['id'], ACCOUNT_LINKED_ROLE_ID) @@ -322,6 +365,30 @@ def discord_callback(): """ +@app.route('/get-user-achievements', methods=['GET']) +@token_required +def get_user_achievements(user_id): + user = users_collection.find_one({'_id': ObjectId(user_id)}) + if not user: + return jsonify({'error': 'User not found'}), 404 + + user_achievements = user.get('achievements', []) + achievement_details = list(achievements_collection.find({'id': {'$in': user_achievements}})) + + for achievement in achievement_details: + achievement['_id'] = str(achievement['_id']) + + # Check for unlocked classes + unlocked_classes = list(classes_collection.find({'unlock_requirements.achievement': achievement['id']})) + achievement['unlocked_classes'] = [{'name': c['name'], 'image': c['image_source']} for c in unlocked_classes] + + # Check for unlocked skins + unlocked_skins = list(skins_collection.find({'unlock_requirements.achievement': achievement['id']})) + achievement['unlocked_skins'] = [{'name': s['name'], 'image': s['image_source']} for s in unlocked_skins] + + return jsonify(achievement_details), 200 + + @app.route('/unlink-discord', methods=['POST']) @token_required def unlink_discord(user_id): @@ -478,45 +545,64 @@ def buy_weapon(): @app.route('/get-available-classes', methods=['GET']) def get_available_classes(): + current_user = get_current_user() # Implement this function to get the current user classes = list(classes_collection.find()) for class_data in classes: class_data['_id'] = str(class_data['_id']) class_data['starting_weapon'] = weapons_collection.find_one({'_id': class_data['starting_weapon']}) class_data['starting_weapon']['_id'] = str(class_data['starting_weapon']['_id']) + + if current_user: + class_data['unlocked'] = ( + class_data['unlocked_by_default'] or + str(class_data['_id']) in current_user.get('unlocked_classes', []) or + (class_data.get('unlock_requirements', {}).get('achievement') in current_user.get('achievements', [])) + ) + else: + class_data['unlocked'] = class_data['unlocked_by_default'] + return jsonify(classes) @app.route('/select-class', methods=['POST']) -def select_class(): +@token_required +def select_class(current_user_id): data = request.json - username = data.get('username') class_id = data.get('class_id') if not class_id: return jsonify({'error': 'Missing class_id'}), 400 + user = users_collection.find_one({'_id': ObjectId(current_user_id)}) + if not user: + return jsonify({'error': 'User not found'}), 404 + player_class = classes_collection.find_one({'_id': ObjectId(class_id)}) if not player_class: return jsonify({'error': 'Class not found'}), 404 + # Check if the class is already selected + if user.get('selected_class') == ObjectId(class_id): + return jsonify({'success': True, 'message': 'Class is already selected'}), 200 + + # Check if the class is unlocked for the user if not player_class['unlocked_by_default']: - if not username: - return jsonify({'error': 'Username required for locked classes'}), 403 - - user = users_collection.find_one({'username': username}) - if not user: - return jsonify({'error': 'User not found'}), 404 - - # Check if the user has met the unlock requirements - # This is a placeholder and should be implemented based on your game's logic - return jsonify({'error': 'Class is locked'}), 403 + if 'unlock_requirements' in player_class: + required_achievement = player_class['unlock_requirements'].get('achievement') + if required_achievement and required_achievement not in user.get('achievements', []): + return jsonify({'error': 'Class is locked'}), 403 + elif str(player_class['_id']) not in user.get('unlocked_classes', []): + return jsonify({'error': 'Class is locked'}), 403 - if username: - users_collection.update_one( - {'username': username}, - {'$set': {'selected_class': ObjectId(class_id)}} - ) + # Update the user's selected class + result = users_collection.update_one( + {'_id': ObjectId(current_user_id)}, + {'$set': {'selected_class': ObjectId(class_id)}} + ) - return jsonify({'success': True, 'message': 'Class selected successfully'}), 200 + if result.modified_count > 0: + return jsonify({'success': True, 'message': 'Class selected successfully'}), 200 + else: + return jsonify({'success': True, 'message': 'No changes made to selected class'}), 200 @app.route('/get-available-skins', methods=['GET']) @@ -1080,6 +1166,15 @@ def on_upgrade_selected(data): else: print(f"Error: Player ID {player_id} not found in game state") +def get_current_user(): + auth_token = request.headers.get('Authorization') + if auth_token: + user_id = decode_token(auth_token) + if user_id: + return users_collection.find_one({'_id': ObjectId(user_id)}) + return None + + def add_discord_role(user_id, role_id): url = f'https://discord.com/api/v10/guilds/{DISCORD_GUILD_ID}/members/{user_id}/roles/{role_id}' headers = { diff --git a/node_modules/.bin/tauri b/node_modules/.bin/tauri deleted file mode 100644 index 546529b..0000000 --- a/node_modules/.bin/tauri +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../@tauri-apps/cli/tauri.js" "$@" -else - exec node "$basedir/../@tauri-apps/cli/tauri.js" "$@" -fi diff --git a/node_modules/.bin/tauri.cmd b/node_modules/.bin/tauri.cmd deleted file mode 100644 index 534b08c..0000000 --- a/node_modules/.bin/tauri.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@tauri-apps\cli\tauri.js" %* diff --git a/node_modules/.bin/tauri.ps1 b/node_modules/.bin/tauri.ps1 deleted file mode 100644 index 01b0ad7..0000000 --- a/node_modules/.bin/tauri.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../@tauri-apps/cli/tauri.js" $args - } else { - & "$basedir/node$exe" "$basedir/../@tauri-apps/cli/tauri.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../@tauri-apps/cli/tauri.js" $args - } else { - & "node$exe" "$basedir/../@tauri-apps/cli/tauri.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index 0d392b0..0000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "resonancerumble", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@tauri-apps/cli": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.6.0.tgz", - "integrity": "sha512-DBBpBl6GhTzm8ImMbKkfaZ4fDTykWrC7Q5OXP4XqD91recmDEn2LExuvuiiS3HYe7uP8Eb5B9NPHhqJb+Zo7qQ==", - "dev": true, - "bin": { - "tauri": "tauri.js" - }, - "engines": { - "node": ">= 10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/tauri" - }, - "optionalDependencies": { - "@tauri-apps/cli-darwin-arm64": "1.6.0", - "@tauri-apps/cli-darwin-x64": "1.6.0", - "@tauri-apps/cli-linux-arm-gnueabihf": "1.6.0", - "@tauri-apps/cli-linux-arm64-gnu": "1.6.0", - "@tauri-apps/cli-linux-arm64-musl": "1.6.0", - "@tauri-apps/cli-linux-x64-gnu": "1.6.0", - "@tauri-apps/cli-linux-x64-musl": "1.6.0", - "@tauri-apps/cli-win32-arm64-msvc": "1.6.0", - "@tauri-apps/cli-win32-ia32-msvc": "1.6.0", - "@tauri-apps/cli-win32-x64-msvc": "1.6.0" - } - }, - "node_modules/@tauri-apps/cli-win32-x64-msvc": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.6.0.tgz", - "integrity": "sha512-h54FHOvGi7+LIfRchzgZYSCHB1HDlP599vWXQQJ/XnwJY+6Rwr2E5bOe/EhqoG8rbGkfK0xX3KPAvXPbUlmggg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - } - } -} diff --git a/node_modules/@tauri-apps/cli-win32-x64-msvc/README.md b/node_modules/@tauri-apps/cli-win32-x64-msvc/README.md deleted file mode 100644 index c22490b..0000000 --- a/node_modules/@tauri-apps/cli-win32-x64-msvc/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@tauri-apps/cli-win32-x64-msvc` - -This is the **x86_64-pc-windows-msvc** binary for `@tauri-apps/cli` diff --git a/node_modules/@tauri-apps/cli-win32-x64-msvc/cli.win32-x64-msvc.node b/node_modules/@tauri-apps/cli-win32-x64-msvc/cli.win32-x64-msvc.node deleted file mode 100644 index 2648200..0000000 Binary files a/node_modules/@tauri-apps/cli-win32-x64-msvc/cli.win32-x64-msvc.node and /dev/null differ diff --git a/node_modules/@tauri-apps/cli/CHANGELOG.md b/node_modules/@tauri-apps/cli/CHANGELOG.md deleted file mode 100644 index 21bd81c..0000000 --- a/node_modules/@tauri-apps/cli/CHANGELOG.md +++ /dev/null @@ -1,545 +0,0 @@ -# Changelog - -## \[1.6.0] - -### New Features - -- [`253595a22`](https://www.github.com/tauri-apps/tauri/commit/253595a22d8659a1cb199bfc423e988ea82191e6) ([#9809](https://www.github.com/tauri-apps/tauri/pull/9809)) Add RPM packaging -- [`a301be52d`](https://www.github.com/tauri-apps/tauri/commit/a301be52d276f1e99316d23b4f0a8e458e29bc35) ([#9914](https://www.github.com/tauri-apps/tauri/pull/9914)) Use cargo's target directory to store and cache bundling tools when `bundle > useLocalToolsDir` option is active. - -### Bug Fixes - -- [`08f57efef`](https://www.github.com/tauri-apps/tauri/commit/08f57efefdd6dac10277bfc5f71eba0ca84a64c4) ([#10136](https://www.github.com/tauri-apps/tauri/pull/10136)) Fix parsing of cargo profile when using `--profile=` syntax. -- [`674accad7`](https://www.github.com/tauri-apps/tauri/commit/674accad75fccac6f9adc515a863f9d59efbee57) ([#10015](https://www.github.com/tauri-apps/tauri/pull/10015)) Add missing dependency `libayatana-appindicator3.so.1` for rpm package. - -### Dependencies - -- Upgraded to `tauri-cli@1.6.0` - -## \[1.5.14] - -### Dependencies - -- Upgraded to `tauri-cli@1.5.14` - -## \[1.5.13] - -### Dependencies - -- Upgraded to `tauri-cli@1.5.13` - -## \[1.5.12] - -### Bug Fixes - -- [`1675e41f0`](https://www.github.com/tauri-apps/tauri/commit/1675e41f05c77d517890f59fddcf536744e6a0ad)([#9481](https://www.github.com/tauri-apps/tauri/pull/9481)) Fixed an issue with the CLI renaming the main executable in kebab-case when building for Windows on a non-Windows system which caused the bundler step to fail. -- [`9dd67abd9`](https://www.github.com/tauri-apps/tauri/commit/9dd67abd93e96097fc169404b70e729e46c3cd64)([#9298](https://www.github.com/tauri-apps/tauri/pull/9298)) Upgrade `heck` to v0.5 to better support Chinese and Japanese product name, because Chinese do not have word separation. -- [`f9638b631`](https://www.github.com/tauri-apps/tauri/commit/f9638b6315668ced871f242224f001f474262f85)([#9491](https://www.github.com/tauri-apps/tauri/pull/9491)) Fixed an issue that caused the CLI to rename app binaries incorrectly if the product name contained a `.` which resulted in the bundling step to fail. -- [`77cc49ac3`](https://www.github.com/tauri-apps/tauri/commit/77cc49ac3cd27368b3be4f67e35ae021acee4c92)([#9188](https://www.github.com/tauri-apps/tauri/pull/9188)) Fixed an issue causing the `build.runner` and `build.features` configs to not take effect. -- [`aeddc40b9`](https://www.github.com/tauri-apps/tauri/commit/aeddc40b9e461bc118382ae62431d39e29f25915)([#9411](https://www.github.com/tauri-apps/tauri/pull/9411)) Fix `tauri info` crashing when Node.js is not installed. - -### Dependencies - -- Upgraded to `tauri-cli@1.5.12` - -## \[1.5.11] - -### Bug Fixes - -- [`b15948b11`](https://www.github.com/tauri-apps/tauri/commit/b15948b11c0e362eea7ef57a4606f15f7dbd886b)([#8903](https://www.github.com/tauri-apps/tauri/pull/8903)) Fix `.taurignore` failing to ignore in some cases. - -### Dependencies - -- Upgraded to `tauri-cli@1.5.11` - -## \[1.5.10] - -### Bug Fixes - -- [`b0f27814`](https://www.github.com/tauri-apps/tauri/commit/b0f27814b90ded2f1ed44b7852080eedbff0d9e4)([#8776](https://www.github.com/tauri-apps/tauri/pull/8776)) Fix `fail to rename app` when using `--profile dev`. -- [`0bff8c32`](https://www.github.com/tauri-apps/tauri/commit/0bff8c325d004fdead2023f58e0f5fd73a9c22ba)([#8697](https://www.github.com/tauri-apps/tauri/pull/8697)) Fix the built-in dev server failing to serve files when URL had queries `?` and other url components. -- [`67d7877f`](https://www.github.com/tauri-apps/tauri/commit/67d7877f27f265c133a70d48a46c83ffff31d571)([#8520](https://www.github.com/tauri-apps/tauri/pull/8520)) The cli now also watches cargo workspace members if the tauri folder is the workspace root. - -### Dependencies - -- Upgraded to `tauri-cli@1.5.10` - -## \[1.5.9] - -### Bug Fixes - -- [`0a2175ea`](https://www.github.com/tauri-apps/tauri/commit/0a2175eabb736b2a4cd01ab682e08be0b5ebb2b9)([#8439](https://www.github.com/tauri-apps/tauri/pull/8439)) Expand glob patterns in workspace member paths so the CLI would watch all matching pathhs. - -### Dependencies - -- Upgraded to `tauri-cli@1.5.9` - -## \[1.5.8] - -### Dependencies - -- Upgraded to `tauri-cli@1.5.8` - -## \[1.5.7] - -### Bug Fixes - -- [`1d5aa38a`](https://www.github.com/tauri-apps/tauri/commit/1d5aa38ae418ea31f593590b6d32cf04d3bfd8c1)([#8162](https://www.github.com/tauri-apps/tauri/pull/8162)) Fixes errors on command output, occuring when the output stream contains an invalid UTF-8 character, or ends with a multi-bytes UTF-8 character. -- [`f26d9f08`](https://www.github.com/tauri-apps/tauri/commit/f26d9f0884f63f61b9f4d4fac15e6b251163793e)([#8263](https://www.github.com/tauri-apps/tauri/pull/8263)) Fixes an issue in the NSIS installer which caused the uninstallation to leave empty folders on the system if the `resources` feature was used. -- [`92bc7d0e`](https://www.github.com/tauri-apps/tauri/commit/92bc7d0e16157434330a1bcf1eefda6f0f1e5f85)([#8233](https://www.github.com/tauri-apps/tauri/pull/8233)) Fixes an issue in the NSIS installer which caused the installation to take much longer than expected when many `resources` were added to the bundle. - -### Dependencies - -- Upgraded to `tauri-cli@1.5.7` - -## \[1.5.6] - -### Bug Fixes - -- [`5264e41d`](https://www.github.com/tauri-apps/tauri/commit/5264e41db3763e4c2eb0c3c21bd423fb7bece3e2)([#8082](https://www.github.com/tauri-apps/tauri/pull/8082)) Downgraded `rust-minisign` to `0.7.3` to fix signing updater bundles with empty passwords. - -### Dependencies - -- Upgraded to `tauri-cli@1.5.6` - -## \[1.5.5] - -### Enhancements - -- [`9bead42d`](https://www.github.com/tauri-apps/tauri/commit/9bead42dbca0fb6dd7ea0b6bfb2f2308a5c5f992)([#8059](https://www.github.com/tauri-apps/tauri/pull/8059)) Allow rotating the updater private key. - -### Bug Fixes - -- [`be8e5aa3`](https://www.github.com/tauri-apps/tauri/commit/be8e5aa3071d9bc5d0bd24647e8168f312d11c8d)([#8042](https://www.github.com/tauri-apps/tauri/pull/8042)) Fixes duplicated newlines on command outputs. - -### Dependencies - -- Upgraded to `tauri-cli@1.5.5` - -## \[1.5.4] - -### Dependencies - -- Upgraded to `tauri-cli@1.5.4` - -## \[1.5.3] - -### Dependencies - -- Upgraded to `tauri-cli@1.5.3` - -## \[1.5.2] - -### Dependencies - -- Upgraded to `tauri-cli@1.5.2` - -## \[1.5.1] - -### Bug Fixes - -- [`d6eb46cf`](https://www.github.com/tauri-apps/tauri/commit/d6eb46cf1116d147121f6b6db9d390b5e2fb238d)([#7934](https://www.github.com/tauri-apps/tauri/pull/7934)) On macOS, fix the `apple-id` option name when using `notarytools submit`. - -### Dependencies - -- Upgraded to `tauri-cli@1.5.1` - -## \[1.5.0] - -### New Features - -- [`e1526626`](https://www.github.com/tauri-apps/tauri/commit/e152662687ece7a62d383923a50751cc0dd34331)([#7723](https://www.github.com/tauri-apps/tauri/pull/7723)) Support Bun package manager in CLI - -### Enhancements - -- [`13279917`](https://www.github.com/tauri-apps/tauri/commit/13279917d4cae071d0ce3a686184d48af079f58a)([#7713](https://www.github.com/tauri-apps/tauri/pull/7713)) Add version of Rust Tauri CLI installed with Cargo to `tauri info` command. - -### Bug Fixes - -- [`dad4f54e`](https://www.github.com/tauri-apps/tauri/commit/dad4f54eec9773d2ea6233a7d9fd218741173823)([#7277](https://www.github.com/tauri-apps/tauri/pull/7277)) Removed the automatic version check of the CLI that ran after `tauri` commands which caused various issues. - -### Dependencies - -- Upgraded to `tauri-cli@1.5.0` - -## \[1.4.0] - -### New Features - -- [`0ddbb3a1`](https://www.github.com/tauri-apps/tauri/commit/0ddbb3a1dc1961ba5c6c1a60081513c1380c8af1)([#7015](https://www.github.com/tauri-apps/tauri/pull/7015)) Provide prebuilt CLIs for Windows ARM64 targets. -- [`35cd751a`](https://www.github.com/tauri-apps/tauri/commit/35cd751adc6fef1f792696fa0cfb471b0bf99374)([#5176](https://www.github.com/tauri-apps/tauri/pull/5176)) Added the `desktop_template` option on `tauri.conf.json > tauri > bundle > deb`. -- [`6c5ade08`](https://www.github.com/tauri-apps/tauri/commit/6c5ade08d97844bb685789d30e589400bbe3e04c)([#4537](https://www.github.com/tauri-apps/tauri/pull/4537)) Added `tauri completions` to generate shell completions scripts. -- [`e092f799`](https://www.github.com/tauri-apps/tauri/commit/e092f799469ff32c7d1595d0f07d06fd2dab5c29)([#6887](https://www.github.com/tauri-apps/tauri/pull/6887)) Add `nsis > template` option to specify custom NSIS installer template. - -### Enhancements - -- [`d75c1b82`](https://www.github.com/tauri-apps/tauri/commit/d75c1b829bd96d9e3a672bcc79120597d5ada4a0)([#7181](https://www.github.com/tauri-apps/tauri/pull/7181)) Print a useful error when `updater` bundle target is specified without an updater-enabled target. -- [`52474e47`](https://www.github.com/tauri-apps/tauri/commit/52474e479d695865299d8c8d868fb98b99731020)([#7141](https://www.github.com/tauri-apps/tauri/pull/7141)) Enhance injection of Cargo features. -- [`2659ca1a`](https://www.github.com/tauri-apps/tauri/commit/2659ca1ab4799a5bda65c229c149e98bd01eb1ee)([#6900](https://www.github.com/tauri-apps/tauri/pull/6900)) Add `rustls` as default Cargo feature. - -### Bug Fixes - -- [`3cb7a3e6`](https://www.github.com/tauri-apps/tauri/commit/3cb7a3e642bb10ee90dc1d24daa48b8c8c15c9ce)([#6997](https://www.github.com/tauri-apps/tauri/pull/6997)) Fix built-in devserver adding hot-reload code to non-html files. -- [`fb7ef8da`](https://www.github.com/tauri-apps/tauri/commit/fb7ef8dacd9ade96976c84d22507782cdaf38acf)([#6667](https://www.github.com/tauri-apps/tauri/pull/6667)) Fix nodejs binary regex when `0` is in the version name, for example `node-20` -- [`1253bbf7`](https://www.github.com/tauri-apps/tauri/commit/1253bbf7ae11a87887e0b3bd98cc26dbb98c8130)([#7013](https://www.github.com/tauri-apps/tauri/pull/7013)) Fixes Cargo.toml feature rewriting. - -## \[1.3.1] - -- Correctly escape XML for resource files in WiX bundler. - - Bumped due to a bump in tauri-bundler. - - Bumped due to a bump in cli.rs. - - [6a6b1388](https://www.github.com/tauri-apps/tauri/commit/6a6b1388ea5787aea4c0e0b0701a4772087bbc0f) fix(bundler): correctly escape resource xml, fixes [#6853](https://www.github.com/tauri-apps/tauri/pull/6853) ([#6855](https://www.github.com/tauri-apps/tauri/pull/6855)) on 2023-05-04 - -- Added the following languages to the NSIS bundler: - -- `Spanish` - -- `SpanishInternational` - -- Bumped due to a bump in tauri-bundler. - - Bumped due to a bump in cli.rs. - -- [422b4817](https://www.github.com/tauri-apps/tauri/commit/422b48179856504e980a156500afa8e22c44d357) Add Spanish and SpanishInternational languages ([#6871](https://www.github.com/tauri-apps/tauri/pull/6871)) on 2023-05-06 - -- Correctly escape arguments in NSIS script to fix bundling apps that use non-default WebView2 install modes. - - Bumped due to a bump in tauri-bundler. - - Bumped due to a bump in cli.rs. - - [2915bd06](https://www.github.com/tauri-apps/tauri/commit/2915bd068ed40dc01a363b69212c6b6f2d3ec01e) fix(bundler): Fix webview install modes in NSIS bundler ([#6854](https://www.github.com/tauri-apps/tauri/pull/6854)) on 2023-05-04 - -## \[1.3.0] - -- Add `--ci` flag and respect the `CI` environment variable on the `signer generate` command. In this case the default password will be an empty string and the CLI will not prompt for a value. - - [8fb1df8a](https://www.github.com/tauri-apps/tauri/commit/8fb1df8aa65a52cdb4a7e1bb9dda9b912a7a2895) feat(cli): add `--ci` flag to `signer generate`, closes [#6089](https://www.github.com/tauri-apps/tauri/pull/6089) ([#6097](https://www.github.com/tauri-apps/tauri/pull/6097)) on 2023-01-19 -- Fix Outdated Github Actions in the Plugin Templates `with-api` and `backend` - - [a926b49a](https://www.github.com/tauri-apps/tauri/commit/a926b49a01925ca757d391994bfac3beea29599b) Fix Github Actions of Tauri Plugin with-api template ([#6603](https://www.github.com/tauri-apps/tauri/pull/6603)) on 2023-04-03 -- Do not crash on Cargo.toml watcher. - - [e8014a7f](https://www.github.com/tauri-apps/tauri/commit/e8014a7f612a1094461ddad63aacc498a2682ff5) fix(cli): do not crash on watcher ([#6303](https://www.github.com/tauri-apps/tauri/pull/6303)) on 2023-02-17 -- Fix crash when nodejs binary has the version in its name, for example `node-18` - - [1c8229fb](https://www.github.com/tauri-apps/tauri/commit/1c8229fbe273554c0c97cccee45d5967f5df1b9f) fix(cli.js): detect `node-` binary, closes [#6427](https://www.github.com/tauri-apps/tauri/pull/6427) ([#6432](https://www.github.com/tauri-apps/tauri/pull/6432)) on 2023-03-16 -- Add `--png` option for the `icon` command to generate custom icon sizes. - - [9d214412](https://www.github.com/tauri-apps/tauri/commit/9d2144128fc5fad67d8404bce95f82297ebb0e4a) feat(cli): add option to make custom icon sizes, closes [#5121](https://www.github.com/tauri-apps/tauri/pull/5121) ([#5246](https://www.github.com/tauri-apps/tauri/pull/5246)) on 2022-12-27 -- Skip the password prompt on the build command when `TAURI_KEY_PASSWORD` environment variable is empty and the `--ci` argument is provided or the `CI` environment variable is set. - - [d4f89af1](https://www.github.com/tauri-apps/tauri/commit/d4f89af18d69fd95a4d8a1ede8442547c6a6d0ee) feat: skip password prompt on the build command if CI is set fixes [#6089](https://www.github.com/tauri-apps/tauri/pull/6089) on 2023-01-18 -- Fix `default-run` not deserialized. - - [57c6bf07](https://www.github.com/tauri-apps/tauri/commit/57c6bf07bb380847abdf27c3fff9891d99c1c98c) fix(cli): fix default-run not deserialized ([#6584](https://www.github.com/tauri-apps/tauri/pull/6584)) on 2023-03-30 -- Fixes HTML serialization removing template tags on the dev server. - - [314f0e21](https://www.github.com/tauri-apps/tauri/commit/314f0e212fd2b9e452bfe3424cdce2b0bf37b5d7) fix(cli): web_dev_server html template serialization (fix [#6165](https://www.github.com/tauri-apps/tauri/pull/6165)) ([#6166](https://www.github.com/tauri-apps/tauri/pull/6166)) on 2023-01-29 -- Use escaping on Handlebars templates. - - [6d6b6e65](https://www.github.com/tauri-apps/tauri/commit/6d6b6e653ea70fc02794f723092cdc860995c259) feat: configure escaping on handlebars templates ([#6678](https://www.github.com/tauri-apps/tauri/pull/6678)) on 2023-05-02 -- Add initial support for building `nsis` bundles on non-Windows platforms. - - [60e6f6c3](https://www.github.com/tauri-apps/tauri/commit/60e6f6c3f1605f3064b5bb177992530ff788ccf0) feat(bundler): Add support for creating NSIS bundles on unix hosts ([#5788](https://www.github.com/tauri-apps/tauri/pull/5788)) on 2023-01-19 -- Add `nsis` bundle target - - [c94e1326](https://www.github.com/tauri-apps/tauri/commit/c94e1326a7c0767a13128a8b1d327a00156ece12) feat(bundler): add `nsis`, closes [#4450](https://www.github.com/tauri-apps/tauri/pull/4450), closes [#2319](https://www.github.com/tauri-apps/tauri/pull/2319) ([#4674](https://www.github.com/tauri-apps/tauri/pull/4674)) on 2023-01-03 -- Remove default features from Cargo.toml template. - - [b08ae637](https://www.github.com/tauri-apps/tauri/commit/b08ae637a0f58b38cbce9b8a1fa0b6c5dc0cfd05) fix(cli): remove default features from template ([#6074](https://www.github.com/tauri-apps/tauri/pull/6074)) on 2023-01-17 -- Use Ubuntu 20.04 to compile the CLI, increasing the minimum libc version required. - -## \[1.2.3] - -- Pin `ignore` to `=0.4.18`. - - [adcb082b](https://www.github.com/tauri-apps/tauri/commit/adcb082b1651ecb2a6208b093e12f4185aa3fc98) chore(deps): pin `ignore` to =0.4.18 on 2023-01-17 - -## \[1.2.2] - -- Detect SvelteKit and Vite for the init and info commands. - - [9d872ab8](https://www.github.com/tauri-apps/tauri/commit/9d872ab8728b1b121909af434adcd5936e5afb7d) feat(cli): detect SvelteKit and Vite ([#5742](https://www.github.com/tauri-apps/tauri/pull/5742)) on 2022-12-02 -- Detect SolidJS and SolidStart for the init and info commands. - - [9e7ce0a8](https://www.github.com/tauri-apps/tauri/commit/9e7ce0a8eef4bf3536645976e3e09162fbf772ab) feat(cli): detect SolidJS and SolidStart ([#5758](https://www.github.com/tauri-apps/tauri/pull/5758)) on 2022-12-08 -- Use older icon types to work around a macOS bug resulting in corrupted 16x16px and 32x32px icons in bundled apps. - - [2d545eff](https://www.github.com/tauri-apps/tauri/commit/2d545eff58734ec70f23f11a429d35435cdf090e) fix(cli): corrupted icons in bundled macOS icons ([#5698](https://www.github.com/tauri-apps/tauri/pull/5698)) on 2022-11-28 - -## \[1.2.1] - -- Fixes injection of Cargo features defined in the configuration file. - - [1ecaeb29](https://www.github.com/tauri-apps/tauri/commit/1ecaeb29aa798f591f6488dc6c3a7a8d22f6073e) fix(cli): inject config feature flags when features arg is not provided on 2022-11-18 - -## \[1.2.0] - -- Detect JSON5 and TOML configuration files in the dev watcher. - - [e7ccbd85](https://www.github.com/tauri-apps/tauri/commit/e7ccbd8573f6b9124e80c0b67fa2365729c3c196) feat(cli): detect JSON5 and TOML configuration files in the dev watcher ([#5439](https://www.github.com/tauri-apps/tauri/pull/5439)) on 2022-10-19 -- Log dev watcher file change detection. - - [9076d5d2](https://www.github.com/tauri-apps/tauri/commit/9076d5d2e76d432aef475ba403e9ab5bd3b9d2b0) feat(cli): add prompt information when file changing detected, closes [#5417](https://www.github.com/tauri-apps/tauri/pull/5417) ([#5428](https://www.github.com/tauri-apps/tauri/pull/5428)) on 2022-10-19 -- Fix crash when nodejs binary has the version in its name, for example `node18` or when running through deno. - - [7a231cd1](https://www.github.com/tauri-apps/tauri/commit/7a231cd1c99101f63354b13bb36223568d2f0a11) fix(cli): detect deno ([#5475](https://www.github.com/tauri-apps/tauri/pull/5475)) on 2022-10-28 -- Changed the project template to not enable all APIs by default. - - [582c25a0](https://www.github.com/tauri-apps/tauri/commit/582c25a0f0fa2725d786ec4edd0defe7811ad6e8) refactor(cli): disable api-all on templates ([#5538](https://www.github.com/tauri-apps/tauri/pull/5538)) on 2022-11-03 - -## \[1.1.1] - -- Fix wrong cli metadata that caused new projects (created through `tauri init`) fail to build - - [db26aaf2](https://www.github.com/tauri-apps/tauri/commit/db26aaf2b44ce5335c9223c571ef2b2175e0cd6d) fix: fix wrong cli metadata ([#5214](https://www.github.com/tauri-apps/tauri/pull/5214)) on 2022-09-16 - -## \[1.1.0] - -- Allow adding `build > beforeBundleCommand` in tauri.conf.json to run a shell command before the bundling phase. - - [57ab9847](https://www.github.com/tauri-apps/tauri/commit/57ab9847eb2d8c9a5da584b873b7c072e9ee26bf) feat(cli): add `beforeBundleCommand`, closes [#4879](https://www.github.com/tauri-apps/tauri/pull/4879) ([#4893](https://www.github.com/tauri-apps/tauri/pull/4893)) on 2022-08-09 -- Change `before_dev_command` and `before_build_command` config value to allow configuring the current working directory. - - [d6f7d3cf](https://www.github.com/tauri-apps/tauri/commit/d6f7d3cfe8a7ec8d68c8341016c4e0a3103da587) Add cwd option to `before` commands, add wait option to dev [#4740](https://www.github.com/tauri-apps/tauri/pull/4740) [#3551](https://www.github.com/tauri-apps/tauri/pull/3551) ([#4834](https://www.github.com/tauri-apps/tauri/pull/4834)) on 2022-08-02 -- Allow configuring the `before_dev_command` to force the CLI to wait for the command to finish before proceeding. - - [d6f7d3cf](https://www.github.com/tauri-apps/tauri/commit/d6f7d3cfe8a7ec8d68c8341016c4e0a3103da587) Add cwd option to `before` commands, add wait option to dev [#4740](https://www.github.com/tauri-apps/tauri/pull/4740) [#3551](https://www.github.com/tauri-apps/tauri/pull/3551) ([#4834](https://www.github.com/tauri-apps/tauri/pull/4834)) on 2022-08-02 -- Check if the default build target is set in the Cargo configuration. - - [436f3d8d](https://www.github.com/tauri-apps/tauri/commit/436f3d8d66727f5b64165522f0b55f4ab54bd1ae) feat(cli): load Cargo configuration to check default build target ([#4990](https://www.github.com/tauri-apps/tauri/pull/4990)) on 2022-08-21 -- Use `cargo metadata` to detect the workspace root and target directory. - - [fea70eff](https://www.github.com/tauri-apps/tauri/commit/fea70effad219c0794d919f8834fa1a1ffd204c7) refactor(cli): Use `cargo metadata` to detect the workspace root and target directory, closes [#4632](https://www.github.com/tauri-apps/tauri/pull/4632), [#4928](https://www.github.com/tauri-apps/tauri/pull/4928). ([#4932](https://www.github.com/tauri-apps/tauri/pull/4932)) on 2022-08-21 -- Prompt for `beforeDevCommand` and `beforeBuildCommand` in `tauri init`. - - [6d4945c9](https://www.github.com/tauri-apps/tauri/commit/6d4945c9f06cd1f7018e1c48686ba682aae817df) feat(cli): prompt for before\*Command, closes [#4691](https://www.github.com/tauri-apps/tauri/pull/4691) ([#4721](https://www.github.com/tauri-apps/tauri/pull/4721)) on 2022-07-25 -- Added support to configuration files in TOML format (Tauri.toml file). - - [ae83d008](https://www.github.com/tauri-apps/tauri/commit/ae83d008f9e1b89bfc8dddaca42aa5c1fbc36f6d) feat: add support to TOML config file `Tauri.toml`, closes [#4806](https://www.github.com/tauri-apps/tauri/pull/4806) ([#4813](https://www.github.com/tauri-apps/tauri/pull/4813)) on 2022-08-02 -- Automatically use any `.taurignore` file as ignore rules for dev watcher and app path finder. - - [596fa08d](https://www.github.com/tauri-apps/tauri/commit/596fa08d48e371c7bd29e1ef799119ac8fca0d0b) feat(cli): automatically use `.taurignore`, ref [#4617](https://www.github.com/tauri-apps/tauri/pull/4617) ([#4623](https://www.github.com/tauri-apps/tauri/pull/4623)) on 2022-07-28 -- Enable WiX FIPS compliance when the `TAURI_FIPS_COMPLIANT` environment variable is set to `true`. - - [d88b9de7](https://www.github.com/tauri-apps/tauri/commit/d88b9de7aaeaaa2e42e4795dbc2b8642b5ae7a50) feat(core): add `fips_compliant` wix config option, closes [#4541](https://www.github.com/tauri-apps/tauri/pull/4541) ([#4843](https://www.github.com/tauri-apps/tauri/pull/4843)) on 2022-08-04 -- Fixes dev watcher incorrectly exiting the CLI when sequential file updates are detected. - - [47fab680](https://www.github.com/tauri-apps/tauri/commit/47fab6809a1e23b3b9a84695e2d91ff0826ba79a) fix(cli): dev watcher incorrectly killing process on multiple file write ([#4684](https://www.github.com/tauri-apps/tauri/pull/4684)) on 2022-07-25 -- Add `libc` field to Node packages. - - [f7d2dfc7](https://www.github.com/tauri-apps/tauri/commit/f7d2dfc7a6d086dd1a218d6c1492b3fef8a64f03) chore: add libc field to node packages ([#4856](https://www.github.com/tauri-apps/tauri/pull/4856)) on 2022-08-04 -- Set the `MACOSX_DEPLOYMENT_TARGET` environment variable with the configuration `minimum_system_version` value. - - [fa23310f](https://www.github.com/tauri-apps/tauri/commit/fa23310f23cb9e6a02ec2524f1ef394a5b42990e) fix(cli): set MACOSX_DEPLOYMENT_TARGET env var, closes [#4704](https://www.github.com/tauri-apps/tauri/pull/4704) ([#4842](https://www.github.com/tauri-apps/tauri/pull/4842)) on 2022-08-02 -- Added `--no-watch` argument to the `dev` command to disable the file watcher. - - [0983d7ce](https://www.github.com/tauri-apps/tauri/commit/0983d7ce7f24ab43f9ae7b5e1177ff244d8885a8) feat(cli): add `--no-watch` argument to the dev command, closes [#4617](https://www.github.com/tauri-apps/tauri/pull/4617) ([#4793](https://www.github.com/tauri-apps/tauri/pull/4793)) on 2022-07-29 -- Validate updater signature matches configured public key. - - [b2a8930b](https://www.github.com/tauri-apps/tauri/commit/b2a8930b3c4b72c50ce72e73575f42c9cbe91bad) feat(cli): validate updater private key when signing ([#4754](https://www.github.com/tauri-apps/tauri/pull/4754)) on 2022-07-25 - -## \[1.0.5] - -- Correctly fill the architecture when building Debian packages targeting ARM64 (aarch64). - - Bumped due to a bump in cli.rs. - - [635f23b8](https://www.github.com/tauri-apps/tauri/commit/635f23b88adbb8726d628f67840709cd870836dc) fix(bundler): correctly set debian architecture for aarch64 ([#4700](https://www.github.com/tauri-apps/tauri/pull/4700)) on 2022-07-17 - -## \[1.0.4] - -- Do not capture and force colors of `cargo build` output. - - [c635a0da](https://www.github.com/tauri-apps/tauri/commit/c635a0dad437860d54109adffaf245b7c21bc684) refactor(cli): do not capture and force colors of cargo build output ([#4627](https://www.github.com/tauri-apps/tauri/pull/4627)) on 2022-07-12 -- Reduce the amount of allocations when converting cases. - - [bc370e32](https://www.github.com/tauri-apps/tauri/commit/bc370e326810446e15b1f50fb962b980114ba16b) feat: reduce the amount of `heck`-related allocations ([#4634](https://www.github.com/tauri-apps/tauri/pull/4634)) on 2022-07-11 - -## \[1.0.3] - -- Changed the app template to not set the default app menu as it is now set automatically on macOS which is the platform that needs a menu to function properly. - - [91055883](https://www.github.com/tauri-apps/tauri/commit/9105588373cc8401bd9ad79bdef26f509b2d76b7) feat: add implicit default menu for macOS only, closes [#4551](https://www.github.com/tauri-apps/tauri/pull/4551) ([#4570](https://www.github.com/tauri-apps/tauri/pull/4570)) on 2022-07-04 -- Improved bundle identifier validation showing the exact source of the configuration value. - - [8e3e7fc6](https://www.github.com/tauri-apps/tauri/commit/8e3e7fc64641afc7a6833bc93205e6f525562545) feat(cli): improve bundle identifier validation, closes [#4589](https://www.github.com/tauri-apps/tauri/pull/4589) ([#4596](https://www.github.com/tauri-apps/tauri/pull/4596)) on 2022-07-05 -- Improve configuration deserialization error messages. - - [9170c920](https://www.github.com/tauri-apps/tauri/commit/9170c9207044fa561535f624916dfdbaa41ff79d) feat(core): improve config deserialization error messages ([#4607](https://www.github.com/tauri-apps/tauri/pull/4607)) on 2022-07-06 -- Revert the `run` command to run in a separate thread. - - [f65eb4f8](https://www.github.com/tauri-apps/tauri/commit/f65eb4f84d8e511cd30d01d20a8223a297f7e584) fix(cli.js): revert `run` command to be nonblocking on 2022-07-04 -- Skip the static link of the `vcruntime140.dll` if the `STATIC_VCRUNTIME` environment variable is set to `false`. - - [2e61abaa](https://www.github.com/tauri-apps/tauri/commit/2e61abaa9ae5d7a41ca1fa6505b5d6c368625ce5) feat(cli): allow dynamic link vcruntime, closes [#4565](https://www.github.com/tauri-apps/tauri/pull/4565) ([#4601](https://www.github.com/tauri-apps/tauri/pull/4601)) on 2022-07-06 -- The `TAURI_CONFIG` environment variable now represents the configuration to be merged instead of the entire JSON. - - [fa028ebf](https://www.github.com/tauri-apps/tauri/commit/fa028ebf3c8ca7b43a70d283a01dbea86217594f) refactor: do not pass entire config from CLI to core, send patch instead ([#4598](https://www.github.com/tauri-apps/tauri/pull/4598)) on 2022-07-06 -- Watch for Cargo workspace members in the `dev` file watcher. - - [dbb8c87b](https://www.github.com/tauri-apps/tauri/commit/dbb8c87b96dec9942b1bf877b29bafb8246514d4) feat(cli): watch Cargo workspaces in the dev command, closes [#4222](https://www.github.com/tauri-apps/tauri/pull/4222) ([#4572](https://www.github.com/tauri-apps/tauri/pull/4572)) on 2022-07-03 - -## \[1.0.2] - -- Fixes a crash on the `signer sign` command. - - [8e808fec](https://www.github.com/tauri-apps/tauri/commit/8e808fece95f2e506acf2c446d37b9913fd67d50) fix(cli.rs): conflicts_with arg doesn't exist closes ([#4538](https://www.github.com/tauri-apps/tauri/pull/4538)) on 2022-06-30 - -## \[1.0.1] - -- No longer adds the `pkg-config` dependency to `.deb` packages when the `systemTray` is used. - This only works with recent versions of `libappindicator-sys` (including https://github.com/tauri-apps/libappindicator-rs/pull/38), - so a `cargo update` may be necessary if you create `.deb` bundles and use the tray feature. - - [0e6edeb1](https://www.github.com/tauri-apps/tauri/commit/0e6edeb14f379af1e02a7cebb4e3a5c9e87ebf7f) fix(cli): Don't add `pkg-config` to `deb` ([#4508](https://www.github.com/tauri-apps/tauri/pull/4508)) on 2022-06-29 -- AppImage bundling will now prefer bundling correctly named appindicator library (including `.1` version suffix). With a symlink for compatibility with the old naming. - - [bf45ca1d](https://www.github.com/tauri-apps/tauri/commit/bf45ca1df6691c05bdf72c5716cc01e89a7791d4) fix(cli,bundler): prefer AppImage libraries with ABI version ([#4505](https://www.github.com/tauri-apps/tauri/pull/4505)) on 2022-06-29 -- Improve error message when `cargo` is not installed. - - [e0e5f772](https://www.github.com/tauri-apps/tauri/commit/e0e5f772430f6349ec99ba891e601331e376e3c7) feat(cli): improve `cargo not found` error message, closes [#4428](https://www.github.com/tauri-apps/tauri/pull/4428) ([#4430](https://www.github.com/tauri-apps/tauri/pull/4430)) on 2022-06-21 -- The app template now only sets the default menu on macOS. - - [5105b428](https://www.github.com/tauri-apps/tauri/commit/5105b428c4726b2179cd4b3244350d1a1ee73734) feat(cli): change app template to only set default menu on macOS ([#4518](https://www.github.com/tauri-apps/tauri/pull/4518)) on 2022-06-29 -- Warn if updater is enabled but not in the bundle target list. - - [31c15cd2](https://www.github.com/tauri-apps/tauri/commit/31c15cd2bd94dbe39fb94982a15cbe02ac5d8925) docs(config): enhance documentation for bundle targets, closes [#3251](https://www.github.com/tauri-apps/tauri/pull/3251) ([#4418](https://www.github.com/tauri-apps/tauri/pull/4418)) on 2022-06-21 -- Check if target exists and is installed on dev and build commands. - - [13b8a240](https://www.github.com/tauri-apps/tauri/commit/13b8a2403d1353a8c3a643fbc6b6e862af68376e) feat(cli): validate target argument ([#4458](https://www.github.com/tauri-apps/tauri/pull/4458)) on 2022-06-24 -- Fixes the covector configuration on the plugin templates. - - [b8a64d01](https://www.github.com/tauri-apps/tauri/commit/b8a64d01bab11f955b7bbdf323d0afa1a3db4b64) fix(cli): add prepublish scripts to the plugin templates on 2022-06-19 -- Set the binary name to the product name in development. - - [b025b9f5](https://www.github.com/tauri-apps/tauri/commit/b025b9f581ac1a6ae0a26789c2be1e9928fb0282) refactor(cli): set binary name on dev ([#4447](https://www.github.com/tauri-apps/tauri/pull/4447)) on 2022-06-23 -- Allow registering a `.gitignore` file to skip watching some project files and directories via the `TAURI_DEV_WATCHER_IGNORE_FILE` environment variable. - - [83186dd8](https://www.github.com/tauri-apps/tauri/commit/83186dd89768407984db35fb67c3cc51f50ea8f5) Read extra ignore file for dev watcher, closes [#4406](https://www.github.com/tauri-apps/tauri/pull/4406) ([#4409](https://www.github.com/tauri-apps/tauri/pull/4409)) on 2022-06-20 -- Fix shebang for `kill-children.sh`. - - [35dd51db](https://www.github.com/tauri-apps/tauri/commit/35dd51db6826ec1eed7b90082b9eb6b2a699b627) fix(cli): add shebang for kill-children.sh, closes [#4262](https://www.github.com/tauri-apps/tauri/pull/4262) ([#4416](https://www.github.com/tauri-apps/tauri/pull/4416)) on 2022-06-22 -- Update plugin templates to use newer `tauri-apps/create-pull-request` GitHub action. - - [07f90795](https://www.github.com/tauri-apps/tauri/commit/07f9079532a42f3517d96faeaf46cad6176b31ac) chore(cli): update plugin template tauri-apps/create-pull-request on 2022-06-19 -- Use UNIX path separator on the init `$schema` field. - - [01053045](https://www.github.com/tauri-apps/tauri/commit/010530459ef62c48eed68ca965f2688accabcf69) chore(cli): use unix path separator on $schema ([#4384](https://www.github.com/tauri-apps/tauri/pull/4384)) on 2022-06-19 -- The `info` command now can check the Cargo lockfile on workspaces. - - [12f65219](https://www.github.com/tauri-apps/tauri/commit/12f65219ea75a51ebd38659ddce1563e015a036c) fix(cli): read lockfile from workspace on the info command, closes [#4232](https://www.github.com/tauri-apps/tauri/pull/4232) ([#4423](https://www.github.com/tauri-apps/tauri/pull/4423)) on 2022-06-21 -- Preserve the `Cargo.toml` formatting when the features array is not changed. - - [6650e5d6](https://www.github.com/tauri-apps/tauri/commit/6650e5d6720c215530ca1fdccd19bd2948dd6ca3) fix(cli): preserve Cargo manifest formatting when possible ([#4431](https://www.github.com/tauri-apps/tauri/pull/4431)) on 2022-06-21 -- Change the updater signature metadata to include the file name instead of its full path. - - [094b3eb3](https://www.github.com/tauri-apps/tauri/commit/094b3eb352bcf5de28414015e7c44290d619ea8c) fix(cli): file name instead of path on updater sig comment, closes [#4467](https://www.github.com/tauri-apps/tauri/pull/4467) ([#4484](https://www.github.com/tauri-apps/tauri/pull/4484)) on 2022-06-27 -- Validate bundle identifier as it must only contain alphanumeric characters, hyphens and periods. - - [0674a801](https://www.github.com/tauri-apps/tauri/commit/0674a80129d7c31bc93257849afc0a5069129fed) fix: assert config.bundle.identifier to be only alphanumeric, hyphens or dots. closes [#4359](https://www.github.com/tauri-apps/tauri/pull/4359) ([#4363](https://www.github.com/tauri-apps/tauri/pull/4363)) on 2022-06-17 - -## \[1.0.0] - -- Upgrade to `stable`! - - [f4bb30cc](https://www.github.com/tauri-apps/tauri/commit/f4bb30cc73d6ba9b9ef19ef004dc5e8e6bb901d3) feat(covector): prepare for v1 ([#4351](https://www.github.com/tauri-apps/tauri/pull/4351)) on 2022-06-15 - -## \[1.0.0-rc.16] - -- Use the default window menu in the app template. - - [4c4acc30](https://www.github.com/tauri-apps/tauri/commit/4c4acc3094218dd9cee0f1ad61810c979e0b41fa) feat: implement `Default` for `Menu`, closes [#2398](https://www.github.com/tauri-apps/tauri/pull/2398) ([#4291](https://www.github.com/tauri-apps/tauri/pull/4291)) on 2022-06-15 - -## \[1.0.0-rc.15] - -- Removed the tray icon from the Debian and AppImage bundles since they are embedded in the binary now. - - [4ce8e228](https://www.github.com/tauri-apps/tauri/commit/4ce8e228134cd3f22973b74ef26ca0d165fbbbd9) refactor(core): use `Icon` for tray icons ([#4342](https://www.github.com/tauri-apps/tauri/pull/4342)) on 2022-06-14 - -## \[1.0.0-rc.14] - -- Set the `TRAY_LIBRARY_PATH` environment variable to make the bundle copy the appindicator library to the AppImage. - - [34552444](https://www.github.com/tauri-apps/tauri/commit/3455244436578003a5fbb447b039e5c8971152ec) feat(cli): bundle appindicator library in the AppImage, closes [#3859](https://www.github.com/tauri-apps/tauri/pull/3859) ([#4267](https://www.github.com/tauri-apps/tauri/pull/4267)) on 2022-06-07 -- Set the `APPIMAGE_BUNDLE_GSTREAMER` environment variable to make the bundler copy additional gstreamer files to the AppImage. - - [d335fae9](https://www.github.com/tauri-apps/tauri/commit/d335fae92cdcbb0ee18aad4e54558914afa3e778) feat(bundler): bundle additional gstreamer files, closes [#4092](https://www.github.com/tauri-apps/tauri/pull/4092) ([#4271](https://www.github.com/tauri-apps/tauri/pull/4271)) on 2022-06-10 -- Configure the AppImage bundler to copy the `/usr/bin/xdg-open` binary if it exists and the shell `open` API is enabled. - - [2322ac11](https://www.github.com/tauri-apps/tauri/commit/2322ac11cf6290c6bf65413048a049c8072f863b) fix(bundler): bundle `/usr/bin/xdg-open` in appimage if open API enabled ([#4265](https://www.github.com/tauri-apps/tauri/pull/4265)) on 2022-06-04 -- Fixes multiple occurrences handling of the `bundles` and `features` arguments. - - [f685df39](https://www.github.com/tauri-apps/tauri/commit/f685df399a5a05480b6e4f5d92da71f3b87895ef) fix(cli): parsing of arguments with multiple values, closes [#4231](https://www.github.com/tauri-apps/tauri/pull/4231) ([#4233](https://www.github.com/tauri-apps/tauri/pull/4233)) on 2022-05-29 -- Log command output in real time instead of waiting for it to finish. - - [76d1eaae](https://www.github.com/tauri-apps/tauri/commit/76d1eaaebda5c8f6b0d41bf6587945e98cd441f3) feat(cli): debug command output in real time ([#4318](https://www.github.com/tauri-apps/tauri/pull/4318)) on 2022-06-12 -- Configure the `STATIC_VCRUNTIME` environment variable so `tauri-build` statically links it on the build command. - - [d703d27a](https://www.github.com/tauri-apps/tauri/commit/d703d27a707edc028f13b35603205da1133fcc2b) fix(build): statically link VC runtime only on `tauri build` ([#4292](https://www.github.com/tauri-apps/tauri/pull/4292)) on 2022-06-07 -- Use the `TAURI_TRAY` environment variable to determine which package should be added to the Debian `depends` section. Possible values are `ayatana` and `gtk`. - - [6216eb49](https://www.github.com/tauri-apps/tauri/commit/6216eb49e72863bfb6d4c9edb8827b21406ac393) refactor(core): drop `ayatana-tray` and `gtk-tray` Cargo features ([#4247](https://www.github.com/tauri-apps/tauri/pull/4247)) on 2022-06-02 - -## \[1.0.0-rc.13] - -- Check if `$CWD/src-tauri/tauri.conf.json` exists before walking through the file tree to find the tauri dir in case the whole project is gitignored. - - [bd8f3e29](https://www.github.com/tauri-apps/tauri/commit/bd8f3e298a0cb71809f2e93cc3ebc8e6e5b6a626) fix(cli): manual config lookup to handle gitignored folders, fixes [#3527](https://www.github.com/tauri-apps/tauri/pull/3527) ([#4224](https://www.github.com/tauri-apps/tauri/pull/4224)) on 2022-05-26 -- Statically link the Visual C++ runtime instead of using a merge module on the installer. - - [bb061509](https://www.github.com/tauri-apps/tauri/commit/bb061509fb674bef86ecbc1de3aa8f3e367a9907) refactor(core): statically link vcruntime, closes [#4122](https://www.github.com/tauri-apps/tauri/pull/4122) ([#4227](https://www.github.com/tauri-apps/tauri/pull/4227)) on 2022-05-27 - -## \[1.0.0-rc.12] - -- Properly fetch the NPM dependency information when using Yarn 2+. - - [cdfa6255](https://www.github.com/tauri-apps/tauri/commit/cdfa62551115586725bd3e4c04f12c5256f20790) fix(cli): properly read info when using yarn 2+, closes [#4106](https://www.github.com/tauri-apps/tauri/pull/4106) ([#4193](https://www.github.com/tauri-apps/tauri/pull/4193)) on 2022-05-23 - -## \[1.0.0-rc.11] - -- Allow configuring the display options for the MSI execution allowing quieter updates. - - [9f2c3413](https://www.github.com/tauri-apps/tauri/commit/9f2c34131952ea83c3f8e383bc3cec7e1450429f) feat(core): configure msiexec display options, closes [#3951](https://www.github.com/tauri-apps/tauri/pull/3951) ([#4061](https://www.github.com/tauri-apps/tauri/pull/4061)) on 2022-05-15 - -## \[1.0.0-rc.10] - -- Resolve binary file extension from target triple instead of compile-time checks to allow cross compilation. - - [4562e671](https://www.github.com/tauri-apps/tauri/commit/4562e671e4795e9386429348bf738f7078706945) fix(build): append .exe binary based on target triple instead of running OS, closes [#3870](https://www.github.com/tauri-apps/tauri/pull/3870) ([#4032](https://www.github.com/tauri-apps/tauri/pull/4032)) on 2022-05-03 -- Fixes text overflow on `tauri dev` on Windows. - - [094534d1](https://www.github.com/tauri-apps/tauri/commit/094534d138a9286e4746b61adff2da616e3b6a61) fix(cli): dev command stderr text overflow on Windows, closes [#3995](https://www.github.com/tauri-apps/tauri/pull/3995) ([#4000](https://www.github.com/tauri-apps/tauri/pull/4000)) on 2022-04-29 -- Improve CLI's logging output, making use of the standard rust `log` system. - - [35f21471](https://www.github.com/tauri-apps/tauri/commit/35f2147161e6697cbd2824681eeaf870b5a991c2) feat(cli): Improve CLI logging ([#4060](https://www.github.com/tauri-apps/tauri/pull/4060)) on 2022-05-07 -- Don't override the default keychain on macOS while code signing. - - [a4fcaf1d](https://www.github.com/tauri-apps/tauri/commit/a4fcaf1d04aafc3b4d42186f0fb386797d959a9d) fix: don't override default keychain, closes [#4008](https://www.github.com/tauri-apps/tauri/pull/4008) ([#4053](https://www.github.com/tauri-apps/tauri/pull/4053)) on 2022-05-05 -- - Remove startup delay in `tauri dev` caused by checking for a newer cli version. The check is now done upon process exit. -- Add `TAURI_SKIP_UPDATE_CHECK` env variable to skip checking for a newer CLI version. -- [bbabc8cd](https://www.github.com/tauri-apps/tauri/commit/bbabc8cd1ea2c1f6806610fd2d533c99305d320c) fix(cli.rs): remove startup delay in `tauri dev` ([#3999](https://www.github.com/tauri-apps/tauri/pull/3999)) on 2022-04-29 -- Fix `tauri info` panic when a package isn't installed. - - [4f0f3187](https://www.github.com/tauri-apps/tauri/commit/4f0f3187c9e69262ef28350331b368c831ab930a) fix(cli.rs): fix `tauri info` panic when a package isn't installed, closes [#3985](https://www.github.com/tauri-apps/tauri/pull/3985) ([#3996](https://www.github.com/tauri-apps/tauri/pull/3996)) on 2022-04-29 -- Added `$schema` support to `tauri.conf.json`. - - [715cbde3](https://www.github.com/tauri-apps/tauri/commit/715cbde3842a916c4ebeab2cab348e1774b5c192) feat(config): add `$schema` to `tauri.conf.json`, closes [#3464](https://www.github.com/tauri-apps/tauri/pull/3464) ([#4031](https://www.github.com/tauri-apps/tauri/pull/4031)) on 2022-05-03 -- **Breaking change:** The `dev` command now reads the custom config file from CWD instead of the Tauri folder. - - [a1929c6d](https://www.github.com/tauri-apps/tauri/commit/a1929c6dacccd00af4cdbcc4d29cfb98d8428f55) fix(cli): always read custom config file from CWD, closes [#4067](https://www.github.com/tauri-apps/tauri/pull/4067) ([#4074](https://www.github.com/tauri-apps/tauri/pull/4074)) on 2022-05-07 -- Fixes a Powershell crash when sending SIGINT to the dev command. - - [32048486](https://www.github.com/tauri-apps/tauri/commit/320484866b83ecabb01eb58d158e0fedd9dd08be) fix(cli): powershell crashing on SIGINT, closes [#3997](https://www.github.com/tauri-apps/tauri/pull/3997) ([#4007](https://www.github.com/tauri-apps/tauri/pull/4007)) on 2022-04-29 -- Prevent building when the bundle identifier is the default `com.tauri.dev`. - - [95726ebb](https://www.github.com/tauri-apps/tauri/commit/95726ebb6180d371be44bff9f16ca1eee049006a) feat(cli): prevent default bundle identifier from building, closes [#4041](https://www.github.com/tauri-apps/tauri/pull/4041) ([#4042](https://www.github.com/tauri-apps/tauri/pull/4042)) on 2022-05-04 - -## \[1.0.0-rc.9] - -- Exit CLI when Cargo returns a non-compilation error in `tauri dev`. - - [b5622882](https://www.github.com/tauri-apps/tauri/commit/b5622882cf3748e1e5a90915f415c0cd922aaaf8) fix(cli): exit on non-compilation Cargo errors, closes [#3930](https://www.github.com/tauri-apps/tauri/pull/3930) ([#3942](https://www.github.com/tauri-apps/tauri/pull/3942)) on 2022-04-22 -- Notify CLI update when running `tauri dev`. - - [a649aad7](https://www.github.com/tauri-apps/tauri/commit/a649aad7ad26d4578699370d6e63d80edeca1f97) feat(cli): check and notify about updates on `tauri dev`, closes [#3789](https://www.github.com/tauri-apps/tauri/pull/3789) ([#3960](https://www.github.com/tauri-apps/tauri/pull/3960)) on 2022-04-25 -- Kill the `beforeDevCommand` and app processes if the dev command returns an error. - - [485c9743](https://www.github.com/tauri-apps/tauri/commit/485c97438ac956d86bcf3794ceaa626bef968a4e) fix(cli): kill beforeDevCommand if dev code returns an error ([#3907](https://www.github.com/tauri-apps/tauri/pull/3907)) on 2022-04-19 -- Fix `info` command showing outdated text for latest versions. - - [73a4b74a](https://www.github.com/tauri-apps/tauri/commit/73a4b74aea8544e6fda51c1f6697630b0768072c) fix(cli.rs/info): don't show outdated text for latest versions ([#3829](https://www.github.com/tauri-apps/tauri/pull/3829)) on 2022-04-02 -- **Breaking change:** Enable default Cargo features except `tauri/custom-protocol` on the dev command. - - [f2a30d8b](https://www.github.com/tauri-apps/tauri/commit/f2a30d8bc54fc3ba49e16f69a413eca5f61a9b1f) refactor(core): use ayatana appindicator by default, keep option to use gtk ([#3916](https://www.github.com/tauri-apps/tauri/pull/3916)) on 2022-04-19 -- Kill the `beforeDevCommand` process recursively on Unix. - - [e251e1b0](https://www.github.com/tauri-apps/tauri/commit/e251e1b0991d26ab10aea33cfb228f3e7f0f85b5) fix(cli): kill before dev command recursively on Unix, closes [#2794](https://www.github.com/tauri-apps/tauri/pull/2794) ([#3848](https://www.github.com/tauri-apps/tauri/pull/3848)) on 2022-04-03 - -## \[1.0.0-rc.8] - -- Allows the `tauri.conf.json` file to be git ignored on the path lookup function. - - [cc7c2d77](https://www.github.com/tauri-apps/tauri/commit/cc7c2d77da2e4a39ec2a97b080d41a719e6d0161) feat(cli): allow conf path to be gitignored, closes [#3636](https://www.github.com/tauri-apps/tauri/pull/3636) ([#3683](https://www.github.com/tauri-apps/tauri/pull/3683)) on 2022-03-13 -- Remove `minimumSystemVersion: null` from the application template configuration. - - [c81534eb](https://www.github.com/tauri-apps/tauri/commit/c81534ebd873c358e0346c7949aeb171803149a5) feat(cli): use default macOS minimum system version when it is empty ([#3658](https://www.github.com/tauri-apps/tauri/pull/3658)) on 2022-03-13 -- Improve readability of the `info` subcommand output. - - [49d2f13f](https://www.github.com/tauri-apps/tauri/commit/49d2f13fc07d763d5de9bf4b19d00c901776c11d) feat(cli): colorful cli ([#3635](https://www.github.com/tauri-apps/tauri/pull/3635)) on 2022-03-08 -- Fixes DMG bundling on macOS 12.3. - - [348a1ab5](https://www.github.com/tauri-apps/tauri/commit/348a1ab59d2697478a594016016f1fccbf1ac054) fix(bundler): DMG bundling on macOS 12.3 cannot use bless, closes [#3719](https://www.github.com/tauri-apps/tauri/pull/3719) ([#3721](https://www.github.com/tauri-apps/tauri/pull/3721)) on 2022-03-18 -- Fixes resources bundling on Windows when the path is on the root of the Tauri folder. - - [4c84559e](https://www.github.com/tauri-apps/tauri/commit/4c84559e1f3019e7aa2666b10a1a0bd97bb09d24) fix(cli): root resource bundling on Windows, closes [#3539](https://www.github.com/tauri-apps/tauri/pull/3539) ([#3685](https://www.github.com/tauri-apps/tauri/pull/3685)) on 2022-03-13 - -## \[1.0.0-rc.6] - -- Added `tsp` config option under `tauri > bundle > windows`, which enables Time-Stamp Protocol (RFC 3161) for the timestamping - server under code signing on Windows if set to `true`. - - [bdd5f7c2](https://www.github.com/tauri-apps/tauri/commit/bdd5f7c2f03af4af8b60a9527e55bb18525d989b) fix: add support for Time-Stamping Protocol for Windows codesigning (fix [#3563](https://www.github.com/tauri-apps/tauri/pull/3563)) ([#3570](https://www.github.com/tauri-apps/tauri/pull/3570)) on 2022-03-07 -- Added `i686-pc-windows-msvc` to the prebuilt targets. - - [fb6744da](https://www.github.com/tauri-apps/tauri/commit/fb6744daa45165c7e00e5c01f7df0880d69ca509) feat(cli.js): add 32bit cli for windows ([#3540](https://www.github.com/tauri-apps/tauri/pull/3540)) on 2022-02-24 -- Change the `plugin init` templates to use the new `tauri::plugin::Builder` syntax. - - [f7acb061](https://www.github.com/tauri-apps/tauri/commit/f7acb061e4d1ecdbfe182793587632d7ba6d8eff) feat(cli): use plugin::Builder syntax on the plugin template ([#3606](https://www.github.com/tauri-apps/tauri/pull/3606)) on 2022-03-03 - -## \[1.0.0-rc.5] - -- Improve "waiting for your dev server to start" message. - - [5999379f](https://www.github.com/tauri-apps/tauri/commit/5999379fb06052a115f04f99274ab46d1eefd659) chore(cli): improve "waiting for dev server" message, closes [#3491](https://www.github.com/tauri-apps/tauri/pull/3491) ([#3504](https://www.github.com/tauri-apps/tauri/pull/3504)) on 2022-02-18 -- Do not panic if the updater private key password is wrong. - - [17f17a80](https://www.github.com/tauri-apps/tauri/commit/17f17a80f818bcc20c387583a6ff00a8e07ec533) fix(cli): do not panic if private key password is wrong, closes [#3449](https://www.github.com/tauri-apps/tauri/pull/3449) ([#3495](https://www.github.com/tauri-apps/tauri/pull/3495)) on 2022-02-17 -- Check the current folder before checking the directories on the app and tauri dir path lookup function. - - [a06de376](https://www.github.com/tauri-apps/tauri/commit/a06de3760184caa71acfe7a2fe2189a033b565f5) fix(cli): path lookup should not check subfolder before the current one ([#3465](https://www.github.com/tauri-apps/tauri/pull/3465)) on 2022-02-15 -- Fixes the signature of the `signer sign` command to not have duplicated short flags. - - [a9755514](https://www.github.com/tauri-apps/tauri/commit/a975551461f3698db3f3b6afa5101189aaeeada9) fix(cli): duplicated short flag for `signer sign`, closes [#3483](https://www.github.com/tauri-apps/tauri/pull/3483) ([#3492](https://www.github.com/tauri-apps/tauri/pull/3492)) on 2022-02-17 - -## \[1.0.0-rc.4] - -- Change the `run` function to take a callback and run asynchronously instead of blocking the event loop. - - [cd9a20b9](https://www.github.com/tauri-apps/tauri/commit/cd9a20b9ab013759b4bdb742f358988022450795) refactor(cli.js): run on separate thread ([#3436](https://www.github.com/tauri-apps/tauri/pull/3436)) on 2022-02-13 -- Improve error message when the dev runner command fails. - - [759d1afb](https://www.github.com/tauri-apps/tauri/commit/759d1afb86f3657f6071a2ae39c9be21e20ed22c) feat(cli): improve error message when dev runner command fails ([#3447](https://www.github.com/tauri-apps/tauri/pull/3447)) on 2022-02-13 -- Show full error message from `cli.rs` instead of just the outermost underlying error message. - - [63826010](https://www.github.com/tauri-apps/tauri/commit/63826010d1f38544f36afd3aac67c45d4608d15b) feat(cli.js): show full error message ([#3442](https://www.github.com/tauri-apps/tauri/pull/3442)) on 2022-02-13 -- Increase `tauri.conf.json` directory lookup depth to `3` and allow changing it with the `TAURI_PATH_DEPTH` environment variable. - - [c6031c70](https://www.github.com/tauri-apps/tauri/commit/c6031c7070c6bb7539bbfdfe42cb73012829c910) feat(cli): increase lookup depth, add env var option ([#3451](https://www.github.com/tauri-apps/tauri/pull/3451)) on 2022-02-13 -- Added `tauri-build`, `tao` and `wry` version to the `info` command output. - - [16f1173f](https://www.github.com/tauri-apps/tauri/commit/16f1173f456b1db543d0160df2c9828708bfc68a) feat(cli): add tao and wry version to the `info` output ([#3443](https://www.github.com/tauri-apps/tauri/pull/3443)) on 2022-02-13 - -## \[1.0.0-rc.3] - -- Change default value for the `freezePrototype` configuration to `false`. - - Bumped due to a bump in cli.rs. - - [3a4c0160](https://www.github.com/tauri-apps/tauri/commit/3a4c01606184be762adee055ddac803de0d28527) fix(core): change default `freezePrototype` to false, closes [#3416](https://www.github.com/tauri-apps/tauri/pull/3416) [#3406](https://www.github.com/tauri-apps/tauri/pull/3406) ([#3423](https://www.github.com/tauri-apps/tauri/pull/3423)) on 2022-02-12 - -## \[1.0.0-rc.2] - -- Fixes Tauri path resolution on projects without Git or a `.gitignore` file. - - [d8acbe11](https://www.github.com/tauri-apps/tauri/commit/d8acbe11492bd990e6983c7e63e0f1a8f1ea5c7c) fix(cli.rs): app path resolution on projects without git, closes [#3409](https://www.github.com/tauri-apps/tauri/pull/3409) ([#3410](https://www.github.com/tauri-apps/tauri/pull/3410)) on 2022-02-11 - -## \[1.0.0-rc.1] - -- Fix `init` command prompting for values even if the argument has been provided on the command line. - - [def76840](https://www.github.com/tauri-apps/tauri/commit/def76840257a1447723ecda13c807cf0c881f083) fix(cli.rs): do not prompt for `init` values if arg set ([#3400](https://www.github.com/tauri-apps/tauri/pull/3400)) on 2022-02-11 - - [41052dee](https://www.github.com/tauri-apps/tauri/commit/41052deeda2a00ee2b8ec2041c9c87c11de82ab2) fix(covector): add cli.js to change files on 2022-02-11 -- Fixes CLI freezing when running `light.exe` on Windows without the `--verbose` flag. - - [8beab636](https://www.github.com/tauri-apps/tauri/commit/8beab6363491e2a8757cc9fc0fa1eccc98ece916) fix(cli): build freezing on Windows, closes [#3399](https://www.github.com/tauri-apps/tauri/pull/3399) ([#3402](https://www.github.com/tauri-apps/tauri/pull/3402)) on 2022-02-11 -- Respect `.gitignore` configuration when looking for the folder with the `tauri.conf.json` file. - - [9c6c5a8c](https://www.github.com/tauri-apps/tauri/commit/9c6c5a8c52c6460d0b0a1a55300e1828262994ba) perf(cli.rs): improve performance of tauri dir lookup reading .gitignore ([#3405](https://www.github.com/tauri-apps/tauri/pull/3405)) on 2022-02-11 - - [41052dee](https://www.github.com/tauri-apps/tauri/commit/41052deeda2a00ee2b8ec2041c9c87c11de82ab2) fix(covector): add cli.js to change files on 2022-02-11 - -## \[1.0.0-rc.0] - -- Do not force Tauri application code on `src-tauri` folder and use a glob pattern to look for a subfolder with a `tauri.conf.json` file. - - [a8cff6b3](https://www.github.com/tauri-apps/tauri/commit/a8cff6b3bc3288a53d7cdc5b3cb95d371309d2d6) feat(cli): do not enforce `src-tauri` folder structure, closes [#2643](https://www.github.com/tauri-apps/tauri/pull/2643) ([#2654](https://www.github.com/tauri-apps/tauri/pull/2654)) on 2021-09-27 -- Added CommonJS output to the `dist` folder. - - [205b0dc8](https://www.github.com/tauri-apps/tauri/commit/205b0dc8f30bf70902979a2c0a08c8bc8c8e5360) feat(cli.js): add CommonJS dist files ([#2646](https://www.github.com/tauri-apps/tauri/pull/2646)) on 2021-09-23 -- Fixes `.ico` icon generation. - - [11db96e4](https://www.github.com/tauri-apps/tauri/commit/11db96e440e6cadc1c70992d07bfea3c448208b1) fix(cli.js): `.ico` icon generation, closes [#2692](https://www.github.com/tauri-apps/tauri/pull/2692) ([#2694](https://www.github.com/tauri-apps/tauri/pull/2694)) on 2021-10-02 -- Automatically unplug `@tauri-apps/cli` in yarn 2+ installations to fix the download of the rust-cli. - - [1e336b68](https://www.github.com/tauri-apps/tauri/commit/1e336b6872c3b78caf7c2c6e71e03016c6abdacf) fix(cli.js): Fix package installation on yarn 2+ ([#3012](https://www.github.com/tauri-apps/tauri/pull/3012)) on 2021-12-09 -- Read `package.json` and check for a `tauri` object containing the `appPath` string, which points to the tauri crate path. - - [fb2b9a52](https://www.github.com/tauri-apps/tauri/commit/fb2b9a52f594830c0a68ea40ea429a09892f7ba7) feat(cli.js): allow configuring tauri app path on package.json [#2752](https://www.github.com/tauri-apps/tauri/pull/2752) ([#3035](https://www.github.com/tauri-apps/tauri/pull/3035)) on 2021-12-09 -- Removed the `icon` command, now exposed as a separate package, see https://github.com/tauri-apps/tauricon. - - [58030172](https://www.github.com/tauri-apps/tauri/commit/58030172eddb2403a84b56a21b5bdcebca42c265) feat(tauricon): remove from cli ([#3293](https://www.github.com/tauri-apps/tauri/pull/3293)) on 2022-02-07 diff --git a/node_modules/@tauri-apps/cli/Cargo.toml b/node_modules/@tauri-apps/cli/Cargo.toml deleted file mode 100644 index 2af60d5..0000000 --- a/node_modules/@tauri-apps/cli/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] -edition = "2021" -name = "tauri-cli-node" -version = "0.0.0" - -[lib] -crate-type = ["cdylib"] - -[dependencies] -# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix -napi = { version = "2.14", default-features = false, features = ["napi4"] } -napi-derive = "2.14" -tauri-cli = { path = "..", default-features = false } -log = "0.4.20" - -[build-dependencies] -napi-build = "2.1" - -[features] -default = ["tauri-cli/default"] -native-tls = ["tauri-cli/native-tls"] -native-tls-vendored = ["tauri-cli/native-tls-vendored"] diff --git a/node_modules/@tauri-apps/cli/LICENSE_APACHE-2.0 b/node_modules/@tauri-apps/cli/LICENSE_APACHE-2.0 deleted file mode 100644 index f433b1a..0000000 --- a/node_modules/@tauri-apps/cli/LICENSE_APACHE-2.0 +++ /dev/null @@ -1,177 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/node_modules/@tauri-apps/cli/LICENSE_MIT b/node_modules/@tauri-apps/cli/LICENSE_MIT deleted file mode 100644 index b08530d..0000000 --- a/node_modules/@tauri-apps/cli/LICENSE_MIT +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 - Present Tauri Apps Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@tauri-apps/cli/README.md b/node_modules/@tauri-apps/cli/README.md deleted file mode 100644 index 7cf8ea0..0000000 --- a/node_modules/@tauri-apps/cli/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# @tauri-apps/cli - - -[![status](https://img.shields.io/badge/status-stable-blue.svg)](https://github.com/tauri-apps/tauri/tree/dev) -[![License](https://img.shields.io/badge/License-MIT%20or%20Apache%202-green.svg)](https://opencollective.com/tauri) -[![test cli](https://img.shields.io/github/actions/workflow/status/tauri-apps/tauri/test-cli-js.yml?label=test%20cli&logo=github)](https://github.com/tauri-apps/tauri/actions/workflows/test-cli-js.yml) -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftauri-apps%2Ftauri.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftauri-apps%2Ftauri?ref=badge_shield) -[![Chat Server](https://img.shields.io/badge/chat-discord-7289da.svg)](https://discord.gg/SpmNs4S) -[![website](https://img.shields.io/badge/website-tauri.app-purple.svg)](https://tauri.app) -[![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation) -[![support](https://img.shields.io/badge/sponsor-Open%20Collective-blue.svg)](https://opencollective.com/tauri) - -| Component | Version | -| --------- | ------------------------------------------- | -| @tauri-apps/cli | ![](https://img.shields.io/npm/v/@tauri-apps/cli.svg) | - -## About Tauri -Tauri is a polyglot and generic system that is very composable and allows engineers to make a wide variety of applications. It is used for building applications for Desktop Computers using a combination of Rust tools and HTML rendered in a Webview. Apps built with Tauri can ship with any number of pieces of an optional JS API / Rust API so that webviews can control the system via message passing. In fact, developers can extend the default API with their own functionality and bridge the Webview and Rust-based backend easily. - -Tauri apps can have custom menus and have tray-type interfaces. They can be updated, and are managed by the user's operating system as expected. They are very small, because they use the system's webview. They do not ship a runtime, since the final binary is compiled from rust. This makes the reversing of Tauri apps not a trivial task. -## This module -Written in Typescript and packaged such that it can be used with `npm`, `pnpm`, `yarn`, and `bun`, this library provides a node.js runner for common tasks when using Tauri, like `yarn tauri dev`. For the most part it is a wrapper around [tauri-cli](https://github.com/tauri-apps/tauri/blob/dev/tooling/cli). - -To learn more about the details of how all of these pieces fit together, please consult this [ARCHITECTURE.md](https://github.com/tauri-apps/tauri/blob/dev/ARCHITECTURE.md) document. - - -## Installation - -The preferred method is to install this module locally as a development dependency: -``` -$ npm install --save-dev @tauri-apps/cli -$ yarn add --dev @tauri-apps/cli -``` - -## Semver -**tauri** is following [Semantic Versioning 2.0](https://semver.org/). -## Licenses -Code: (c) 2019 - 2021 - The Tauri Programme within The Commons Conservancy. - -MIT or MIT/Apache 2.0 where applicable. - -Logo: CC-BY-NC-ND -- Original Tauri Logo Designs by [Daniel Thompson-Yvetot](https://github.com/nothingismagick) and [Guillaume Chau](https://github.com/akryum) diff --git a/node_modules/@tauri-apps/cli/build.rs b/node_modules/@tauri-apps/cli/build.rs deleted file mode 100644 index 3031fe5..0000000 --- a/node_modules/@tauri-apps/cli/build.rs +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -fn main() { - ::napi_build::setup(); -} diff --git a/node_modules/@tauri-apps/cli/index.d.ts b/node_modules/@tauri-apps/cli/index.d.ts deleted file mode 100644 index b562ef7..0000000 --- a/node_modules/@tauri-apps/cli/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ - -/* auto-generated by NAPI-RS */ - -export function run(args: Array, binName: string | undefined | null, callback: (...args: any[]) => any): void -export function logError(error: string): void diff --git a/node_modules/@tauri-apps/cli/index.js b/node_modules/@tauri-apps/cli/index.js deleted file mode 100644 index 4bf34ea..0000000 --- a/node_modules/@tauri-apps/cli/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/* prettier-ignore */ - -/* auto-generated by NAPI-RS */ - -const { existsSync, readFileSync } = require('fs') -const { join } = require('path') - -const { platform, arch } = process - -let nativeBinding = null -let localFileExisted = false -let loadError = null - -function isMusl() { - // For Node 10 - if (!process.report || typeof process.report.getReport !== 'function') { - try { - const lddPath = require('child_process').execSync('which ldd').toString().trim() - return readFileSync(lddPath, 'utf8').includes('musl') - } catch (e) { - return true - } - } else { - const { glibcVersionRuntime } = process.report.getReport().header - return !glibcVersionRuntime - } -} - -switch (platform) { - case 'android': - switch (arch) { - case 'arm64': - localFileExisted = existsSync(join(__dirname, 'cli.android-arm64.node')) - try { - if (localFileExisted) { - nativeBinding = require('./cli.android-arm64.node') - } else { - nativeBinding = require('@tauri-apps/cli-android-arm64') - } - } catch (e) { - loadError = e - } - break - case 'arm': - localFileExisted = existsSync(join(__dirname, 'cli.android-arm-eabi.node')) - try { - if (localFileExisted) { - nativeBinding = require('./cli.android-arm-eabi.node') - } else { - nativeBinding = require('@tauri-apps/cli-android-arm-eabi') - } - } catch (e) { - loadError = e - } - break - default: - throw new Error(`Unsupported architecture on Android ${arch}`) - } - break - case 'win32': - switch (arch) { - case 'x64': - localFileExisted = existsSync( - join(__dirname, 'cli.win32-x64-msvc.node') - ) - try { - if (localFileExisted) { - nativeBinding = require('./cli.win32-x64-msvc.node') - } else { - nativeBinding = require('@tauri-apps/cli-win32-x64-msvc') - } - } catch (e) { - loadError = e - } - break - case 'ia32': - localFileExisted = existsSync( - join(__dirname, 'cli.win32-ia32-msvc.node') - ) - try { - if (localFileExisted) { - nativeBinding = require('./cli.win32-ia32-msvc.node') - } else { - nativeBinding = require('@tauri-apps/cli-win32-ia32-msvc') - } - } catch (e) { - loadError = e - } - break - case 'arm64': - localFileExisted = existsSync( - join(__dirname, 'cli.win32-arm64-msvc.node') - ) - try { - if (localFileExisted) { - nativeBinding = require('./cli.win32-arm64-msvc.node') - } else { - nativeBinding = require('@tauri-apps/cli-win32-arm64-msvc') - } - } catch (e) { - loadError = e - } - break - default: - throw new Error(`Unsupported architecture on Windows: ${arch}`) - } - break - case 'darwin': - localFileExisted = existsSync(join(__dirname, 'cli.darwin-universal.node')) - try { - if (localFileExisted) { - nativeBinding = require('./cli.darwin-universal.node') - } else { - nativeBinding = require('@tauri-apps/cli-darwin-universal') - } - break - } catch {} - switch (arch) { - case 'x64': - localFileExisted = existsSync(join(__dirname, 'cli.darwin-x64.node')) - try { - if (localFileExisted) { - nativeBinding = require('./cli.darwin-x64.node') - } else { - nativeBinding = require('@tauri-apps/cli-darwin-x64') - } - } catch (e) { - loadError = e - } - break - case 'arm64': - localFileExisted = existsSync( - join(__dirname, 'cli.darwin-arm64.node') - ) - try { - if (localFileExisted) { - nativeBinding = require('./cli.darwin-arm64.node') - } else { - nativeBinding = require('@tauri-apps/cli-darwin-arm64') - } - } catch (e) { - loadError = e - } - break - default: - throw new Error(`Unsupported architecture on macOS: ${arch}`) - } - break - case 'freebsd': - if (arch !== 'x64') { - throw new Error(`Unsupported architecture on FreeBSD: ${arch}`) - } - localFileExisted = existsSync(join(__dirname, 'cli.freebsd-x64.node')) - try { - if (localFileExisted) { - nativeBinding = require('./cli.freebsd-x64.node') - } else { - nativeBinding = require('@tauri-apps/cli-freebsd-x64') - } - } catch (e) { - loadError = e - } - break - case 'linux': - switch (arch) { - case 'x64': - if (isMusl()) { - localFileExisted = existsSync( - join(__dirname, 'cli.linux-x64-musl.node') - ) - try { - if (localFileExisted) { - nativeBinding = require('./cli.linux-x64-musl.node') - } else { - nativeBinding = require('@tauri-apps/cli-linux-x64-musl') - } - } catch (e) { - loadError = e - } - } else { - localFileExisted = existsSync( - join(__dirname, 'cli.linux-x64-gnu.node') - ) - try { - if (localFileExisted) { - nativeBinding = require('./cli.linux-x64-gnu.node') - } else { - nativeBinding = require('@tauri-apps/cli-linux-x64-gnu') - } - } catch (e) { - loadError = e - } - } - break - case 'arm64': - if (isMusl()) { - localFileExisted = existsSync( - join(__dirname, 'cli.linux-arm64-musl.node') - ) - try { - if (localFileExisted) { - nativeBinding = require('./cli.linux-arm64-musl.node') - } else { - nativeBinding = require('@tauri-apps/cli-linux-arm64-musl') - } - } catch (e) { - loadError = e - } - } else { - localFileExisted = existsSync( - join(__dirname, 'cli.linux-arm64-gnu.node') - ) - try { - if (localFileExisted) { - nativeBinding = require('./cli.linux-arm64-gnu.node') - } else { - nativeBinding = require('@tauri-apps/cli-linux-arm64-gnu') - } - } catch (e) { - loadError = e - } - } - break - case 'arm': - localFileExisted = existsSync( - join(__dirname, 'cli.linux-arm-gnueabihf.node') - ) - try { - if (localFileExisted) { - nativeBinding = require('./cli.linux-arm-gnueabihf.node') - } else { - nativeBinding = require('@tauri-apps/cli-linux-arm-gnueabihf') - } - } catch (e) { - loadError = e - } - break - default: - throw new Error(`Unsupported architecture on Linux: ${arch}`) - } - break - default: - throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`) -} - -if (!nativeBinding) { - if (loadError) { - throw loadError - } - throw new Error(`Failed to load native binding`) -} - -const { run, logError } = nativeBinding - -module.exports.run = run -module.exports.logError = logError diff --git a/node_modules/@tauri-apps/cli/jest.config.js b/node_modules/@tauri-apps/cli/jest.config.js deleted file mode 100644 index c06e63c..0000000 --- a/node_modules/@tauri-apps/cli/jest.config.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -module.exports = { - setupFilesAfterEnv: ['/test/jest/jest.setup.js'], - testMatch: [ - '/test/jest/__tests__/**/*.spec.js', - '/test/jest/__tests__/**/*.test.js' - ], - moduleFileExtensions: ['ts', 'js', 'json'], - moduleNameMapper: { - '^~/(.*)$': '/$1' - }, - transform: { - '\\.toml$': 'jest-transform-toml' - } -} diff --git a/node_modules/@tauri-apps/cli/main.d.ts b/node_modules/@tauri-apps/cli/main.d.ts deleted file mode 100644 index a89dae5..0000000 --- a/node_modules/@tauri-apps/cli/main.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -/* tslint:disable */ -/* eslint-disable */ - -export function run(args: Array, binName: string | undefined | null): Promise diff --git a/node_modules/@tauri-apps/cli/main.js b/node_modules/@tauri-apps/cli/main.js deleted file mode 100644 index b3156ed..0000000 --- a/node_modules/@tauri-apps/cli/main.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -const { run, logError } = require('./index') - -module.exports.run = (args, binName) => { - return new Promise((resolve, reject) => { - run(args, binName, res => { - if (res instanceof Error) { - reject(res) - } else { - resolve(res) - } - }) - }) -} - -module.exports.logError = logError diff --git a/node_modules/@tauri-apps/cli/schema.json b/node_modules/@tauri-apps/cli/schema.json deleted file mode 100644 index 2626e04..0000000 --- a/node_modules/@tauri-apps/cli/schema.json +++ /dev/null @@ -1,3478 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Config", - "description": "The Tauri configuration object. It is read from a file where you can define your frontend assets, configure the bundler, enable the app updater, define a system tray, enable APIs via the allowlist and more.\n\nThe configuration file is generated by the [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in your Tauri application source directory (src-tauri).\n\nOnce generated, you may modify it at will to customize your Tauri application.\n\n## File Formats\n\nBy default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\nTauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively. The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`. The TOML file name is `Tauri.toml`.\n\n## Platform-Specific Configuration\n\nIn addition to the default configuration file, Tauri can read a platform-specific configuration from `tauri.linux.conf.json`, `tauri.windows.conf.json`, and `tauri.macos.conf.json` (or `Tauri.linux.toml`, `Tauri.windows.toml` and `Tauri.macos.toml` if the `Tauri.toml` format is used), which gets merged with the main configuration object.\n\n## Configuration Structure\n\nThe configuration is composed of the following objects:\n\n- [`package`](#packageconfig): Package settings - [`tauri`](#tauriconfig): The Tauri config - [`build`](#buildconfig): The build configuration - [`plugins`](#pluginconfig): The plugins config\n\n```json title=\"Example tauri.config.json file\" { \"build\": { \"beforeBuildCommand\": \"\", \"beforeDevCommand\": \"\", \"devPath\": \"../dist\", \"distDir\": \"../dist\" }, \"package\": { \"productName\": \"tauri-app\", \"version\": \"0.1.0\" }, \"tauri\": { \"allowlist\": { \"all\": true }, \"bundle\": {}, \"security\": { \"csp\": null }, \"updater\": { \"active\": false }, \"windows\": [ { \"fullscreen\": false, \"height\": 600, \"resizable\": true, \"title\": \"Tauri App\", \"width\": 800 } ] } } ```", - "type": "object", - "properties": { - "$schema": { - "description": "The JSON schema for the Tauri config.", - "type": [ - "string", - "null" - ] - }, - "package": { - "description": "Package settings.", - "default": { - "productName": null, - "version": null - }, - "allOf": [ - { - "$ref": "#/definitions/PackageConfig" - } - ] - }, - "tauri": { - "description": "The Tauri configuration.", - "default": { - "allowlist": { - "all": false, - "app": { - "all": false, - "hide": false, - "show": false - }, - "clipboard": { - "all": false, - "readText": false, - "writeText": false - }, - "dialog": { - "all": false, - "ask": false, - "confirm": false, - "message": false, - "open": false, - "save": false - }, - "fs": { - "all": false, - "copyFile": false, - "createDir": false, - "exists": false, - "readDir": false, - "readFile": false, - "removeDir": false, - "removeFile": false, - "renameFile": false, - "scope": [], - "writeFile": false - }, - "globalShortcut": { - "all": false - }, - "http": { - "all": false, - "request": false, - "scope": [] - }, - "notification": { - "all": false - }, - "os": { - "all": false - }, - "path": { - "all": false - }, - "process": { - "all": false, - "exit": false, - "relaunch": false, - "relaunchDangerousAllowSymlinkMacos": false - }, - "protocol": { - "all": false, - "asset": false, - "assetScope": [] - }, - "shell": { - "all": false, - "execute": false, - "open": false, - "scope": [], - "sidecar": false - }, - "window": { - "all": false, - "center": false, - "close": false, - "create": false, - "hide": false, - "maximize": false, - "minimize": false, - "print": false, - "requestUserAttention": false, - "setAlwaysOnTop": false, - "setClosable": false, - "setContentProtected": false, - "setCursorGrab": false, - "setCursorIcon": false, - "setCursorPosition": false, - "setCursorVisible": false, - "setDecorations": false, - "setFocus": false, - "setFullscreen": false, - "setIcon": false, - "setIgnoreCursorEvents": false, - "setMaxSize": false, - "setMaximizable": false, - "setMinSize": false, - "setMinimizable": false, - "setPosition": false, - "setResizable": false, - "setSize": false, - "setSkipTaskbar": false, - "setTitle": false, - "show": false, - "startDragging": false, - "unmaximize": false, - "unminimize": false - } - }, - "bundle": { - "active": false, - "appimage": { - "bundleMediaFramework": false - }, - "deb": { - "files": {} - }, - "dmg": { - "appPosition": { - "x": 180, - "y": 170 - }, - "applicationFolderPosition": { - "x": 480, - "y": 170 - }, - "windowSize": { - "height": 400, - "width": 660 - } - }, - "icon": [], - "identifier": "", - "macOS": { - "minimumSystemVersion": "10.13" - }, - "rpm": { - "epoch": 0, - "files": {}, - "release": "1" - }, - "targets": "all", - "useLocalToolsDir": false, - "windows": { - "allowDowngrades": true, - "certificateThumbprint": null, - "digestAlgorithm": null, - "nsis": null, - "signCommand": null, - "timestampUrl": null, - "tsp": false, - "webviewFixedRuntimePath": null, - "webviewInstallMode": { - "silent": true, - "type": "downloadBootstrapper" - }, - "wix": null - } - }, - "macOSPrivateApi": false, - "pattern": { - "use": "brownfield" - }, - "security": { - "dangerousDisableAssetCspModification": false, - "dangerousRemoteDomainIpcAccess": [], - "dangerousUseHttpScheme": false, - "freezePrototype": false - }, - "updater": { - "active": false, - "dialog": true, - "pubkey": "", - "windows": { - "installMode": "passive", - "installerArgs": [] - } - }, - "windows": [] - }, - "allOf": [ - { - "$ref": "#/definitions/TauriConfig" - } - ] - }, - "build": { - "description": "The build configuration.", - "default": { - "devPath": "http://localhost:8080/", - "distDir": "../dist", - "withGlobalTauri": false - }, - "allOf": [ - { - "$ref": "#/definitions/BuildConfig" - } - ] - }, - "plugins": { - "description": "The plugins config.", - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/PluginConfig" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "PackageConfig": { - "description": "The package configuration.\n\nSee more: https://tauri.app/v1/api/config#packageconfig", - "type": "object", - "properties": { - "productName": { - "description": "App name.", - "type": [ - "string", - "null" - ], - "pattern": "^[^/\\:*?\"<>|]+$" - }, - "version": { - "description": "App version. It is a semver version number or a path to a `package.json` file containing the `version` field. If removed the version number from `Cargo.toml` is used.", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "TauriConfig": { - "description": "The Tauri configuration object.\n\nSee more: https://tauri.app/v1/api/config#tauriconfig", - "type": "object", - "properties": { - "pattern": { - "description": "The pattern to use.", - "default": { - "use": "brownfield" - }, - "allOf": [ - { - "$ref": "#/definitions/PatternKind" - } - ] - }, - "windows": { - "description": "The windows configuration.", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/WindowConfig" - } - }, - "cli": { - "description": "The CLI configuration.", - "anyOf": [ - { - "$ref": "#/definitions/CliConfig" - }, - { - "type": "null" - } - ] - }, - "bundle": { - "description": "The bundler configuration.", - "default": { - "active": false, - "appimage": { - "bundleMediaFramework": false - }, - "deb": { - "files": {} - }, - "dmg": { - "appPosition": { - "x": 180, - "y": 170 - }, - "applicationFolderPosition": { - "x": 480, - "y": 170 - }, - "windowSize": { - "height": 400, - "width": 660 - } - }, - "icon": [], - "identifier": "", - "macOS": { - "minimumSystemVersion": "10.13" - }, - "rpm": { - "epoch": 0, - "files": {}, - "release": "1" - }, - "targets": "all", - "useLocalToolsDir": false, - "windows": { - "allowDowngrades": true, - "certificateThumbprint": null, - "digestAlgorithm": null, - "nsis": null, - "signCommand": null, - "timestampUrl": null, - "tsp": false, - "webviewFixedRuntimePath": null, - "webviewInstallMode": { - "silent": true, - "type": "downloadBootstrapper" - }, - "wix": null - } - }, - "allOf": [ - { - "$ref": "#/definitions/BundleConfig" - } - ] - }, - "allowlist": { - "description": "The allowlist configuration.", - "default": { - "all": false, - "app": { - "all": false, - "hide": false, - "show": false - }, - "clipboard": { - "all": false, - "readText": false, - "writeText": false - }, - "dialog": { - "all": false, - "ask": false, - "confirm": false, - "message": false, - "open": false, - "save": false - }, - "fs": { - "all": false, - "copyFile": false, - "createDir": false, - "exists": false, - "readDir": false, - "readFile": false, - "removeDir": false, - "removeFile": false, - "renameFile": false, - "scope": [], - "writeFile": false - }, - "globalShortcut": { - "all": false - }, - "http": { - "all": false, - "request": false, - "scope": [] - }, - "notification": { - "all": false - }, - "os": { - "all": false - }, - "path": { - "all": false - }, - "process": { - "all": false, - "exit": false, - "relaunch": false, - "relaunchDangerousAllowSymlinkMacos": false - }, - "protocol": { - "all": false, - "asset": false, - "assetScope": [] - }, - "shell": { - "all": false, - "execute": false, - "open": false, - "scope": [], - "sidecar": false - }, - "window": { - "all": false, - "center": false, - "close": false, - "create": false, - "hide": false, - "maximize": false, - "minimize": false, - "print": false, - "requestUserAttention": false, - "setAlwaysOnTop": false, - "setClosable": false, - "setContentProtected": false, - "setCursorGrab": false, - "setCursorIcon": false, - "setCursorPosition": false, - "setCursorVisible": false, - "setDecorations": false, - "setFocus": false, - "setFullscreen": false, - "setIcon": false, - "setIgnoreCursorEvents": false, - "setMaxSize": false, - "setMaximizable": false, - "setMinSize": false, - "setMinimizable": false, - "setPosition": false, - "setResizable": false, - "setSize": false, - "setSkipTaskbar": false, - "setTitle": false, - "show": false, - "startDragging": false, - "unmaximize": false, - "unminimize": false - } - }, - "allOf": [ - { - "$ref": "#/definitions/AllowlistConfig" - } - ] - }, - "security": { - "description": "Security configuration.", - "default": { - "dangerousDisableAssetCspModification": false, - "dangerousRemoteDomainIpcAccess": [], - "dangerousUseHttpScheme": false, - "freezePrototype": false - }, - "allOf": [ - { - "$ref": "#/definitions/SecurityConfig" - } - ] - }, - "updater": { - "description": "The updater configuration.", - "default": { - "active": false, - "dialog": true, - "pubkey": "", - "windows": { - "installMode": "passive", - "installerArgs": [] - } - }, - "allOf": [ - { - "$ref": "#/definitions/UpdaterConfig" - } - ] - }, - "systemTray": { - "description": "Configuration for app system tray.", - "anyOf": [ - { - "$ref": "#/definitions/SystemTrayConfig" - }, - { - "type": "null" - } - ] - }, - "macOSPrivateApi": { - "description": "MacOS private API configuration. Enables the transparent background API and sets the `fullScreenEnabled` preference to `true`.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "PatternKind": { - "description": "The application pattern.", - "oneOf": [ - { - "description": "Brownfield pattern.", - "type": "object", - "required": [ - "use" - ], - "properties": { - "use": { - "type": "string", - "enum": [ - "brownfield" - ] - } - } - }, - { - "description": "Isolation pattern. Recommended for security purposes.", - "type": "object", - "required": [ - "options", - "use" - ], - "properties": { - "use": { - "type": "string", - "enum": [ - "isolation" - ] - }, - "options": { - "type": "object", - "required": [ - "dir" - ], - "properties": { - "dir": { - "description": "The dir containing the index.html file that contains the secure isolation application.", - "type": "string" - } - } - } - } - } - ] - }, - "WindowConfig": { - "description": "The window configuration object.\n\nSee more: https://tauri.app/v1/api/config#windowconfig", - "type": "object", - "properties": { - "label": { - "description": "The window identifier. It must be alphanumeric.", - "default": "main", - "type": "string" - }, - "url": { - "description": "The window webview URL.", - "default": "index.html", - "allOf": [ - { - "$ref": "#/definitions/WindowUrl" - } - ] - }, - "userAgent": { - "description": "The user agent for the webview", - "type": [ - "string", - "null" - ] - }, - "fileDropEnabled": { - "description": "Whether the file drop is enabled or not on the webview. By default it is enabled.\n\nDisabling it is required to use drag and drop on the frontend on Windows.", - "default": true, - "type": "boolean" - }, - "center": { - "description": "Whether or not the window starts centered or not.", - "default": false, - "type": "boolean" - }, - "x": { - "description": "The horizontal position of the window's top left corner", - "type": [ - "number", - "null" - ], - "format": "double" - }, - "y": { - "description": "The vertical position of the window's top left corner", - "type": [ - "number", - "null" - ], - "format": "double" - }, - "width": { - "description": "The window width.", - "default": 800.0, - "type": "number", - "format": "double" - }, - "height": { - "description": "The window height.", - "default": 600.0, - "type": "number", - "format": "double" - }, - "minWidth": { - "description": "The min window width.", - "type": [ - "number", - "null" - ], - "format": "double" - }, - "minHeight": { - "description": "The min window height.", - "type": [ - "number", - "null" - ], - "format": "double" - }, - "maxWidth": { - "description": "The max window width.", - "type": [ - "number", - "null" - ], - "format": "double" - }, - "maxHeight": { - "description": "The max window height.", - "type": [ - "number", - "null" - ], - "format": "double" - }, - "resizable": { - "description": "Whether the window is resizable or not. When resizable is set to false, native window's maximize button is automatically disabled.", - "default": true, - "type": "boolean" - }, - "maximizable": { - "description": "Whether the window's native maximize button is enabled or not. If resizable is set to false, this setting is ignored.\n\n## Platform-specific\n\n- **macOS:** Disables the \"zoom\" button in the window titlebar, which is also used to enter fullscreen mode. - **Linux / iOS / Android:** Unsupported.", - "default": true, - "type": "boolean" - }, - "minimizable": { - "description": "Whether the window's native minimize button is enabled or not.\n\n## Platform-specific\n\n- **Linux / iOS / Android:** Unsupported.", - "default": true, - "type": "boolean" - }, - "closable": { - "description": "Whether the window's native close button is enabled or not.\n\n## Platform-specific\n\n- **Linux:** \"GTK+ will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible\" - **iOS / Android:** Unsupported.", - "default": true, - "type": "boolean" - }, - "title": { - "description": "The window title.", - "default": "Tauri App", - "type": "string" - }, - "fullscreen": { - "description": "Whether the window starts as fullscreen or not.", - "default": false, - "type": "boolean" - }, - "focus": { - "description": "Whether the window will be initially focused or not.", - "default": true, - "type": "boolean" - }, - "transparent": { - "description": "Whether the window is transparent or not.\n\nNote that on `macOS` this requires the `macos-private-api` feature flag, enabled under `tauri > macOSPrivateApi`. WARNING: Using private APIs on `macOS` prevents your application from being accepted to the `App Store`.", - "default": false, - "type": "boolean" - }, - "maximized": { - "description": "Whether the window is maximized or not.", - "default": false, - "type": "boolean" - }, - "visible": { - "description": "Whether the window is visible or not.", - "default": true, - "type": "boolean" - }, - "decorations": { - "description": "Whether the window should have borders and bars.", - "default": true, - "type": "boolean" - }, - "alwaysOnTop": { - "description": "Whether the window should always be on top of other windows.", - "default": false, - "type": "boolean" - }, - "contentProtected": { - "description": "Prevents the window contents from being captured by other apps.", - "default": false, - "type": "boolean" - }, - "skipTaskbar": { - "description": "If `true`, hides the window icon from the taskbar on Windows and Linux.", - "default": false, - "type": "boolean" - }, - "theme": { - "description": "The initial window theme. Defaults to the system theme. Only implemented on Windows and macOS 10.14+.", - "anyOf": [ - { - "$ref": "#/definitions/Theme" - }, - { - "type": "null" - } - ] - }, - "titleBarStyle": { - "description": "The style of the macOS title bar.", - "default": "Visible", - "allOf": [ - { - "$ref": "#/definitions/TitleBarStyle" - } - ] - }, - "hiddenTitle": { - "description": "If `true`, sets the window title to be hidden on macOS.", - "default": false, - "type": "boolean" - }, - "acceptFirstMouse": { - "description": "Whether clicking an inactive window also clicks through to the webview on macOS.", - "default": false, - "type": "boolean" - }, - "tabbingIdentifier": { - "description": "Defines the window [tabbing identifier] for macOS.\n\nWindows with matching tabbing identifiers will be grouped together. If the tabbing identifier is not set, automatic tabbing will be disabled.\n\n[tabbing identifier]: ", - "type": [ - "string", - "null" - ] - }, - "additionalBrowserArgs": { - "description": "Defines additional browser arguments on Windows. By default wry passes `--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection` so if you use this method, you also need to disable these components by yourself if you want.", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "WindowUrl": { - "description": "An URL to open on a Tauri webview window.", - "anyOf": [ - { - "description": "An external URL.", - "type": "string", - "format": "uri" - }, - { - "description": "The path portion of an app URL. For instance, to load `tauri://localhost/users/john`, you can simply provide `users/john` in this configuration.", - "type": "string" - } - ] - }, - "Theme": { - "description": "System theme.", - "oneOf": [ - { - "description": "Light theme.", - "type": "string", - "enum": [ - "Light" - ] - }, - { - "description": "Dark theme.", - "type": "string", - "enum": [ - "Dark" - ] - } - ] - }, - "TitleBarStyle": { - "description": "How the window title bar should be displayed on macOS.", - "oneOf": [ - { - "description": "A normal title bar.", - "type": "string", - "enum": [ - "Visible" - ] - }, - { - "description": "Makes the title bar transparent, so the window background color is shown instead.\n\nUseful if you don't need to have actual HTML under the title bar. This lets you avoid the caveats of using `TitleBarStyle::Overlay`. Will be more useful when Tauri lets you set a custom window background color.", - "type": "string", - "enum": [ - "Transparent" - ] - }, - { - "description": "Shows the title bar as a transparent overlay over the window's content.\n\nKeep in mind: - The height of the title bar is different on different OS versions, which can lead to window the controls and title not being where you don't expect. - You need to define a custom drag region to make your window draggable, however due to a limitation you can't drag the window when it's not in focus . - The color of the window title depends on the system theme.", - "type": "string", - "enum": [ - "Overlay" - ] - } - ] - }, - "CliConfig": { - "description": "describes a CLI configuration\n\nSee more: https://tauri.app/v1/api/config#cliconfig", - "type": "object", - "properties": { - "description": { - "description": "Command description which will be shown on the help information.", - "type": [ - "string", - "null" - ] - }, - "longDescription": { - "description": "Command long description which will be shown on the help information.", - "type": [ - "string", - "null" - ] - }, - "beforeHelp": { - "description": "Adds additional help information to be displayed in addition to auto-generated help. This information is displayed before the auto-generated help information. This is often used for header information.", - "type": [ - "string", - "null" - ] - }, - "afterHelp": { - "description": "Adds additional help information to be displayed in addition to auto-generated help. This information is displayed after the auto-generated help information. This is often used to describe how to use the arguments, or caveats to be noted.", - "type": [ - "string", - "null" - ] - }, - "args": { - "description": "List of arguments for the command", - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/definitions/CliArg" - } - }, - "subcommands": { - "description": "List of subcommands of this command", - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/definitions/CliConfig" - } - } - }, - "additionalProperties": false - }, - "CliArg": { - "description": "A CLI argument definition.", - "type": "object", - "required": [ - "name" - ], - "properties": { - "short": { - "description": "The short version of the argument, without the preceding -.\n\nNOTE: Any leading `-` characters will be stripped, and only the first non-character will be used as the short version.", - "type": [ - "string", - "null" - ], - "maxLength": 1, - "minLength": 1 - }, - "name": { - "description": "The unique argument name", - "type": "string" - }, - "description": { - "description": "The argument description which will be shown on the help information. Typically, this is a short (one line) description of the arg.", - "type": [ - "string", - "null" - ] - }, - "longDescription": { - "description": "The argument long description which will be shown on the help information. Typically this a more detailed (multi-line) message that describes the argument.", - "type": [ - "string", - "null" - ] - }, - "takesValue": { - "description": "Specifies that the argument takes a value at run time.\n\nNOTE: values for arguments may be specified in any of the following methods - Using a space such as -o value or --option value - Using an equals and no space such as -o=value or --option=value - Use a short and no space such as -ovalue", - "default": false, - "type": "boolean" - }, - "multiple": { - "description": "Specifies that the argument may have an unknown number of multiple values. Without any other settings, this argument may appear only once.\n\nFor example, --opt val1 val2 is allowed, but --opt val1 val2 --opt val3 is not.\n\nNOTE: Setting this requires `takes_value` to be set to true.", - "default": false, - "type": "boolean" - }, - "multipleOccurrences": { - "description": "Specifies that the argument may appear more than once. For flags, this results in the number of occurrences of the flag being recorded. For example -ddd or -d -d -d would count as three occurrences. For options or arguments that take a value, this does not affect how many values they can accept. (i.e. only one at a time is allowed)\n\nFor example, --opt val1 --opt val2 is allowed, but --opt val1 val2 is not.", - "default": false, - "type": "boolean" - }, - "numberOfValues": { - "description": "Specifies how many values are required to satisfy this argument. For example, if you had a `-f ` argument where you wanted exactly 3 'files' you would set `number_of_values = 3`, and this argument wouldn't be satisfied unless the user provided 3 and only 3 values.\n\n**NOTE:** Does *not* require `multiple_occurrences = true` to be set. Setting `multiple_occurrences = true` would allow `-f -f ` where as *not* setting it would only allow one occurrence of this argument.\n\n**NOTE:** implicitly sets `takes_value = true` and `multiple_values = true`.", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 0.0 - }, - "possibleValues": { - "description": "Specifies a list of possible values for this argument. At runtime, the CLI verifies that only one of the specified values was used, or fails with an error message.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "minValues": { - "description": "Specifies the minimum number of values for this argument. For example, if you had a -f `` argument where you wanted at least 2 'files', you would set `minValues: 2`, and this argument would be satisfied if the user provided, 2 or more values.", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 0.0 - }, - "maxValues": { - "description": "Specifies the maximum number of values are for this argument. For example, if you had a -f `` argument where you wanted up to 3 'files', you would set .max_values(3), and this argument would be satisfied if the user provided, 1, 2, or 3 values.", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 0.0 - }, - "required": { - "description": "Sets whether or not the argument is required by default.\n\n- Required by default means it is required, when no other conflicting rules have been evaluated - Conflicting rules take precedence over being required.", - "default": false, - "type": "boolean" - }, - "requiredUnlessPresent": { - "description": "Sets an arg that override this arg's required setting i.e. this arg will be required unless this other argument is present.", - "type": [ - "string", - "null" - ] - }, - "requiredUnlessPresentAll": { - "description": "Sets args that override this arg's required setting i.e. this arg will be required unless all these other arguments are present.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requiredUnlessPresentAny": { - "description": "Sets args that override this arg's required setting i.e. this arg will be required unless at least one of these other arguments are present.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "conflictsWith": { - "description": "Sets a conflicting argument by name i.e. when using this argument, the following argument can't be present and vice versa.", - "type": [ - "string", - "null" - ] - }, - "conflictsWithAll": { - "description": "The same as conflictsWith but allows specifying multiple two-way conflicts per argument.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requires": { - "description": "Tets an argument by name that is required when this one is present i.e. when using this argument, the following argument must be present.", - "type": [ - "string", - "null" - ] - }, - "requiresAll": { - "description": "Sts multiple arguments by names that are required when this one is present i.e. when using this argument, the following arguments must be present.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requiresIf": { - "description": "Allows a conditional requirement with the signature [arg, value] the requirement will only become valid if `arg`'s value equals `${value}`.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requiredIfEq": { - "description": "Allows specifying that an argument is required conditionally with the signature [arg, value] the requirement will only become valid if the `arg`'s value equals `${value}`.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requireEquals": { - "description": "Requires that options use the --option=val syntax i.e. an equals between the option and associated value.", - "type": [ - "boolean", - "null" - ] - }, - "index": { - "description": "The positional argument index, starting at 1.\n\nThe index refers to position according to other positional argument. It does not define position in the argument list as a whole. When utilized with multiple=true, only the last positional argument may be defined as multiple (i.e. the one with the highest index).", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 1.0 - } - }, - "additionalProperties": false - }, - "BundleConfig": { - "description": "Configuration for tauri-bundler.\n\nSee more: https://tauri.app/v1/api/config#bundleconfig", - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "active": { - "description": "Whether Tauri should bundle your application or just output the executable.", - "default": false, - "type": "boolean" - }, - "targets": { - "description": "The bundle targets, currently supports [\"deb\", \"rpm\", \"appimage\", \"nsis\", \"msi\", \"app\", \"dmg\", \"updater\"] or \"all\".", - "default": "all", - "allOf": [ - { - "$ref": "#/definitions/BundleTarget" - } - ] - }, - "identifier": { - "description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`). This string must be unique across applications since it is used in system configurations like the bundle ID and path to the webview data directory. This string must contain only alphanumeric characters (A–Z, a–z, and 0–9), hyphens (-), and periods (.).", - "type": "string" - }, - "publisher": { - "description": "The application's publisher. Defaults to the second element in the identifier string. Currently maps to the Manufacturer property of the Windows Installer.", - "type": [ - "string", - "null" - ] - }, - "icon": { - "description": "The app's icons", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "description": "App resources to bundle. Each resource is a path to a file or directory. Glob patterns are supported.", - "anyOf": [ - { - "$ref": "#/definitions/BundleResources" - }, - { - "type": "null" - } - ] - }, - "copyright": { - "description": "A copyright string associated with your application.", - "type": [ - "string", - "null" - ] - }, - "category": { - "description": "The application kind.\n\nShould be one of the following: Business, DeveloperTool, Education, Entertainment, Finance, Game, ActionGame, AdventureGame, ArcadeGame, BoardGame, CardGame, CasinoGame, DiceGame, EducationalGame, FamilyGame, KidsGame, MusicGame, PuzzleGame, RacingGame, RolePlayingGame, SimulationGame, SportsGame, StrategyGame, TriviaGame, WordGame, GraphicsAndDesign, HealthcareAndFitness, Lifestyle, Medical, Music, News, Photography, Productivity, Reference, SocialNetworking, Sports, Travel, Utility, Video, Weather.", - "type": [ - "string", - "null" - ] - }, - "shortDescription": { - "description": "A short description of your application.", - "type": [ - "string", - "null" - ] - }, - "longDescription": { - "description": "A longer, multi-line description of the application.", - "type": [ - "string", - "null" - ] - }, - "useLocalToolsDir": { - "description": "Whether to use the project's `target` directory, for caching build tools (e.g., Wix and NSIS) when building this application. Defaults to `false`.\n\nIf true, tools will be cached in `target\\.tauri-tools`. If false, tools will be cached in the current user's platform-specific cache directory.\n\nAn example where it can be appropriate to set this to `true` is when building this application as a Windows System user (e.g., AWS EC2 workloads), because the Window system's app data directory is restricted.", - "default": false, - "type": "boolean" - }, - "appimage": { - "description": "Configuration for the AppImage bundle.", - "default": { - "bundleMediaFramework": false - }, - "allOf": [ - { - "$ref": "#/definitions/AppImageConfig" - } - ] - }, - "deb": { - "description": "Configuration for the Debian bundle.", - "default": { - "files": {} - }, - "allOf": [ - { - "$ref": "#/definitions/DebConfig" - } - ] - }, - "rpm": { - "description": "Configuration for the RPM bundle.", - "default": { - "epoch": 0, - "files": {}, - "release": "1" - }, - "allOf": [ - { - "$ref": "#/definitions/RpmConfig" - } - ] - }, - "dmg": { - "description": "DMG-specific settings.", - "default": { - "appPosition": { - "x": 180, - "y": 170 - }, - "applicationFolderPosition": { - "x": 480, - "y": 170 - }, - "windowSize": { - "height": 400, - "width": 660 - } - }, - "allOf": [ - { - "$ref": "#/definitions/DmgConfig" - } - ] - }, - "macOS": { - "description": "Configuration for the macOS bundles.", - "default": { - "minimumSystemVersion": "10.13" - }, - "allOf": [ - { - "$ref": "#/definitions/MacConfig" - } - ] - }, - "externalBin": { - "description": "A list of—either absolute or relative—paths to binaries to embed with your application.\n\nNote that Tauri will look for system-specific binaries following the pattern \"binary-name{-target-triple}{.system-extension}\".\n\nE.g. for the external binary \"my-binary\", Tauri looks for:\n\n- \"my-binary-x86_64-pc-windows-msvc.exe\" for Windows - \"my-binary-x86_64-apple-darwin\" for macOS - \"my-binary-x86_64-unknown-linux-gnu\" for Linux\n\nso don't forget to provide binaries for all targeted platforms.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "windows": { - "description": "Configuration for the Windows bundle.", - "default": { - "allowDowngrades": true, - "certificateThumbprint": null, - "digestAlgorithm": null, - "nsis": null, - "signCommand": null, - "timestampUrl": null, - "tsp": false, - "webviewFixedRuntimePath": null, - "webviewInstallMode": { - "silent": true, - "type": "downloadBootstrapper" - }, - "wix": null - }, - "allOf": [ - { - "$ref": "#/definitions/WindowsConfig" - } - ] - } - }, - "additionalProperties": false - }, - "BundleTarget": { - "description": "Targets to bundle. Each value is case insensitive.", - "anyOf": [ - { - "description": "Bundle all targets.", - "enum": [ - "all" - ] - }, - { - "description": "A list of bundle targets.", - "type": "array", - "items": { - "$ref": "#/definitions/BundleType" - } - }, - { - "description": "A single bundle target.", - "allOf": [ - { - "$ref": "#/definitions/BundleType" - } - ] - } - ] - }, - "BundleType": { - "description": "A bundle referenced by tauri-bundler.", - "oneOf": [ - { - "description": "The debian bundle (.deb).", - "type": "string", - "enum": [ - "deb" - ] - }, - { - "description": "The RPM bundle (.rpm).", - "type": "string", - "enum": [ - "rpm" - ] - }, - { - "description": "The AppImage bundle (.appimage).", - "type": "string", - "enum": [ - "appimage" - ] - }, - { - "description": "The Microsoft Installer bundle (.msi).", - "type": "string", - "enum": [ - "msi" - ] - }, - { - "description": "The NSIS bundle (.exe).", - "type": "string", - "enum": [ - "nsis" - ] - }, - { - "description": "The macOS application bundle (.app).", - "type": "string", - "enum": [ - "app" - ] - }, - { - "description": "The Apple Disk Image bundle (.dmg).", - "type": "string", - "enum": [ - "dmg" - ] - }, - { - "description": "The Tauri updater bundle.", - "type": "string", - "enum": [ - "updater" - ] - } - ] - }, - "BundleResources": { - "description": "Definition for bundle resources. Can be either a list of paths to include or a map of source to target paths.", - "anyOf": [ - { - "description": "A list of paths to include.", - "type": "array", - "items": { - "type": "string" - } - }, - { - "description": "A map of source to target paths.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - ] - }, - "AppImageConfig": { - "description": "Configuration for AppImage bundles.\n\nSee more: https://tauri.app/v1/api/config#appimageconfig", - "type": "object", - "properties": { - "bundleMediaFramework": { - "description": "Include additional gstreamer dependencies needed for audio and video playback. This increases the bundle size by ~15-35MB depending on your build system.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "DebConfig": { - "description": "Configuration for Debian (.deb) bundles.\n\nSee more: https://tauri.app/v1/api/config#debconfig", - "type": "object", - "properties": { - "depends": { - "description": "The list of deb dependencies your application relies on.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "provides": { - "description": "The list of dependencies the package provides.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "conflicts": { - "description": "The list of package conflicts.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "replaces": { - "description": "The list of package replaces.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "files": { - "description": "The files to include on the package.", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "desktopTemplate": { - "description": "Path to a custom desktop file Handlebars template.\n\nAvailable variables: `categories`, `comment` (optional), `exec`, `icon` and `name`.", - "type": [ - "string", - "null" - ] - }, - "section": { - "description": "Define the section in Debian Control file. See : https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections", - "type": [ - "string", - "null" - ] - }, - "priority": { - "description": "Change the priority of the Debian Package. By default, it is set to `optional`. Recognized Priorities as of now are : `required`, `important`, `standard`, `optional`, `extra`", - "type": [ - "string", - "null" - ] - }, - "changelog": { - "description": "Path of the uncompressed Changelog file, to be stored at /usr/share/doc/package-name/changelog.gz. See https://www.debian.org/doc/debian-policy/ch-docs.html#changelog-files-and-release-notes", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "RpmConfig": { - "description": "Configuration for RPM bundles.", - "type": "object", - "properties": { - "license": { - "description": "The package's license identifier. If not set, defaults to the license from the Cargo.toml file.", - "type": [ - "string", - "null" - ] - }, - "depends": { - "description": "The list of RPM dependencies your application relies on.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "provides": { - "description": "The list of RPM dependencies your application provides.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "conflicts": { - "description": "The list of RPM dependencies your application conflicts with. They must not be present in order for the package to be installed.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "obsoletes": { - "description": "The list of RPM dependencies your application supersedes - if this package is installed, packages listed as “obsoletes” will be automatically removed (if they are present).", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "release": { - "description": "The RPM release tag.", - "default": "1", - "type": "string" - }, - "epoch": { - "description": "The RPM epoch.", - "default": 0, - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "files": { - "description": "The files to include on the package.", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "desktopTemplate": { - "description": "Path to a custom desktop file Handlebars template.\n\nAvailable variables: `categories`, `comment` (optional), `exec`, `icon` and `name`.", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "DmgConfig": { - "description": "Configuration for Apple Disk Image (.dmg) bundles.\n\nSee more: https://tauri.app/v1/api/config#dmgconfig", - "type": "object", - "properties": { - "background": { - "description": "Image to use as the background in dmg file. Accepted formats: `png`/`jpg`/`gif`.", - "type": [ - "string", - "null" - ] - }, - "windowPosition": { - "description": "Position of volume window on screen.", - "anyOf": [ - { - "$ref": "#/definitions/Position" - }, - { - "type": "null" - } - ] - }, - "windowSize": { - "description": "Size of volume window.", - "default": { - "height": 400, - "width": 660 - }, - "allOf": [ - { - "$ref": "#/definitions/Size" - } - ] - }, - "appPosition": { - "description": "Position of app file on window.", - "default": { - "x": 180, - "y": 170 - }, - "allOf": [ - { - "$ref": "#/definitions/Position" - } - ] - }, - "applicationFolderPosition": { - "description": "Position of application folder on window.", - "default": { - "x": 480, - "y": 170 - }, - "allOf": [ - { - "$ref": "#/definitions/Position" - } - ] - } - }, - "additionalProperties": false - }, - "Position": { - "description": "Position coordinates struct.", - "type": "object", - "required": [ - "x", - "y" - ], - "properties": { - "x": { - "description": "X coordinate.", - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "y": { - "description": "Y coordinate.", - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - "Size": { - "description": "Size of the window.", - "type": "object", - "required": [ - "height", - "width" - ], - "properties": { - "width": { - "description": "Width of the window.", - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "height": { - "description": "Height of the window.", - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - "MacConfig": { - "description": "Configuration for the macOS bundles.\n\nSee more: https://tauri.app/v1/api/config#macconfig", - "type": "object", - "properties": { - "frameworks": { - "description": "A list of strings indicating any macOS X frameworks that need to be bundled with the application.\n\nIf a name is used, \".framework\" must be omitted and it will look for standard install locations. You may also use a path to a specific framework.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "minimumSystemVersion": { - "description": "A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`.\n\nSetting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist` and the `MACOSX_DEPLOYMENT_TARGET` environment variable.\n\nAn empty string is considered an invalid value so the default value is used.", - "default": "10.13", - "type": [ - "string", - "null" - ] - }, - "exceptionDomain": { - "description": "Allows your application to communicate with the outside world. It should be a lowercase, without port and protocol domain name.", - "type": [ - "string", - "null" - ] - }, - "license": { - "description": "The path to the license file to add to the DMG bundle.", - "type": [ - "string", - "null" - ] - }, - "signingIdentity": { - "description": "Identity to use for code signing.", - "type": [ - "string", - "null" - ] - }, - "providerShortName": { - "description": "Provider short name for notarization.", - "type": [ - "string", - "null" - ] - }, - "entitlements": { - "description": "Path to the entitlements file.", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "WindowsConfig": { - "description": "Windows bundler configuration.\n\nSee more: https://tauri.app/v1/api/config#windowsconfig", - "type": "object", - "properties": { - "digestAlgorithm": { - "description": "Specifies the file digest algorithm to use for creating file signatures. Required for code signing. SHA-256 is recommended.", - "type": [ - "string", - "null" - ] - }, - "certificateThumbprint": { - "description": "Specifies the SHA1 hash of the signing certificate.", - "type": [ - "string", - "null" - ] - }, - "timestampUrl": { - "description": "Server to use during timestamping.", - "type": [ - "string", - "null" - ] - }, - "tsp": { - "description": "Whether to use Time-Stamp Protocol (TSP, a.k.a. RFC 3161) for the timestamp server. Your code signing provider may use a TSP timestamp server, like e.g. SSL.com does. If so, enable TSP by setting to true.", - "default": false, - "type": "boolean" - }, - "webviewInstallMode": { - "description": "The installation mode for the Webview2 runtime.", - "default": { - "silent": true, - "type": "downloadBootstrapper" - }, - "allOf": [ - { - "$ref": "#/definitions/WebviewInstallMode" - } - ] - }, - "webviewFixedRuntimePath": { - "description": "Path to the webview fixed runtime to use. Overwrites [`Self::webview_install_mode`] if set.\n\nWill be removed in v2, prefer the [`Self::webview_install_mode`] option.\n\nThe fixed version can be downloaded [on the official website](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section). The `.cab` file must be extracted to a folder and this folder path must be defined on this field.", - "type": [ - "string", - "null" - ] - }, - "allowDowngrades": { - "description": "Validates a second app installation, blocking the user from installing an older version if set to `false`.\n\nFor instance, if `1.2.1` is installed, the user won't be able to install app version `1.2.0` or `1.1.5`.\n\nThe default value of this flag is `true`.", - "default": true, - "type": "boolean" - }, - "wix": { - "description": "Configuration for the MSI generated with WiX.", - "anyOf": [ - { - "$ref": "#/definitions/WixConfig" - }, - { - "type": "null" - } - ] - }, - "nsis": { - "description": "Configuration for the installer generated with NSIS.", - "anyOf": [ - { - "$ref": "#/definitions/NsisConfig" - }, - { - "type": "null" - } - ] - }, - "signCommand": { - "description": "Specify a custom command to sign the binaries. This command needs to have a `%1` in it which is just a placeholder for the binary path, which we will detect and replace before calling the command.\n\nExample: ```text sign-cli --arg1 --arg2 %1 ```\n\nBy Default we use `signtool.exe` which can be found only on Windows so if you are on another platform and want to cross-compile and sign you will need to use another tool like `osslsigncode`.", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "WebviewInstallMode": { - "description": "Install modes for the Webview2 runtime. Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\nFor more information see .", - "oneOf": [ - { - "description": "Do not install the Webview2 as part of the Windows Installer.", - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "skip" - ] - } - }, - "additionalProperties": false - }, - { - "description": "Download the bootstrapper and run it. Requires an internet connection. Results in a smaller installer size, but is not recommended on Windows 7.", - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "downloadBootstrapper" - ] - }, - "silent": { - "description": "Instructs the installer to run the bootstrapper in silent mode. Defaults to `true`.", - "default": true, - "type": "boolean" - } - }, - "additionalProperties": false - }, - { - "description": "Embed the bootstrapper and run it. Requires an internet connection. Increases the installer size by around 1.8MB, but offers better support on Windows 7.", - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "embedBootstrapper" - ] - }, - "silent": { - "description": "Instructs the installer to run the bootstrapper in silent mode. Defaults to `true`.", - "default": true, - "type": "boolean" - } - }, - "additionalProperties": false - }, - { - "description": "Embed the offline installer and run it. Does not require an internet connection. Increases the installer size by around 127MB.", - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "offlineInstaller" - ] - }, - "silent": { - "description": "Instructs the installer to run the installer in silent mode. Defaults to `true`.", - "default": true, - "type": "boolean" - } - }, - "additionalProperties": false - }, - { - "description": "Embed a fixed webview2 version and use it at runtime. Increases the installer size by around 180MB.", - "type": "object", - "required": [ - "path", - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "fixedRuntime" - ] - }, - "path": { - "description": "The path to the fixed runtime to use.\n\nThe fixed version can be downloaded [on the official website](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section). The `.cab` file must be extracted to a folder and this folder path must be defined on this field.", - "type": "string" - } - }, - "additionalProperties": false - } - ] - }, - "WixConfig": { - "description": "Configuration for the MSI bundle using WiX.\n\nSee more: https://tauri.app/v1/api/config#wixconfig", - "type": "object", - "properties": { - "language": { - "description": "The installer languages to build. See .", - "default": "en-US", - "allOf": [ - { - "$ref": "#/definitions/WixLanguage" - } - ] - }, - "template": { - "description": "A custom .wxs template to use.", - "type": [ - "string", - "null" - ] - }, - "fragmentPaths": { - "description": "A list of paths to .wxs files with WiX fragments to use.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "componentGroupRefs": { - "description": "The ComponentGroup element ids you want to reference from the fragments.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "componentRefs": { - "description": "The Component element ids you want to reference from the fragments.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "featureGroupRefs": { - "description": "The FeatureGroup element ids you want to reference from the fragments.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "featureRefs": { - "description": "The Feature element ids you want to reference from the fragments.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "mergeRefs": { - "description": "The Merge element ids you want to reference from the fragments.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "skipWebviewInstall": { - "description": "Disables the Webview2 runtime installation after app install.\n\nWill be removed in v2, prefer the [`WindowsConfig::webview_install_mode`] option.", - "default": false, - "type": "boolean" - }, - "license": { - "description": "The path to the license file to render on the installer.\n\nMust be an RTF file, so if a different extension is provided, we convert it to the RTF format.", - "type": [ - "string", - "null" - ] - }, - "enableElevatedUpdateTask": { - "description": "Create an elevated update task within Windows Task Scheduler.", - "default": false, - "type": "boolean" - }, - "bannerPath": { - "description": "Path to a bitmap file to use as the installation user interface banner. This bitmap will appear at the top of all but the first page of the installer.\n\nThe required dimensions are 493px × 58px.", - "type": [ - "string", - "null" - ] - }, - "dialogImagePath": { - "description": "Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "WixLanguage": { - "description": "The languages to build using WiX.", - "anyOf": [ - { - "description": "A single language to build, without configuration.", - "type": "string" - }, - { - "description": "A list of languages to build, without configuration.", - "type": "array", - "items": { - "type": "string" - } - }, - { - "description": "A map of languages and its configuration.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/WixLanguageConfig" - } - } - ] - }, - "WixLanguageConfig": { - "description": "Configuration for a target language for the WiX build.\n\nSee more: https://tauri.app/v1/api/config#wixlanguageconfig", - "type": "object", - "properties": { - "localePath": { - "description": "The path to a locale (`.wxl`) file. See .", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "NsisConfig": { - "description": "Configuration for the Installer bundle using NSIS.", - "type": "object", - "properties": { - "template": { - "description": "A custom .nsi template to use.", - "type": [ - "string", - "null" - ] - }, - "license": { - "description": "The path to the license file to render on the installer.", - "type": [ - "string", - "null" - ] - }, - "headerImage": { - "description": "The path to a bitmap file to display on the header of installers pages.\n\nThe recommended dimensions are 150px x 57px.", - "type": [ - "string", - "null" - ] - }, - "sidebarImage": { - "description": "The path to a bitmap file for the Welcome page and the Finish page.\n\nThe recommended dimensions are 164px x 314px.", - "type": [ - "string", - "null" - ] - }, - "installerIcon": { - "description": "The path to an icon file used as the installer icon.", - "type": [ - "string", - "null" - ] - }, - "installMode": { - "description": "Whether the installation will be for all users or just the current user.", - "default": "currentUser", - "allOf": [ - { - "$ref": "#/definitions/NSISInstallerMode" - } - ] - }, - "languages": { - "description": "A list of installer languages. By default the OS language is used. If the OS language is not in the list of languages, the first language will be used. To allow the user to select the language, set `display_language_selector` to `true`.\n\nSee for the complete list of languages.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "customLanguageFiles": { - "description": "A key-value pair where the key is the language and the value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\nSee for an example `.nsh` file.\n\n**Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,", - "type": [ - "object", - "null" - ], - "additionalProperties": { - "type": "string" - } - }, - "displayLanguageSelector": { - "description": "Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. By default the OS language is selected, with a fallback to the first language in the `languages` array.", - "default": false, - "type": "boolean" - }, - "compression": { - "description": "Set the compression algorithm used to compress files in the installer.\n\nSee ", - "anyOf": [ - { - "$ref": "#/definitions/NsisCompression" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - }, - "NSISInstallerMode": { - "description": "Install Modes for the NSIS installer.", - "oneOf": [ - { - "description": "Default mode for the installer.\n\nInstall the app by default in a directory that doesn't require Administrator access.\n\nInstaller metadata will be saved under the `HKCU` registry path.", - "type": "string", - "enum": [ - "currentUser" - ] - }, - { - "description": "Install the app by default in the `Program Files` folder directory requires Administrator access for the installation.\n\nInstaller metadata will be saved under the `HKLM` registry path.", - "type": "string", - "enum": [ - "perMachine" - ] - }, - { - "description": "Combines both modes and allows the user to choose at install time whether to install for the current user or per machine. Note that this mode will require Administrator access even if the user wants to install it for the current user only.\n\nInstaller metadata will be saved under the `HKLM` or `HKCU` registry path based on the user's choice.", - "type": "string", - "enum": [ - "both" - ] - } - ] - }, - "NsisCompression": { - "description": "Compression algorithms used in the NSIS installer.\n\nSee ", - "oneOf": [ - { - "description": "ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.", - "type": "string", - "enum": [ - "zlib" - ] - }, - { - "description": "BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory.", - "type": "string", - "enum": [ - "bzip2" - ] - }, - { - "description": "LZMA (default) is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.", - "type": "string", - "enum": [ - "lzma" - ] - } - ] - }, - "AllowlistConfig": { - "description": "Allowlist configuration. The allowlist is a translation of the [Cargo allowlist features](https://docs.rs/tauri/latest/tauri/#cargo-allowlist-features).\n\n# Notes\n\n- Endpoints that don't have their own allowlist option are enabled by default. - There is only \"opt-in\", no \"opt-out\". Setting an option to `false` has no effect.\n\n# Examples\n\n- * [`\"app-all\": true`](https://tauri.app/v1/api/config/#appallowlistconfig.all) will make the [hide](https://tauri.app/v1/api/js/app#hide) endpoint be available regardless of whether `hide` is set to `false` or `true` in the allowlist.", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all API features.", - "default": false, - "type": "boolean" - }, - "fs": { - "description": "File system API allowlist.", - "default": { - "all": false, - "copyFile": false, - "createDir": false, - "exists": false, - "readDir": false, - "readFile": false, - "removeDir": false, - "removeFile": false, - "renameFile": false, - "scope": [], - "writeFile": false - }, - "allOf": [ - { - "$ref": "#/definitions/FsAllowlistConfig" - } - ] - }, - "window": { - "description": "Window API allowlist.", - "default": { - "all": false, - "center": false, - "close": false, - "create": false, - "hide": false, - "maximize": false, - "minimize": false, - "print": false, - "requestUserAttention": false, - "setAlwaysOnTop": false, - "setClosable": false, - "setContentProtected": false, - "setCursorGrab": false, - "setCursorIcon": false, - "setCursorPosition": false, - "setCursorVisible": false, - "setDecorations": false, - "setFocus": false, - "setFullscreen": false, - "setIcon": false, - "setIgnoreCursorEvents": false, - "setMaxSize": false, - "setMaximizable": false, - "setMinSize": false, - "setMinimizable": false, - "setPosition": false, - "setResizable": false, - "setSize": false, - "setSkipTaskbar": false, - "setTitle": false, - "show": false, - "startDragging": false, - "unmaximize": false, - "unminimize": false - }, - "allOf": [ - { - "$ref": "#/definitions/WindowAllowlistConfig" - } - ] - }, - "shell": { - "description": "Shell API allowlist.", - "default": { - "all": false, - "execute": false, - "open": false, - "scope": [], - "sidecar": false - }, - "allOf": [ - { - "$ref": "#/definitions/ShellAllowlistConfig" - } - ] - }, - "dialog": { - "description": "Dialog API allowlist.", - "default": { - "all": false, - "ask": false, - "confirm": false, - "message": false, - "open": false, - "save": false - }, - "allOf": [ - { - "$ref": "#/definitions/DialogAllowlistConfig" - } - ] - }, - "http": { - "description": "HTTP API allowlist.", - "default": { - "all": false, - "request": false, - "scope": [] - }, - "allOf": [ - { - "$ref": "#/definitions/HttpAllowlistConfig" - } - ] - }, - "notification": { - "description": "Notification API allowlist.", - "default": { - "all": false - }, - "allOf": [ - { - "$ref": "#/definitions/NotificationAllowlistConfig" - } - ] - }, - "globalShortcut": { - "description": "Global shortcut API allowlist.", - "default": { - "all": false - }, - "allOf": [ - { - "$ref": "#/definitions/GlobalShortcutAllowlistConfig" - } - ] - }, - "os": { - "description": "OS allowlist.", - "default": { - "all": false - }, - "allOf": [ - { - "$ref": "#/definitions/OsAllowlistConfig" - } - ] - }, - "path": { - "description": "Path API allowlist.", - "default": { - "all": false - }, - "allOf": [ - { - "$ref": "#/definitions/PathAllowlistConfig" - } - ] - }, - "protocol": { - "description": "Custom protocol allowlist.", - "default": { - "all": false, - "asset": false, - "assetScope": [] - }, - "allOf": [ - { - "$ref": "#/definitions/ProtocolAllowlistConfig" - } - ] - }, - "process": { - "description": "Process API allowlist.", - "default": { - "all": false, - "exit": false, - "relaunch": false, - "relaunchDangerousAllowSymlinkMacos": false - }, - "allOf": [ - { - "$ref": "#/definitions/ProcessAllowlistConfig" - } - ] - }, - "clipboard": { - "description": "Clipboard APIs allowlist.", - "default": { - "all": false, - "readText": false, - "writeText": false - }, - "allOf": [ - { - "$ref": "#/definitions/ClipboardAllowlistConfig" - } - ] - }, - "app": { - "description": "App APIs allowlist.", - "default": { - "all": false, - "hide": false, - "show": false - }, - "allOf": [ - { - "$ref": "#/definitions/AppAllowlistConfig" - } - ] - } - }, - "additionalProperties": false - }, - "FsAllowlistConfig": { - "description": "Allowlist for the file system APIs.\n\nSee more: https://tauri.app/v1/api/config#fsallowlistconfig", - "type": "object", - "properties": { - "scope": { - "description": "The access scope for the filesystem APIs.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/FsAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all file system API features.", - "default": false, - "type": "boolean" - }, - "readFile": { - "description": "Read file from local filesystem.", - "default": false, - "type": "boolean" - }, - "writeFile": { - "description": "Write file to local filesystem.", - "default": false, - "type": "boolean" - }, - "readDir": { - "description": "Read directory from local filesystem.", - "default": false, - "type": "boolean" - }, - "copyFile": { - "description": "Copy file from local filesystem.", - "default": false, - "type": "boolean" - }, - "createDir": { - "description": "Create directory from local filesystem.", - "default": false, - "type": "boolean" - }, - "removeDir": { - "description": "Remove directory from local filesystem.", - "default": false, - "type": "boolean" - }, - "removeFile": { - "description": "Remove file from local filesystem.", - "default": false, - "type": "boolean" - }, - "renameFile": { - "description": "Rename file from local filesystem.", - "default": false, - "type": "boolean" - }, - "exists": { - "description": "Check if path exists on the local filesystem.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FsAllowlistScope": { - "description": "Filesystem scope definition. It is a list of glob patterns that restrict the API access from the webview.\n\nEach pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "anyOf": [ - { - "description": "A list of paths that are allowed by this scope.", - "type": "array", - "items": { - "type": "string" - } - }, - { - "description": "A complete scope configuration.", - "type": "object", - "properties": { - "allow": { - "description": "A list of paths that are allowed by this scope.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "deny": { - "description": "A list of paths that are not allowed by this scope. This gets precedence over the [`Self::Scope::allow`] list.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "requireLiteralLeadingDot": { - "description": "Whether or not paths that contain components that start with a `.` will require that `.` appears literally in the pattern; `*`, `?`, `**`, or `[...]` will not match. This is useful because such files are conventionally considered hidden on Unix systems and it might be desirable to skip them when listing files.\n\nDefaults to `true` on Unix systems and `false` on Windows", - "type": [ - "boolean", - "null" - ] - } - } - } - ] - }, - "WindowAllowlistConfig": { - "description": "Allowlist for the window APIs.\n\nSee more: https://tauri.app/v1/api/config#windowallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all window API features.", - "default": false, - "type": "boolean" - }, - "create": { - "description": "Allows dynamic window creation.", - "default": false, - "type": "boolean" - }, - "center": { - "description": "Allows centering the window.", - "default": false, - "type": "boolean" - }, - "requestUserAttention": { - "description": "Allows requesting user attention on the window.", - "default": false, - "type": "boolean" - }, - "setResizable": { - "description": "Allows setting the resizable flag of the window.", - "default": false, - "type": "boolean" - }, - "setMaximizable": { - "description": "Allows setting whether the window's native maximize button is enabled or not.", - "default": false, - "type": "boolean" - }, - "setMinimizable": { - "description": "Allows setting whether the window's native minimize button is enabled or not.", - "default": false, - "type": "boolean" - }, - "setClosable": { - "description": "Allows setting whether the window's native close button is enabled or not.", - "default": false, - "type": "boolean" - }, - "setTitle": { - "description": "Allows changing the window title.", - "default": false, - "type": "boolean" - }, - "maximize": { - "description": "Allows maximizing the window.", - "default": false, - "type": "boolean" - }, - "unmaximize": { - "description": "Allows unmaximizing the window.", - "default": false, - "type": "boolean" - }, - "minimize": { - "description": "Allows minimizing the window.", - "default": false, - "type": "boolean" - }, - "unminimize": { - "description": "Allows unminimizing the window.", - "default": false, - "type": "boolean" - }, - "show": { - "description": "Allows showing the window.", - "default": false, - "type": "boolean" - }, - "hide": { - "description": "Allows hiding the window.", - "default": false, - "type": "boolean" - }, - "close": { - "description": "Allows closing the window.", - "default": false, - "type": "boolean" - }, - "setDecorations": { - "description": "Allows setting the decorations flag of the window.", - "default": false, - "type": "boolean" - }, - "setAlwaysOnTop": { - "description": "Allows setting the always_on_top flag of the window.", - "default": false, - "type": "boolean" - }, - "setContentProtected": { - "description": "Allows preventing the window contents from being captured by other apps.", - "default": false, - "type": "boolean" - }, - "setSize": { - "description": "Allows setting the window size.", - "default": false, - "type": "boolean" - }, - "setMinSize": { - "description": "Allows setting the window minimum size.", - "default": false, - "type": "boolean" - }, - "setMaxSize": { - "description": "Allows setting the window maximum size.", - "default": false, - "type": "boolean" - }, - "setPosition": { - "description": "Allows changing the position of the window.", - "default": false, - "type": "boolean" - }, - "setFullscreen": { - "description": "Allows setting the fullscreen flag of the window.", - "default": false, - "type": "boolean" - }, - "setFocus": { - "description": "Allows focusing the window.", - "default": false, - "type": "boolean" - }, - "setIcon": { - "description": "Allows changing the window icon.", - "default": false, - "type": "boolean" - }, - "setSkipTaskbar": { - "description": "Allows setting the skip_taskbar flag of the window.", - "default": false, - "type": "boolean" - }, - "setCursorGrab": { - "description": "Allows grabbing the cursor.", - "default": false, - "type": "boolean" - }, - "setCursorVisible": { - "description": "Allows setting the cursor visibility.", - "default": false, - "type": "boolean" - }, - "setCursorIcon": { - "description": "Allows changing the cursor icon.", - "default": false, - "type": "boolean" - }, - "setCursorPosition": { - "description": "Allows setting the cursor position.", - "default": false, - "type": "boolean" - }, - "setIgnoreCursorEvents": { - "description": "Allows ignoring cursor events.", - "default": false, - "type": "boolean" - }, - "startDragging": { - "description": "Allows start dragging on the window.", - "default": false, - "type": "boolean" - }, - "print": { - "description": "Allows opening the system dialog to print the window content.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ShellAllowlistConfig": { - "description": "Allowlist for the shell APIs.\n\nSee more: https://tauri.app/v1/api/config#shellallowlistconfig", - "type": "object", - "properties": { - "scope": { - "description": "Access scope for the binary execution APIs. Sidecars are automatically enabled.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/ShellAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all shell API features.", - "default": false, - "type": "boolean" - }, - "execute": { - "description": "Enable binary execution.", - "default": false, - "type": "boolean" - }, - "sidecar": { - "description": "Enable sidecar execution, allowing the JavaScript layer to spawn a sidecar command, an executable that is shipped with the application. For more information see .", - "default": false, - "type": "boolean" - }, - "open": { - "description": "Open URL with the user's default application.", - "default": false, - "allOf": [ - { - "$ref": "#/definitions/ShellAllowlistOpen" - } - ] - } - }, - "additionalProperties": false - }, - "ShellAllowlistScope": { - "description": "Shell scope definition. It is a list of command names and associated CLI arguments that restrict the API access from the webview.", - "type": "array", - "items": { - "$ref": "#/definitions/ShellAllowedCommand" - } - }, - "ShellAllowedCommand": { - "description": "A command allowed to be executed by the webview API.", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - }, - "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "default": "", - "type": "string" - }, - "args": { - "description": "The allowed arguments for the command execution.", - "default": false, - "allOf": [ - { - "$ref": "#/definitions/ShellAllowedArgs" - } - ] - }, - "sidecar": { - "description": "If this command is a sidecar command.", - "default": false, - "type": "boolean" - } - } - }, - "ShellAllowedArgs": { - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", - "anyOf": [ - { - "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", - "type": "boolean" - }, - { - "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", - "type": "array", - "items": { - "$ref": "#/definitions/ShellAllowedArg" - } - } - ] - }, - "ShellAllowedArg": { - "description": "A command argument allowed to be executed by the webview API.", - "anyOf": [ - { - "description": "A non-configurable argument that is passed to the command in the order it was specified.", - "type": "string" - }, - { - "description": "A variable that is set while calling the command from the webview API.", - "type": "object", - "required": [ - "validator" - ], - "properties": { - "validator": { - "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", - "type": "string" - } - }, - "additionalProperties": false - } - ] - }, - "ShellAllowlistOpen": { - "description": "Defines the `shell > open` api scope.", - "anyOf": [ - { - "description": "If the shell open API should be enabled.\n\nIf enabled, the default validation regex (`^((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+`) is used.", - "type": "boolean" - }, - { - "description": "Enable the shell open API, with a custom regex that the opened path must match against.\n\nIf using a custom regex to support a non-http(s) schema, care should be used to prevent values that allow flag-like strings to pass validation. e.g. `--enable-debugging`, `-i`, `/R`.", - "type": "string" - } - ] - }, - "DialogAllowlistConfig": { - "description": "Allowlist for the dialog APIs.\n\nSee more: https://tauri.app/v1/api/config#dialogallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all dialog API features.", - "default": false, - "type": "boolean" - }, - "open": { - "description": "Allows the API to open a dialog window to pick files.", - "default": false, - "type": "boolean" - }, - "save": { - "description": "Allows the API to open a dialog window to pick where to save files.", - "default": false, - "type": "boolean" - }, - "message": { - "description": "Allows the API to show a message dialog window.", - "default": false, - "type": "boolean" - }, - "ask": { - "description": "Allows the API to show a dialog window with Yes/No buttons.", - "default": false, - "type": "boolean" - }, - "confirm": { - "description": "Allows the API to show a dialog window with Ok/Cancel buttons.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "HttpAllowlistConfig": { - "description": "Allowlist for the HTTP APIs.\n\nSee more: https://tauri.app/v1/api/config#httpallowlistconfig", - "type": "object", - "properties": { - "scope": { - "description": "The access scope for the HTTP APIs.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/HttpAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all HTTP API features.", - "default": false, - "type": "boolean" - }, - "request": { - "description": "Allows making HTTP requests.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "HttpAllowlistScope": { - "description": "HTTP API scope definition. It is a list of URLs that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples: - \"https://*\": allows all HTTPS urls - \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path - \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", - "type": "array", - "items": { - "type": "string", - "format": "uri" - } - }, - "NotificationAllowlistConfig": { - "description": "Allowlist for the notification APIs.\n\nSee more: https://tauri.app/v1/api/config#notificationallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all notification API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "GlobalShortcutAllowlistConfig": { - "description": "Allowlist for the global shortcut APIs.\n\nSee more: https://tauri.app/v1/api/config#globalshortcutallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all global shortcut API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "OsAllowlistConfig": { - "description": "Allowlist for the OS APIs.\n\nSee more: https://tauri.app/v1/api/config#osallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all OS API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "PathAllowlistConfig": { - "description": "Allowlist for the path APIs.\n\nSee more: https://tauri.app/v1/api/config#pathallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all path API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ProtocolAllowlistConfig": { - "description": "Allowlist for the custom protocols.\n\nSee more: https://tauri.app/v1/api/config#protocolallowlistconfig", - "type": "object", - "properties": { - "assetScope": { - "description": "The access scope for the asset protocol.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/FsAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all custom protocols.", - "default": false, - "type": "boolean" - }, - "asset": { - "description": "Enables the asset protocol.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ProcessAllowlistConfig": { - "description": "Allowlist for the process APIs.\n\nSee more: https://tauri.app/v1/api/config#processallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all process APIs.", - "default": false, - "type": "boolean" - }, - "relaunch": { - "description": "Enables the relaunch API.", - "default": false, - "type": "boolean" - }, - "relaunchDangerousAllowSymlinkMacos": { - "description": "Dangerous option that allows macOS to relaunch even if the binary contains a symlink.\n\nThis is due to macOS having less symlink protection. Highly recommended to not set this flag unless you have a very specific reason too, and understand the implications of it.", - "default": false, - "type": "boolean" - }, - "exit": { - "description": "Enables the exit API.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ClipboardAllowlistConfig": { - "description": "Allowlist for the clipboard APIs.\n\nSee more: https://tauri.app/v1/api/config#clipboardallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all clipboard APIs.", - "default": false, - "type": "boolean" - }, - "writeText": { - "description": "Enables the clipboard's `writeText` API.", - "default": false, - "type": "boolean" - }, - "readText": { - "description": "Enables the clipboard's `readText` API.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AppAllowlistConfig": { - "description": "Allowlist for the app APIs.\n\nSee more: https://tauri.app/v1/api/config#appallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all app APIs.", - "default": false, - "type": "boolean" - }, - "show": { - "description": "Enables the app's `show` API.", - "default": false, - "type": "boolean" - }, - "hide": { - "description": "Enables the app's `hide` API.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "SecurityConfig": { - "description": "Security configuration.\n\nSee more: https://tauri.app/v1/api/config#securityconfig", - "type": "object", - "properties": { - "csp": { - "description": "The Content Security Policy that will be injected on all HTML files on the built application. If [`dev_csp`](#SecurityConfig.devCsp) is not specified, this value is also injected on dev.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See .", - "anyOf": [ - { - "$ref": "#/definitions/Csp" - }, - { - "type": "null" - } - ] - }, - "devCsp": { - "description": "The Content Security Policy that will be injected on all HTML files on development.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See .", - "anyOf": [ - { - "$ref": "#/definitions/Csp" - }, - { - "type": "null" - } - ] - }, - "freezePrototype": { - "description": "Freeze the `Object.prototype` when using the custom protocol.", - "default": false, - "type": "boolean" - }, - "dangerousDisableAssetCspModification": { - "description": "Disables the Tauri-injected CSP sources.\n\nAt compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy to only allow loading of your own scripts and styles by injecting nonce and hash sources. This stricts your CSP, which may introduce issues when using along with other flexing sources.\n\nThis configuration option allows both a boolean and a list of strings as value. A boolean instructs Tauri to disable the injection for all CSP injections, and a list of strings indicates the CSP directives that Tauri cannot inject.\n\n**WARNING:** Only disable this if you know what you are doing and have properly configured the CSP. Your application might be vulnerable to XSS attacks without this Tauri protection.", - "default": false, - "allOf": [ - { - "$ref": "#/definitions/DisabledCspModificationKind" - } - ] - }, - "dangerousRemoteDomainIpcAccess": { - "description": "Allow external domains to send command to Tauri.\n\nBy default, external domains do not have access to `window.__TAURI__`, which means they cannot communicate with the commands defined in Rust. This prevents attacks where an externally loaded malicious or compromised sites could start executing commands on the user's device.\n\nThis configuration allows a set of external domains to have access to the Tauri commands. When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed.\n\n**WARNING:** Only use this option if you either have internal checks against malicious external sites or you can trust the allowed external sites. You application might be vulnerable to dangerous Tauri command related attacks otherwise.", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/RemoteDomainAccessScope" - } - }, - "dangerousUseHttpScheme": { - "description": "Sets whether the custom protocols should use `http://.localhost` instead of the default `https://.localhost` on Windows.\n\n**WARNING:** Using a `http` scheme will allow mixed content when trying to fetch `http` endpoints and is therefore less secure but will match the behavior of the `://localhost` protocols used on macOS and Linux.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "Csp": { - "description": "A Content-Security-Policy definition. See .", - "anyOf": [ - { - "description": "The entire CSP policy in a single text string.", - "type": "string" - }, - { - "description": "An object mapping a directive with its sources values as a list of strings.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CspDirectiveSources" - } - } - ] - }, - "CspDirectiveSources": { - "description": "A Content-Security-Policy directive source list. See .", - "anyOf": [ - { - "description": "An inline list of CSP sources. Same as [`Self::List`], but concatenated with a space separator.", - "type": "string" - }, - { - "description": "A list of CSP sources. The collection will be concatenated with a space separator for the CSP string.", - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "DisabledCspModificationKind": { - "description": "The possible values for the `dangerous_disable_asset_csp_modification` config option.", - "anyOf": [ - { - "description": "If `true`, disables all CSP modification. `false` is the default value and it configures Tauri to control the CSP.", - "type": "boolean" - }, - { - "description": "Disables the given list of CSP directives modifications.", - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "RemoteDomainAccessScope": { - "description": "External command access definition.", - "type": "object", - "required": [ - "domain", - "windows" - ], - "properties": { - "scheme": { - "description": "The URL scheme to allow. By default, all schemas are allowed.", - "type": [ - "string", - "null" - ] - }, - "domain": { - "description": "The domain to allow.", - "type": "string" - }, - "windows": { - "description": "The list of window labels this scope applies to.", - "type": "array", - "items": { - "type": "string" - } - }, - "plugins": { - "description": "The list of plugins that are allowed in this scope. The names should be without the `tauri-plugin-` prefix, for example `\"store\"` for `tauri-plugin-store`.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "enableTauriAPI": { - "description": "Enables access to the Tauri API.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "UpdaterConfig": { - "description": "The Updater configuration object.\n\nSee more: https://tauri.app/v1/api/config#updaterconfig", - "type": "object", - "properties": { - "active": { - "description": "Whether the updater is active or not.", - "default": false, - "type": "boolean" - }, - "dialog": { - "description": "Display built-in dialog or use event system if disabled.", - "default": true, - "type": "boolean" - }, - "endpoints": { - "description": "The updater endpoints. TLS is enforced on production.\n\nThe updater URL can contain the following variables: - {{current_version}}: The version of the app that is requesting the update - {{target}}: The operating system name (one of `linux`, `windows` or `darwin`). - {{arch}}: The architecture of the machine (one of `x86_64`, `i686`, `aarch64` or `armv7`).\n\n# Examples - \"https://my.cdn.com/latest.json\": a raw JSON endpoint that returns the latest version and download links for each platform. - \"https://updates.app.dev/{{target}}?version={{current_version}}&arch={{arch}}\": a dedicated API with positional and query string arguments.", - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/definitions/UpdaterEndpoint" - } - }, - "pubkey": { - "description": "Signature public key.", - "default": "", - "type": "string" - }, - "windows": { - "description": "The Windows configuration for the updater.", - "default": { - "installMode": "passive", - "installerArgs": [] - }, - "allOf": [ - { - "$ref": "#/definitions/UpdaterWindowsConfig" - } - ] - } - }, - "additionalProperties": false - }, - "UpdaterEndpoint": { - "description": "A URL to an updater server.\n\nThe URL must use the `https` scheme on production.", - "type": "string", - "format": "uri" - }, - "UpdaterWindowsConfig": { - "description": "The updater configuration for Windows.\n\nSee more: https://tauri.app/v1/api/config#updaterwindowsconfig", - "type": "object", - "properties": { - "installerArgs": { - "description": "Additional arguments given to the NSIS or WiX installer.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "installMode": { - "description": "The installation mode for the update on Windows. Defaults to `passive`.", - "default": "passive", - "allOf": [ - { - "$ref": "#/definitions/WindowsUpdateInstallMode" - } - ] - } - }, - "additionalProperties": false - }, - "WindowsUpdateInstallMode": { - "description": "Install modes for the Windows update.", - "oneOf": [ - { - "description": "Specifies there's a basic UI during the installation process, including a final dialog box at the end.", - "type": "string", - "enum": [ - "basicUi" - ] - }, - { - "description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does.", - "type": "string", - "enum": [ - "quiet" - ] - }, - { - "description": "Specifies unattended mode, which means the installation only shows a progress bar.", - "type": "string", - "enum": [ - "passive" - ] - } - ] - }, - "SystemTrayConfig": { - "description": "Configuration for application system tray icon.\n\nSee more: https://tauri.app/v1/api/config#systemtrayconfig", - "type": "object", - "required": [ - "iconPath" - ], - "properties": { - "iconPath": { - "description": "Path to the default icon to use on the system tray.", - "type": "string" - }, - "iconAsTemplate": { - "description": "A Boolean value that determines whether the image represents a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc) image on macOS.", - "default": false, - "type": "boolean" - }, - "menuOnLeftClick": { - "description": "A Boolean value that determines whether the menu should appear when the tray icon receives a left click on macOS.", - "default": true, - "type": "boolean" - }, - "title": { - "description": "Title for MacOS tray", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "BuildConfig": { - "description": "The Build configuration object.\n\nSee more: https://tauri.app/v1/api/config#buildconfig", - "type": "object", - "properties": { - "runner": { - "description": "The binary used to build and run the application.", - "type": [ - "string", - "null" - ] - }, - "devPath": { - "description": "The path to the application assets or URL to load in development.\n\nThis is usually an URL to a dev server, which serves your application assets with live reloading. Most modern JavaScript bundlers provides a way to start a dev server by default.\n\nSee [vite](https://vitejs.dev/guide/), [Webpack DevServer](https://webpack.js.org/configuration/dev-server/) and [sirv](https://github.com/lukeed/sirv) for examples on how to set up a dev server.", - "default": "http://localhost:8080/", - "allOf": [ - { - "$ref": "#/definitions/AppUrl" - } - ] - }, - "distDir": { - "description": "The path to the application assets or URL to load in production.\n\nWhen a path relative to the configuration file is provided, it is read recursively and all files are embedded in the application binary. Tauri then looks for an `index.html` file unless you provide a custom window URL.\n\nYou can also provide a list of paths to be embedded, which allows granular control over what files are added to the binary. In this case, all files are added to the root and you must reference it that way in your HTML files.\n\nWhen an URL is provided, the application won't have bundled assets and the application will load that URL by default.", - "default": "../dist", - "allOf": [ - { - "$ref": "#/definitions/AppUrl" - } - ] - }, - "beforeDevCommand": { - "description": "A shell command to run before `tauri dev` kicks in.\n\nThe TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.", - "anyOf": [ - { - "$ref": "#/definitions/BeforeDevCommand" - }, - { - "type": "null" - } - ] - }, - "beforeBuildCommand": { - "description": "A shell command to run before `tauri build` kicks in.\n\nThe TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.", - "anyOf": [ - { - "$ref": "#/definitions/HookCommand" - }, - { - "type": "null" - } - ] - }, - "beforeBundleCommand": { - "description": "A shell command to run before the bundling phase in `tauri build` kicks in.\n\nThe TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.", - "anyOf": [ - { - "$ref": "#/definitions/HookCommand" - }, - { - "type": "null" - } - ] - }, - "features": { - "description": "Features passed to `cargo` commands.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "withGlobalTauri": { - "description": "Whether we should inject the Tauri API on `window.__TAURI__` or not.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AppUrl": { - "description": "Defines the URL or assets to embed in the application.", - "anyOf": [ - { - "description": "The app's external URL, or the path to the directory containing the app assets.", - "allOf": [ - { - "$ref": "#/definitions/WindowUrl" - } - ] - }, - { - "description": "An array of files to embed on the app.", - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "BeforeDevCommand": { - "description": "Describes the shell command to run before `tauri dev`.", - "anyOf": [ - { - "description": "Run the given script with the default options.", - "type": "string" - }, - { - "description": "Run the given script with custom options.", - "type": "object", - "required": [ - "script" - ], - "properties": { - "script": { - "description": "The script to execute.", - "type": "string" - }, - "cwd": { - "description": "The current working directory.", - "type": [ - "string", - "null" - ] - }, - "wait": { - "description": "Whether `tauri dev` should wait for the command to finish or not. Defaults to `false`.", - "default": false, - "type": "boolean" - } - } - } - ] - }, - "HookCommand": { - "description": "Describes a shell command to be executed when a CLI hook is triggered.", - "anyOf": [ - { - "description": "Run the given script with the default options.", - "type": "string" - }, - { - "description": "Run the given script with custom options.", - "type": "object", - "required": [ - "script" - ], - "properties": { - "script": { - "description": "The script to execute.", - "type": "string" - }, - "cwd": { - "description": "The current working directory.", - "type": [ - "string", - "null" - ] - } - } - } - ] - }, - "PluginConfig": { - "description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.\n\nSee more: https://tauri.app/v1/api/config#pluginconfig", - "type": "object", - "additionalProperties": true - } - } -} \ No newline at end of file diff --git a/node_modules/@tauri-apps/cli/src/lib.rs b/node_modules/@tauri-apps/cli/src/lib.rs deleted file mode 100644 index 213dd84..0000000 --- a/node_modules/@tauri-apps/cli/src/lib.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use napi::{ - threadsafe_function::{ErrorStrategy, ThreadsafeFunction, ThreadsafeFunctionCallMode}, - Error, JsFunction, Result, Status, -}; - -#[napi_derive::napi] -pub fn run(args: Vec, bin_name: Option, callback: JsFunction) -> Result<()> { - let function: ThreadsafeFunction = callback - .create_threadsafe_function(0, |ctx| ctx.env.get_boolean(ctx.value).map(|v| vec![v]))?; - - // we need to run in a separate thread so Node.js (e.g. vue-cli-plugin-tauri) consumers - // can do work while `tauri dev` is running. - std::thread::spawn(move || match tauri_cli::try_run(args, bin_name) { - Ok(_) => function.call(Ok(true), ThreadsafeFunctionCallMode::Blocking), - Err(e) => function.call( - Err(Error::new(Status::GenericFailure, format!("{:#}", e))), - ThreadsafeFunctionCallMode::Blocking, - ), - }); - - Ok(()) -} - -#[napi_derive::napi] -pub fn log_error(error: String) { - log::error!("{}", error); -} diff --git a/node_modules/@tauri-apps/cli/tauri.js b/node_modules/@tauri-apps/cli/tauri.js deleted file mode 100644 index 8ee5b93..0000000 --- a/node_modules/@tauri-apps/cli/tauri.js +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env node - -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -const cli = require('./main') -const path = require('path') - -const [bin, script, ...args] = process.argv -const binStem = path.parse(bin).name.toLowerCase() - -// We want to make a helpful binary name for the underlying CLI helper, if we -// can successfully detect what command likely started the execution. -let binName - -// deno run -A --unstable --node-modules-dir npm:@tauri-apps/cli -if (bin === '@tauri-apps/cli') { - binName = '@tauri-apps/cli' -} -// Even if started by a package manager, the binary will be NodeJS. -// Some distribution still use "nodejs" as the binary name. -else if (binStem.match(/(nodejs|node|bun)\-?([0-9]*)*$/g)) { - const managerStem = process.env.npm_execpath - ? path.parse(process.env.npm_execpath).name.toLowerCase() - : null - if (managerStem) { - let manager - switch (managerStem) { - // Only supported package manager that has a different filename is npm. - case 'npm-cli': - manager = 'npm' - break - - // Yarn, pnpm, and bun have the same stem name as their bin. - // We assume all unknown package managers do as well. - default: - manager = managerStem - break - } - - binName = `${manager} run ${process.env.npm_lifecycle_event}` - } else { - // Assume running NodeJS if we didn't detect a manager from the env. - // We normalize the path to prevent the script's absolute path being used. - const scriptNormal = path.normalize(path.relative(process.cwd(), script)) - binName = `${binStem} ${scriptNormal}` - } -} else { - // We don't know what started it, assume it's already stripped. - args.unshift(bin) -} - -cli.run(args, binName).catch((err) => { - cli.logError(err.message) - process.exit(1) -}) diff --git a/static/achievements/discord_achievement.png b/static/achievements/discord_achievement.png new file mode 100644 index 0000000..e9dc50d Binary files /dev/null and b/static/achievements/discord_achievement.png differ diff --git a/static/achievements/missing.png b/static/achievements/missing.png new file mode 100644 index 0000000..17da0d6 Binary files /dev/null and b/static/achievements/missing.png differ diff --git a/static/classes/discordmod.png b/static/classes/discordmod.png new file mode 100644 index 0000000..fb49df3 Binary files /dev/null and b/static/classes/discordmod.png differ diff --git a/static/js/game.js b/static/js/game.js index 4e803e1..a0c180e 100644 --- a/static/js/game.js +++ b/static/js/game.js @@ -89,15 +89,20 @@ class NotificationSystem { document.body.appendChild(this.notificationContainer); } - showNotification(message) { + showNotification(message, image = null) { const notificationElement = document.createElement('div'); notificationElement.className = 'custom-notification draggable'; - notificationElement.innerHTML = ` -
-

${message}

- -
- `; + + let content = `
`; + if (image) { + content += `Achievement`; + } + content += ` +

${message}

+ +
`; + + notificationElement.innerHTML = content; const closeButton = notificationElement.querySelector('.close-notification'); closeButton.addEventListener('click', () => this.closeNotification(notificationElement)); @@ -107,6 +112,7 @@ class NotificationSystem { makeDraggable(notificationElement); } + closeNotification(notificationElement) { @@ -115,9 +121,170 @@ class NotificationSystem { } } -// Create a global instance of the NotificationSystem const notificationSystem = new NotificationSystem(); +function handleAchievementUnlock(data) { + const message = `Achievement Unlocked: ${data.name}\n${data.description}`; + notificationSystem.showNotification(message, data.image); + +} + +function fetchUserAchievements() { + const achievementsGrid = document.getElementById('achievementsGrid'); + if (!achievementsGrid) { + console.error('Achievements grid not found'); + return; + } + + if (!currentUser) { + displaySignInMessage(achievementsGrid, 'achievements'); + return; + } + + fetch('/get-user-achievements', { + headers: { + 'Authorization': getSessionToken() + } + }) + .then(response => { + if (!response.ok) { + throw new Error('Network response was not ok'); + } + return response.json(); + }) + .then(achievements => { + if (Array.isArray(achievements) && achievements.length > 0) { + displayUserAchievements(achievements); + } else { + displayNoAchievementsMessage(achievementsGrid); + } + }) + .catch(error => { + console.error('Error fetching user achievements:', error); + displayErrorMessage(achievementsGrid, 'Failed to load achievements. Please try again later.'); + }); +} + +function displaySignInMessage(container, feature) { + container.innerHTML = ` + + `; + document.getElementById('signInButton').addEventListener('click', showLoginForm); +} + +function displayNoAchievementsMessage(container) { + container.innerHTML = ` +
+

You haven't unlocked any achievements yet.

+

Keep playing to earn achievements!

+
+ `; +} + +function displayErrorMessage(container, message) { + container.innerHTML = ` +
+

${message}

+
+ `; +} + + +function displayUserAchievements(achievements) { + const achievementsGrid = document.getElementById('achievementsGrid'); + if (!achievementsGrid) { + console.error('Achievements grid not found'); + return; + } + + achievementsGrid.innerHTML = ''; + achievements.forEach(achievement => { + const achievementElement = document.createElement('div'); + achievementElement.classList.add('achievement'); + achievementElement.innerHTML = `${achievement.name}`; + achievementElement.addEventListener('click', () => showAchievementInfo(achievement)); + achievementElement.addEventListener('mouseover', () => showAchievementInfo(achievement)); + achievementsGrid.appendChild(achievementElement); + }); + + // Show info for the first achievement by default + if (achievements.length > 0) { + showAchievementInfo(achievements[0]); + } +} + +function showAchievementInfo(achievement) { + const image = document.getElementById('achievementImage'); + const name = document.getElementById('achievementName'); + const description = document.getElementById('achievementDescription'); + const unlockedClasses = document.getElementById('unlockedClasses'); + const unlockedSkins = document.getElementById('unlockedSkins'); + + image.src = achievement.image; + name.textContent = achievement.name; + description.textContent = achievement.description; + + unlockedClasses.innerHTML = '
Classes:
'; + if (achievement.unlocked_classes && achievement.unlocked_classes.length > 0) { + achievement.unlocked_classes.forEach(c => { + unlockedClasses.innerHTML += `
${c.name}${c.name}
`; + }); + } else { + unlockedClasses.innerHTML += '

No classes unlocked

'; + } + + unlockedSkins.innerHTML = '
Skins:
'; + if (achievement.unlocked_skins && achievement.unlocked_skins.length > 0) { + achievement.unlocked_skins.forEach(s => { + unlockedSkins.innerHTML += `
${s.name}${s.name}
`; + }); + } else { + unlockedSkins.innerHTML += '

No skins unlocked

'; + } + + // For debugging + debugLog('Achievement:', achievement); +} + +function hideAchievementInfo() { + const infoBox = document.getElementById('achievementInfoBox'); + infoBox.classList.add('hidden'); +} + +document.addEventListener('click', (event) => { + const achievementsTab = document.getElementById('achievements'); + if (achievementsTab && !achievementsTab.contains(event.target)) { + // Optionally hide or reset achievement info here if needed + } +}); + + +function createAchievementsTab() { + const achievementsTab = document.createElement('div'); + achievementsTab.id = 'achievements'; + achievementsTab.classList.add('tab-content'); + achievementsTab.innerHTML = ` +
+
+
+ Achievement +

+

+
+

Unlocks:

+
+
+
+
+
+ `; + return achievementsTab; +} + + function initShop() { let shopButton = document.getElementById('shopButton'); if (!shopButton) { @@ -1160,51 +1327,56 @@ function hideClassSelector() { } function fetchAndDisplayClasses() { - fetch('/get-available-classes') - .then(response => response.json()) - .then(classes => { - // Sort classes: unlocked first, then locked - classes.sort((a, b) => { - if (a.unlocked_by_default === b.unlocked_by_default) return 0; - return a.unlocked_by_default ? -1 : 1; - }); + fetch('/get-available-classes', { + headers: { + 'Authorization': getSessionToken() + } + }) + .then(response => response.json()) + .then(classes => { + // Sort classes: unlocked first, then locked + classes.sort((a, b) => { + if (a.unlocked === b.unlocked) return 0; + return a.unlocked ? -1 : 1; + }); - const classSelector = document.getElementById('classSelector'); - classSelector.innerHTML = ''; - - classes.forEach(playerClass => { - const classOption = document.createElement('div'); - classOption.classList.add('class-option'); - if (playerClass._id === selectedClassId) { - classOption.classList.add('selected'); - } - classOption.innerHTML = `${playerClass.name}`; - - if (!playerClass.unlocked_by_default) { - classOption.classList.add('locked'); - const lockOverlay = document.createElement('div'); - lockOverlay.classList.add('lock-overlay'); - lockOverlay.innerHTML = ''; - classOption.appendChild(lockOverlay); - } - - classOption.addEventListener('click', () => selectClass(playerClass)); - classOption.addEventListener('mouseover', () => displayClassInfo(playerClass)); - classSelector.appendChild(classOption); - }); - - // Display info for the first unlocked class by default - const firstUnlockedClass = classes.find(c => c.unlocked_by_default); - if (firstUnlockedClass) { - displayClassInfo(firstUnlockedClass); - } else if (classes.length > 0) { - displayClassInfo(classes[0]); + const classSelector = document.getElementById('classSelector'); + classSelector.innerHTML = ''; + + classes.forEach(playerClass => { + const classOption = document.createElement('div'); + classOption.classList.add('class-option'); + if (playerClass._id === selectedClassId) { + classOption.classList.add('selected'); } - }) - .catch(error => console.error('Error loading classes:', error)); + classOption.innerHTML = `${playerClass.name}`; + + if (!playerClass.unlocked) { + classOption.classList.add('locked'); + const lockOverlay = document.createElement('div'); + lockOverlay.classList.add('lock-overlay'); + lockOverlay.innerHTML = ''; + classOption.appendChild(lockOverlay); + } + + classOption.addEventListener('click', () => selectClass(playerClass)); + classOption.addEventListener('mouseover', () => displayClassInfo(playerClass)); + classSelector.appendChild(classOption); + }); + + // Display info for the first unlocked class by default + const firstUnlockedClass = classes.find(c => c.unlocked); + if (firstUnlockedClass) { + displayClassInfo(firstUnlockedClass); + } else if (classes.length > 0) { + displayClassInfo(classes[0]); + } + }) + .catch(error => console.error('Error loading classes:', error)); } + function displayClassInfo(playerClass) { const classImage = document.getElementById('classImage'); const className = document.getElementById('className'); @@ -1726,10 +1898,35 @@ document.querySelectorAll('.close-button').forEach(button => { }); }); -// Modify the showWidget function function showWidget() { uiWidget.classList.add('visible'); openInterfaces.menu = true; + + // Add Achievements tab if it doesn't exist + if (!document.getElementById('achievements')) { + const achievementsTab = createAchievementsTab(); + const widgetContent = uiWidget.querySelector('.widget-content'); + if (widgetContent) { + widgetContent.appendChild(achievementsTab); + } else { + console.error('Widget content container not found'); + } + + // Add Achievements button to tab buttons + const tabButtons = uiWidget.querySelector('.widget-tabs'); + if (tabButtons) { + const achievementsButton = document.createElement('button'); + achievementsButton.classList.add('tab-button'); + achievementsButton.setAttribute('data-tab', 'achievements'); + achievementsButton.textContent = 'Achievements'; + tabButtons.appendChild(achievementsButton); + + achievementsButton.addEventListener('click', () => showTab('achievements')); + } else { + console.error('Widget tabs container not found'); + } + } + if (gameStarted && player) { pausePlayer(); showTab('settings'); // Open the Settings tab by default when in-game @@ -1739,6 +1936,7 @@ function showWidget() { updateAccountTab(); } + function updateAccountTab() { const accountContent = document.getElementById('accountContent'); if (currentUser) { @@ -1935,7 +2133,9 @@ function showTab(tabName) { if (tabName === 'customization') { onCustomizationTabOpen(); } else if (tabName === 'account') { - updateAccountTab(); // Update account tab content when selected + updateAccountTab(); + } else if (tabName === 'achievements') { + fetchUserAchievements(); } } @@ -1966,6 +2166,7 @@ function startGame() { }); }); + socket.on('achievement_unlocked', handleAchievementUnlock); socket.on('reconnect', (attemptNumber) => { @@ -3104,13 +3305,8 @@ function drawGameObjects() { function selectClass(playerClass) { - if (!playerClass.unlocked_by_default && currentUser === null) { - notificationSystem.showNotification('You need to be logged in to select this class.'); - return; - } - - if (!playerClass.unlocked_by_default) { - showUnlockRequirements(playerClass); + if (!playerClass.unlocked) { + notificationSystem.showNotification('This class is locked. Unlock it to select.'); return; } @@ -3118,7 +3314,7 @@ function selectClass(playerClass) { const classSelector = document.getElementById('classSelector'); const classOptions = classSelector.querySelectorAll('.class-option'); classOptions.forEach(option => option.classList.remove('selected')); - const selectedOption = classSelector.querySelector(`.class-option:nth-child(${Array.from(classOptions).indexOf(event.currentTarget) + 1})`); + const selectedOption = Array.from(classOptions).find(option => option.querySelector('img').alt === playerClass.name); if (selectedOption) { selectedOption.classList.add('selected'); } @@ -3129,21 +3325,29 @@ function selectClass(playerClass) { method: 'POST', headers: { 'Content-Type': 'application/json', + 'Authorization': getSessionToken() }, - body: JSON.stringify({ username: currentUser, class_id: selectedClassId }), + body: JSON.stringify({ class_id: selectedClassId }), + }) + .then(response => { + if (!response.ok) { + return response.json().then(data => { + throw new Error(data.error || 'Failed to select class'); + }); + } + return response.json(); }) - .then(response => response.json()) .then(data => { if (data.success) { debugLog('Class selected successfully'); + notificationSystem.showNotification(`${playerClass.name} class selected successfully!`); } else { - console.error('Failed to select class:', data.error); - notificationSystem.showNotification('Failed to select class. Please try again.'); + throw new Error(data.error || 'Failed to select class'); } }) .catch(error => { - console.error('Error selecting class:', error); - notificationSystem.showNotification('An error occurred while selecting the class. Please try again.'); + console.error('Error selecting class:', error.message); + notificationSystem.showNotification(`Failed to select class: ${error.message}`); }); } } diff --git a/static/styles.css b/static/styles.css index 3c87409..e9ae9d1 100644 --- a/static/styles.css +++ b/static/styles.css @@ -1296,6 +1296,146 @@ body { z-index: 2000; } +.achievements-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); + gap: 10px; + padding: 10px; + height: 100%; + overflow-y: auto; + flex: 1; +} + +#achievementsContainer { + height: 100%; + overflow-y: auto; +} + +.achievements-container { + display: flex; + height: 100%; +} + + + +.achievement { + width: 80px; + height: 80px; + border: 2px solid #00ffff; + border-radius: 10px; + overflow: hidden; + cursor: pointer; + transition: transform 0.2s; +} + +.achievement:hover { + transform: scale(1.1); +} + +.achievement img { + width: 100%; + height: 100%; + object-fit: cover; +} + + +.achievement-info-box { + width: 300px; + padding: 20px; + background-color: rgba(18, 4, 88, 0.8); + border-left: 2px solid #00ffff; + overflow-y: auto; +} + +.achievement-info-box.hidden { + display: none; +} + +.achievement-info-box img { + width: 100px; + height: 100px; + object-fit: cover; + border-radius: 10px; + margin-bottom: 10px; +} + +.achievement-info-box h3 { + color: #00ffff; + margin-bottom: 10px; +} + +.achievement-info-box p { + color: #ffffff; + margin-bottom: 20px; +} + +#achievementUnlocks h4 { + color: #00ffff; + margin-bottom: 10px; +} + +#achievementUnlocks h5 { + color: #00ffff; + margin-top: 10px; + margin-bottom: 5px; +} + +.sign-in-message, +.no-achievements-message, +.error-message { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100%; + text-align: center; + color: #ffffff; + font-family: 'Orbitron', sans-serif; +} + +.sign-in-message p, +.no-achievements-message p, +.error-message p { + margin-bottom: 20px; +} + +.glowing-button { + background-color: transparent; + border: 2px solid #00ffff; + color: #00ffff; + padding: 10px 20px; + font-size: 16px; + font-family: 'Orbitron', sans-serif; + cursor: pointer; + transition: all 0.3s ease; + box-shadow: 0 0 10px #00ffff; +} + +.glowing-button:hover { + background-color: #00ffff; + color: #000000; + box-shadow: 0 0 20px #00ffff; +} + + + +.unlock-item { + display: flex; + align-items: center; + margin-bottom: 5px; +} + +.unlock-item img { + width: 30px; + height: 30px; + object-fit: cover; + margin-right: 10px; +} + +.unlock-item span { + color: #ffffff; +} + .custom-notification { background-color: rgba(18, 4, 88, 0.9); color: #00ffff;