diff --git a/.editorconfig b/.editorconfig index bcf8005..b56ce51 100644 --- a/.editorconfig +++ b/.editorconfig @@ -133,3 +133,34 @@ resharper_place_attribute_on_same_line = false # dotnet options #dotnet_sort_system_directives_first = true #dotnet_separate_import_directive_groups = false + +# dotnet field naming rules +dotnet_naming_rule.private_constants_rule.severity = error +dotnet_naming_rule.private_constants_rule.style = k_upper_camel_case_style +dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols +dotnet_naming_rule.private_instance_fields_rule.severity = error +dotnet_naming_rule.private_instance_fields_rule.style = m_upper_camel_case_style +dotnet_naming_rule.private_instance_fields_rule.symbols = private_instance_fields_symbols +dotnet_naming_rule.private_static_fields_rule.severity = error +dotnet_naming_rule.private_static_fields_rule.style = s_upper_camel_case_style +dotnet_naming_rule.private_static_fields_rule.symbols = private_static_fields_symbols +dotnet_naming_rule.private_static_readonly_rule.severity = error +dotnet_naming_rule.private_static_readonly_rule.style = k_upper_camel_case_style +dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols +dotnet_naming_style.k_upper_camel_case_style.capitalization = pascal_case +dotnet_naming_style.k_upper_camel_case_style.required_prefix = k_ +dotnet_naming_style.m_upper_camel_case_style.capitalization = pascal_case +dotnet_naming_style.m_upper_camel_case_style.required_prefix = m_ +dotnet_naming_style.s_upper_camel_case_style.capitalization = pascal_case +dotnet_naming_style.s_upper_camel_case_style.required_prefix = s_ +dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field +dotnet_naming_symbols.private_constants_symbols.required_modifiers = const +dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds = field +dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds = field +dotnet_naming_symbols.private_static_fields_symbols.required_modifiers = static +dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field +dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static, readonly diff --git a/CHANGELOG.md b/CHANGELOG.md index 3331408..9e7fafc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,46 @@ All notable changes to UGS CLI will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +# [1.0.0-beta.5] - 2023-06-28 + +### Added +- Added Batching to import and deploy to help prevent "Too Many Requests" error. +- Cloud Code Modules now supports `import` and `export` commands. +- Cloud Code Scripts now supports `import` and `export` commands. +- Lobby now supports `import` and `export` commands. +- Leaderboard now supports `import` and `export` commands. +- Remote Config now supports `import` and `export` commands. +- Alpine build now added to the release. +- New option `--services` to deploy and fetch commands. This option perform commands only to specified services. + * **[Breaking Change]** This option is mandatory when using the `--reconcile` flag. + +### Changed +- **[Breaking Change]** CloudCode `list` command for Modules and Scripts is more descriptive. +- Using standardized output for all Import/Export implementations. +- Plain text Deploy/Fetch Output now prints full path. + * This is to disambiguate output regarding files with same name, but different path. +- **[Breaking Change]** Messages are directed to StdErr and Output into Stdout. + * This allows to pipe individual parts such as `ugs cmd 1>output 2>logs.txt`. + * In both json and regular formats. +- **[Breaking Change]** Cloud Code create, delete, get, list, new-file, publish and update commands are now under a parent command `scripts` and can be called with `cloud-code scripts `. + +### Fixed +- CloudCode files that failed to read now reported properly in the output. +- CloudCode deleted files properly reported in the Deploy output. +- RemoteConfig Entries properly reported in the Deploy output. +- RemoteConfig Fetch properly bubbles issues in loading files. +- **[Breaking Change]** Deploy and Fetch output have been modified to match each other. + * Status have been updated to reflect what is happening in the editor. +- An issue where fetching a file from Cloud Code that had no parameters would keep appending `module.exports.parameters = {}`. +- Using Cloud Code fetch and deploy multiple times does not keep appending new lines anymore. +- Improved error handling to provide more detail on certain unhandled exceptions. +- Cloud Code script with invalid parameters will fail to fetch and show in the "failed" result section. + ## [1.0.0-beta.4] - 2023-04-24 ### Added - npm distribution. Install the CLI by running `npm install -g ugs`. -- new-file command for economy - `ugs fetch` now supports cloud code scripts. - Get player command in Player Module. Run `ugs player get -h` to show usage. - List player command in Player Module. Run `ugs player list -h` to show usage. @@ -21,6 +55,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - **[Breaking Change]** Replace Jint with Node.js for cloud code javascript parameter parsing. User will need to install Node.js with version > 14.0.0 to parse cloud code javascript. - Updated Diagnostics to use UnityAnalyticSender instead of TelemetrySender +- Add support for `import` and `export` commands to the Lobby module. ### Fixed diff --git a/Samples/Deploy/Economy/resource.ec b/Samples/Deploy/Economy/resource.ec new file mode 100644 index 0000000..70335a9 --- /dev/null +++ b/Samples/Deploy/Economy/resource.ec @@ -0,0 +1,8 @@ +{ + "id": "GOLD", + "name": "Gold", + "type": "CURRENCY", + "initial": 10, + "max": 1000, + "customData": null +} diff --git a/Samples/Deploy/instructions.md b/Samples/Deploy/instructions.md index ad4677b..dd2a31e 100644 --- a/Samples/Deploy/instructions.md +++ b/Samples/Deploy/instructions.md @@ -57,6 +57,30 @@ To create a deployable remote config file, you need a `.rc` file with the follow ``` Please take [configuration.rc] as an example. For more details, please check [Remote Config files]. +## Deploy Economy + +Run command from [Samples/Deploy] directory: +``` +ugs deploy ./Economy +``` +You will find the resource from [resource.ec] published in your dashboard for the configured project and environment. + +### Create Economy Files: + +To create a deployable economy file, you need a `.ec` file with the following pattern: +```Json +{ + "id": "GOLD", + "name": "Gold", + "type": "CURRENCY", + "initial": 10, + "max": 1000, + "customData": null +} +``` +Please take [resource.ec] as an example. There are other patterns for Inventory item, virtual and real money purchase, for more details, please check [Economy resource schemas]. + + ## Deploy all Samples Run command from [Samples/Deploy] directory: ``` @@ -67,9 +91,11 @@ You will find all the contents deployed in your dashboard for the configured pro --- [`deploy`]: https://services.docs.unity.com/guides/ugs-cli/latest/general/base-commands/deploy [Remote Config files]: https://docs.unity3d.com/Packages/com.unity.remote-config@3.3/manual/Authoring/remote_config_files.html +[Economy resource schemas]: https://services.docs.unity.com/economy-admin/v2#tag/Economy-Admin/operation/addConfigResource [Declare parameters in the script]: https://docs.unity.com/cloud-code/authoring-scripts-editor.html#Declare_parameters_in_the_script [Script.js]: /Samples/Deploy/CloudCode/Script.js [configuration.rc]: /Samples/Deploy/RemoteConfig/configuration.rc +[resource.ec]: /Samples/Deploy/Economy/resource.ec [Samples/Deploy]: /Samples/Deploy [Deploy Command]: https://services.docs.unity.com/guides/ugs-cli/latest/general/troubleshooting/project-roles#deploy-command [Service Account]: https://services.docs.unity.com/docs/service-account-auth/index.html diff --git a/Third Party Notices.md b/Third Party Notices.md index 68b9211..ff5cf69 100644 --- a/Third Party Notices.md +++ b/Third Party Notices.md @@ -1,5 +1,73 @@ # This package contains third-party software components governed by the license(s) indicated below: +Component Name: Polly + +License Type: BSD 3-Clause License + +Copyright (c) 2015-2023, App vNext + +https://github.com/App-vNext/Polly/blob/main/LICENSE + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +
+ +Component Name: Polly.Extensions.Http + +License Type: New BSD License + +Copyright (c) 2015-2018, App vNext +All rights reserved. + +https://github.com/App-vNext/Polly.Extensions.Http/blob/master/LICENSE.txt + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +* Neither the name of App vNext nor the +names of its contributors may be used to endorse or promote products +derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +
+ Component Name: Coverlet License Type: MIT diff --git a/Unity.Services.Cli/.run/Cli.run.xml b/Unity.Services.Cli/.run/Cli.run.xml index 864c9b0..1c779dc 100644 --- a/Unity.Services.Cli/.run/Cli.run.xml +++ b/Unity.Services.Cli/.run/Cli.run.xml @@ -17,4 +17,4 @@