Achievements added. Updates to frontend and backend. Basic testing completed, but may be some bugs, further testing required. Basic achievement added for linking discord account. Reward for achievements added too - Discord linking gives you a Discord Mod Class.

This commit is contained in:
Jamon 2024-08-09 19:19:47 +12:00
parent 6cc8afe4e9
commit b4ffcbed2a
28 changed files with 526 additions and 4892 deletions

1
.gitignore vendored
View File

@ -14,5 +14,6 @@ package.json
package-lock.json
favicon_io.zip
classcreator.py
achievements.py
*token*
*.secret

View File

@ -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()

View File

@ -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():
</script>
"""
@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
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
user = users_collection.find_one({'username': username})
if not user:
return jsonify({'error': 'User not found'}), 404
# Update the user's selected class
result = users_collection.update_one(
{'_id': ObjectId(current_user_id)},
{'$set': {'selected_class': ObjectId(class_id)}}
)
# 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 username:
users_collection.update_one(
{'username': username},
{'$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 = {

16
node_modules/.bin/tauri generated vendored
View File

@ -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

17
node_modules/.bin/tauri.cmd generated vendored
View File

@ -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" %*

28
node_modules/.bin/tauri.ps1 generated vendored
View File

@ -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

52
node_modules/.package-lock.json generated vendored
View File

@ -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"
}
}
}
}

View File

@ -1,3 +0,0 @@
# `@tauri-apps/cli-win32-x64-msvc`
This is the **x86_64-pc-windows-msvc** binary for `@tauri-apps/cli`

View File

@ -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=<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-<version>` 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

View File

@ -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"]

View File

@ -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

View File

@ -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.

View File

@ -1,43 +0,0 @@
# @tauri-apps/cli
<img align="right" src="https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" height="128" width="128">
[![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)

View File

@ -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();
}

View File

@ -1,7 +0,0 @@
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export function run(args: Array<string>, binName: string | undefined | null, callback: (...args: any[]) => any): void
export function logError(error: string): void

258
node_modules/@tauri-apps/cli/index.js generated vendored
View File

@ -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

View File

@ -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: ['<rootDir>/test/jest/jest.setup.js'],
testMatch: [
'<rootDir>/test/jest/__tests__/**/*.spec.js',
'<rootDir>/test/jest/__tests__/**/*.test.js'
],
moduleFileExtensions: ['ts', 'js', 'json'],
moduleNameMapper: {
'^~/(.*)$': '<rootDir>/$1'
},
transform: {
'\\.toml$': 'jest-transform-toml'
}
}

View File

@ -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<string>, binName: string | undefined | null): Promise<void>

19
node_modules/@tauri-apps/cli/main.js generated vendored
View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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<String>, bin_name: Option<String>, callback: JsFunction) -> Result<()> {
let function: ThreadsafeFunction<bool, ErrorStrategy::CalleeHandled> = 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);
}

View File

@ -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)
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -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 = `
<div class="notification-content">
<p>${message}</p>
<button class="close-notification">Close</button>
</div>
`;
let content = `<div class="notification-content">`;
if (image) {
content += `<img src="${image}" alt="Achievement" class="notification-image">`;
}
content += `
<p>${message}</p>
<button class="close-notification">Close</button>
</div>`;
notificationElement.innerHTML = content;
const closeButton = notificationElement.querySelector('.close-notification');
closeButton.addEventListener('click', () => this.closeNotification(notificationElement));
@ -109,15 +114,177 @@ class NotificationSystem {
}
closeNotification(notificationElement) {
notificationElement.classList.remove('show');
setTimeout(() => notificationElement.remove(), 300);
}
}
// 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 = `
<div class="sign-in-message">
<p>Please sign in to view your ${feature}.</p>
<button id="signInButton" class="glowing-button">Sign In</button>
</div>
`;
document.getElementById('signInButton').addEventListener('click', showLoginForm);
}
function displayNoAchievementsMessage(container) {
container.innerHTML = `
<div class="no-achievements-message">
<p>You haven't unlocked any achievements yet.</p>
<p>Keep playing to earn achievements!</p>
</div>
`;
}
function displayErrorMessage(container, message) {
container.innerHTML = `
<div class="error-message">
<p>${message}</p>
</div>
`;
}
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 = `<img src="${achievement.image}" alt="${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 = '<h5>Classes:</h5>';
if (achievement.unlocked_classes && achievement.unlocked_classes.length > 0) {
achievement.unlocked_classes.forEach(c => {
unlockedClasses.innerHTML += `<div class="unlock-item"><img src="${c.image}" alt="${c.name}"><span>${c.name}</span></div>`;
});
} else {
unlockedClasses.innerHTML += '<p>No classes unlocked</p>';
}
unlockedSkins.innerHTML = '<h5>Skins:</h5>';
if (achievement.unlocked_skins && achievement.unlocked_skins.length > 0) {
achievement.unlocked_skins.forEach(s => {
unlockedSkins.innerHTML += `<div class="unlock-item"><img src="${s.image}" alt="${s.name}"><span>${s.name}</span></div>`;
});
} else {
unlockedSkins.innerHTML += '<p>No skins unlocked</p>';
}
// 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 = `
<div class="achievements-container">
<div id="achievementsGrid" class="achievements-grid"></div>
<div id="achievementInfoBox" class="achievement-info-box">
<img id="achievementImage" src="" alt="Achievement">
<h3 id="achievementName"></h3>
<p id="achievementDescription"></p>
<div id="achievementUnlocks">
<h4>Unlocks:</h4>
<div id="unlockedClasses"></div>
<div id="unlockedSkins"></div>
</div>
</div>
</div>
`;
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 = '';
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 = `<img src="${playerClass.image_source}" alt="${playerClass.name}">`;
if (!playerClass.unlocked_by_default) {
classOption.classList.add('locked');
const lockOverlay = document.createElement('div');
lockOverlay.classList.add('lock-overlay');
lockOverlay.innerHTML = '<i class="fas fa-lock"></i>';
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]);
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 = `<img src="${playerClass.image_source}" alt="${playerClass.name}">`;
if (!playerClass.unlocked) {
classOption.classList.add('locked');
const lockOverlay = document.createElement('div');
lockOverlay.classList.add('lock-overlay');
lockOverlay.innerHTML = '<i class="fas fa-lock"></i>';
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}`);
});
}
}

View File

@ -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;