From e83b5303bc0af88a598901d6240ea481acba4f7a Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Mon, 18 Mar 2024 09:54:48 +0100 Subject: [PATCH 1/6] Engineering - cleanup TSA pipeline template parameter (#100) --- azure-pipelines.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 76a6377..6f41aa9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,7 +24,7 @@ extends: template: azure-pipelines/extension/stable.yml@templates parameters: publishExtension: ${{ parameters.publishExtension }} - + l10nSourcePaths: ./src buildSteps: @@ -41,15 +41,7 @@ extends: displayName: Test extension tsa: - enabled: true - options: - codebaseName: 'devdiv_$(Build.Repository.Name)' + config: + areaPath: 'Visual Studio Code Miscellaneous Extensions' serviceTreeID: 'c8cb03c6-176e-40dd-90a5-518de08666dc' - instanceUrl: 'https://devdiv.visualstudio.com/defaultcollection' - projectName: 'DevDiv' - areaPath: 'DevDiv\\VS Code (compliance tracking only)\\Visual Studio Code Miscellaneous Extensions' - notificationAliases: - - 'stbatt@microsoft.com' - - 'lszomoru@microsoft.com' - - 'chrmarti@microsoft.com' - + enabled: true From 133cd3332ce4f03eae3fac039a4cad3ee3bc5a57 Mon Sep 17 00:00:00 2001 From: "Nikola R. Hristov" Date: Wed, 1 May 2024 02:45:04 +0300 Subject: [PATCH 2/6] squash! --- .devcontainer/Dockerfile | 29 --- .devcontainer/devcontainer.json | 5 - .devcontainer/docker-compose.test.yml | 13 -- .github/assignment.yml | 4 - .github/needs_more_info.yml | 6 - .vscode/launch.json | 17 -- .vscode/settings.json | 10 - .vscode/tasks.json | 20 -- {src => Source}/azService.ts | 0 {src => Source}/extension.ts | 0 {src => Source}/parser.ts | 0 {src => Source}/utils.ts | 0 package-lock.json | 111 ---------- package.json | 306 +++++++++++++------------- service/tests/__init__.py | 4 - service/tests/test_tooling.py | 129 ----------- 16 files changed, 156 insertions(+), 498 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/devcontainer.json delete mode 100644 .devcontainer/docker-compose.test.yml delete mode 100644 .github/assignment.yml delete mode 100644 .github/needs_more_info.yml delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/settings.json delete mode 100644 .vscode/tasks.json rename {src => Source}/azService.ts (100%) rename {src => Source}/extension.ts (100%) rename {src => Source}/parser.ts (100%) rename {src => Source}/utils.ts (100%) delete mode 100644 package-lock.json delete mode 100644 service/tests/__init__.py delete mode 100644 service/tests/test_tooling.py diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 1ca151e..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -#------------------------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. -#------------------------------------------------------------------------------------------------------------- - -FROM debian:latest -# FROM debian:8 - -# Avoid warnings by switching to noninteractive -ENV DEBIAN_FRONTEND=noninteractive - -# Configure apt and install packages -RUN apt-get update \ - && apt-get -y install --no-install-recommends apt-utils 2>&1 \ - # - # Install the Azure CLI - && apt-get install -y apt-transport-https curl gnupg2 lsb-release \ - && echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \ - && curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \ - && apt-get update - -RUN apt-get install -y azure-cli -# RUN apt-get install -y azure-cli=2.0.67-1~jessie -# RUN apt-get install -y azure-cli=2.0.64-1~jessie -# RUN apt-get install -y azure-cli=2.0.63-1~jessie -# RUN apt-get install -y azure-cli=2.0.26-1~jessie - -# Switch back to dialog for any ad-hoc use of apt-get -ENV DEBIAN_FRONTEND=dialog diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 4a62381..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,5 +0,0 @@ -// See https://aka.ms/vscode-remote/devcontainer.json for format details. -{ - "name": "Azure CLI", - "dockerFile": "Dockerfile", -} \ No newline at end of file diff --git a/.devcontainer/docker-compose.test.yml b/.devcontainer/docker-compose.test.yml deleted file mode 100644 index 50626d7..0000000 --- a/.devcontainer/docker-compose.test.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: '3.4' -services: - vscode-azurecli-test: - build: - context: . - dockerfile: Dockerfile - working_dir: "/workspace" - volumes: - - "${PWD}:/workspace" - command: "./service/run_tests" - -# docker-compose -f .devcontainer/docker-compose.test.yml build --no-cache --pull -# docker-compose -f .devcontainer/docker-compose.test.yml run vscode-azurecli-test diff --git a/.github/assignment.yml b/.github/assignment.yml deleted file mode 100644 index 3cdafa3..0000000 --- a/.github/assignment.yml +++ /dev/null @@ -1,4 +0,0 @@ -{ - perform: true, - assignees: [ chrisdias, chrmarti ] -} diff --git a/.github/needs_more_info.yml b/.github/needs_more_info.yml deleted file mode 100644 index e5b2cdd..0000000 --- a/.github/needs_more_info.yml +++ /dev/null @@ -1,6 +0,0 @@ -{ - daysUntilClose: 7, - needsMoreInfoLabel: 'needs more info', - perform: true, - closeComment: "This issue has been closed automatically because it needs more information and has not had recent activity. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!" -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 8160068..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,17 +0,0 @@ -// A launch configuration that compiles the extension and then opens it inside a new window -{ - "version": "0.1.0", - "configurations": [ - { - "name": "Launch Extension", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": ["--extensionDevelopmentPath=${workspaceRoot}" ], - "stopOnEntry": false, - "sourceMaps": true, - "outFiles": [ "${workspaceRoot}/out/src/**/*.js" ], - "preLaunchTask": "npm: watch" - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 67f8e75..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,10 +0,0 @@ -// Place your settings in this file to overwrite default and user settings. -{ - "files.exclude": { - "out": false // set this to true to hide the "out" folder with the compiled JS files - }, - "search.exclude": { - "out": true // set this to false to include "out" folder in search results - }, - "python.pythonPath": "~/lib/azure-cli/bin/python" -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 604e38f..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,20 +0,0 @@ -// See https://go.microsoft.com/fwlink/?LinkId=733558 -// for the documentation about the tasks.json format -{ - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "watch", - "problemMatcher": "$tsc-watch", - "isBackground": true, - "presentation": { - "reveal": "never" - }, - "group": { - "kind": "build", - "isDefault": true - } - } - ] -} \ No newline at end of file diff --git a/src/azService.ts b/Source/azService.ts similarity index 100% rename from src/azService.ts rename to Source/azService.ts diff --git a/src/extension.ts b/Source/extension.ts similarity index 100% rename from src/extension.ts rename to Source/extension.ts diff --git a/src/parser.ts b/Source/parser.ts similarity index 100% rename from src/parser.ts rename to Source/parser.ts diff --git a/src/utils.ts b/Source/utils.ts similarity index 100% rename from src/utils.ts rename to Source/utils.ts diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 291192e..0000000 --- a/package-lock.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "name": "azurecli", - "version": "0.6.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "azurecli", - "version": "0.6.0", - "license": "MIT", - "dependencies": { - "elegant-spinner": "2.0.0", - "jmespath": "0.15.0", - "semver": "7.5.2" - }, - "devDependencies": { - "@types/jmespath": "0.15.0", - "@types/node": "10.14.1", - "@types/semver": "5.5.0", - "@types/vscode": "^1.75.0", - "typescript": "^5.3.3" - }, - "engines": { - "vscode": "^1.75.0" - } - }, - "node_modules/@types/jmespath": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@types/jmespath/-/jmespath-0.15.0.tgz", - "integrity": "sha1-SgFikJaoYjHIkaDi3szBX1PJKR0=", - "dev": true - }, - "node_modules/@types/node": { - "version": "10.14.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.1.tgz", - "integrity": "sha512-Rymt08vh1GaW4vYB6QP61/5m/CFLGnFZP++bJpWbiNxceNa6RBipDmb413jvtSf/R1gg5a/jQVl2jY4XVRscEA==", - "dev": true - }, - "node_modules/@types/semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==", - "dev": true - }, - "node_modules/@types/vscode": { - "version": "1.85.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.85.0.tgz", - "integrity": "sha512-CF/RBon/GXwdfmnjZj0WTUMZN5H6YITOfBCP4iEZlOtVQXuzw6t7Le7+cR+7JzdMrnlm7Mfp49Oj2TuSXIWo3g==", - "dev": true - }, - "node_modules/elegant-spinner": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-2.0.0.tgz", - "integrity": "sha512-5YRYHhvhYzV/FC4AiMdeSIg3jAYGq9xFvbhZMpPlJoBsfYgrw2DSCYeXfat6tYBu45PWiyRr3+flaCPPmviPaA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jmespath": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", - "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=", - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } -} diff --git a/package.json b/package.json index 191899e..1f99211 100644 --- a/package.json +++ b/package.json @@ -1,152 +1,158 @@ { - "name": "azurecli", - "displayName": "Azure CLI Tools", - "description": "Tools for developing and running commands of the Azure CLI.", - "version": "0.6.0", - "icon": "images/azure_icon.png", - "publisher": "ms-vscode", - "repository": { - "type": "git", - "url": "https://github.com/Microsoft/vscode-azurecli.git" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/Microsoft/vscode-azurecli/issues" - }, - "engines": { - "vscode": "^1.75.0" - }, - "categories": [ - "Programming Languages", - "Snippets", - "Azure" - ], - "main": "./out/src/extension", - "l10n": "./l10n", - "contributes": { - "languages": [ - { - "id": "azcli", - "aliases": [ - "Azure CLI Scrapbook", - "azcli" - ], - "extensions": [ - ".azcli" - ], - "configuration": "./language-configuration.json" - } - ], - "grammars": [ - { - "language": "azcli", - "scopeName": "source.azcli", - "path": "./syntaxes/azcli.tmLanguage.json" - } - ], - "commands": [ - { - "category": "Azure CLI", - "command": "ms-azurecli.runLineInTerminal", - "title": "%runLineInTerminal.title%" - }, - { - "category": "Azure CLI", - "command": "ms-azurecli.runLineInEditor", - "title": "%runLineInEditor.title%" - }, - { - "category": "Azure CLI", - "command": "ms-azurecli.toggleLiveQuery", - "title": "%toggleLiveQuery.title%" - }, - { - "category": "Azure CLI", - "command": "ms-azurecli.installAzureCLI", - "title": "%installAzureCLI.title%" - } - ], - "keybindings": [ - { - "command": "ms-azurecli.runLineInTerminal", - "key": "ctrl+'", - "mac": "cmd+'", - "when": "editorTextFocus && editorLangId == 'azcli'" - }, - { - "command": "ms-azurecli.runLineInEditor", - "key": "ctrl+shift+'", - "mac": "cmd+shift+'", - "when": "editorTextFocus && editorLangId == 'azcli'" - }, - { - "command": "ms-azurecli.toggleLiveQuery", - "key": "ctrl+;", - "mac": "cmd+;", - "when": "editorTextFocus && editorLangId == 'azcli'" - } - ], - "configuration": { - "type": "object", - "title": "%configuration.title%", - "properties": { - "azureCLI.showResultInNewEditor": { - "type": "boolean", - "default": false, - "scope": "resource", - "description": "%azureCLI.showResultInNewEditor.description%" - }, - "azureCLI.lineContinuationCharacter": { - "type": "string", - "default": "", - "scope": "resource", - "description": "%azureCLI.lineContinuationCharacter.description%" - } - } - }, - "menus": { - "editor/context": [ - { - "command": "ms-azurecli.runLineInTerminal", - "group": "2_run", - "when": "editorLangId == 'azcli'" - }, - { - "command": "ms-azurecli.runLineInEditor", - "group": "2_run", - "when": "editorLangId == 'azcli'" - } - ], - "commandPalette": [ - { - "command": "ms-azurecli.runLineInTerminal", - "when": "editorLangId == 'azcli'" - }, - { - "command": "ms-azurecli.runLineInEditor", - "when": "editorLangId == 'azcli'" - }, - { - "command": "ms-azurecli.toggleLiveQuery", - "when": "editorLangId == 'azcli'" - } - ] - } - }, - "scripts": { - "compile": "tsc -p ./", - "watch": "tsc -watch -p ./" - }, - "devDependencies": { - "@types/jmespath": "0.15.0", - "@types/node": "10.14.1", - "@types/semver": "5.5.0", - "@types/vscode": "^1.75.0", - "typescript": "^5.3.3" - }, - "dependencies": { - "jmespath": "0.15.0", - "semver": "7.5.2", - "elegant-spinner": "2.0.0" - } + "name": "azurecli", + "displayName": "Azure CLI Tools", + "version": "0.0.1", + "private": false, + "description": "Tools for developing and running commands of the Azure CLI.", + "keywords": [ + "land" + ], + "homepage": "HTTPS://GitHub.Com/CodeEditorLand/LandAzureCli#readme", + "bugs": { + "url": "HTTPS://GitHub.Com/CodeEditorLand/LandAzureCli/issues" + }, + "repository": { + "type": "git", + "url": "git+HTTPS://github.com/CodeEditorLand/LandAzureCli.git" + }, + "license": "SEE LICENSE IN LICENSE", + "author": { + "name": "πŸŒ†β€β€”β€Land —", + "email": "Land@PlayForm.Cloud", + "url": "HTTPS://Land.PlayForm.Cloud" + }, + "type": "module", + "main": "./out/src/extension", + "scripts": { + "Document": "Document 'Source/**/*.ts'", + "compile": "tsc -p ./", + "prepublishOnly": "Build 'Source/**/*.ts'" + }, + "contributes": { + "commands": [ + { + "category": "Azure CLI", + "command": "ms-azurecli.runLineInTerminal", + "title": "%runLineInTerminal.title%" + }, + { + "category": "Azure CLI", + "command": "ms-azurecli.runLineInEditor", + "title": "%runLineInEditor.title%" + }, + { + "category": "Azure CLI", + "command": "ms-azurecli.toggleLiveQuery", + "title": "%toggleLiveQuery.title%" + }, + { + "category": "Azure CLI", + "command": "ms-azurecli.installAzureCLI", + "title": "%installAzureCLI.title%" + } + ], + "configuration": { + "properties": { + "azureCLI.lineContinuationCharacter": { + "default": "", + "description": "%azureCLI.lineContinuationCharacter.description%", + "scope": "resource", + "type": "string" + }, + "azureCLI.showResultInNewEditor": { + "default": false, + "description": "%azureCLI.showResultInNewEditor.description%", + "scope": "resource", + "type": "boolean" + } + }, + "title": "%configuration.title%", + "type": "object" + }, + "grammars": [ + { + "language": "azcli", + "path": "./syntaxes/azcli.tmLanguage.json", + "scopeName": "source.azcli" + } + ], + "keybindings": [ + { + "command": "ms-azurecli.runLineInTerminal", + "key": "ctrl+'", + "mac": "cmd+'", + "when": "editorTextFocus && editorLangId == 'azcli'" + }, + { + "command": "ms-azurecli.runLineInEditor", + "key": "ctrl+shift+'", + "mac": "cmd+shift+'", + "when": "editorTextFocus && editorLangId == 'azcli'" + }, + { + "command": "ms-azurecli.toggleLiveQuery", + "key": "ctrl+;", + "mac": "cmd+;", + "when": "editorTextFocus && editorLangId == 'azcli'" + } + ], + "languages": [ + { + "aliases": [ + "Azure CLI Scrapbook", + "azcli" + ], + "configuration": "./language-configuration.json", + "extensions": [ + ".azcli" + ], + "id": "azcli" + } + ], + "menus": { + "commandPalette": [ + { + "command": "ms-azurecli.runLineInTerminal", + "when": "editorLangId == 'azcli'" + }, + { + "command": "ms-azurecli.runLineInEditor", + "when": "editorLangId == 'azcli'" + }, + { + "command": "ms-azurecli.toggleLiveQuery", + "when": "editorLangId == 'azcli'" + } + ], + "editor/context": [ + { + "command": "ms-azurecli.runLineInTerminal", + "group": "2_run", + "when": "editorLangId == 'azcli'" + }, + { + "command": "ms-azurecli.runLineInEditor", + "group": "2_run", + "when": "editorLangId == 'azcli'" + } + ] + } + }, + "dependencies": { + "elegant-spinner": "2.0.0", + "jmespath": "0.15.0", + "semver": "7.5.2" + }, + "devDependencies": { + "@playform/build": "0.0.7", + "@playform/document": "0.0.6", + "@types/jmespath": "0.15.0", + "@types/node": "10.14.1", + "@types/semver": "5.5.0" + }, + "publishConfig": { + "access": "public" + }, + "icon": "images/azure_icon.png", + "l10n": "./l10n" } diff --git a/service/tests/__init__.py b/service/tests/__init__.py deleted file mode 100644 index 34913fb..0000000 --- a/service/tests/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- diff --git a/service/tests/test_tooling.py b/service/tests/test_tooling.py deleted file mode 100644 index 8ceffd1..0000000 --- a/service/tests/test_tooling.py +++ /dev/null @@ -1,129 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -import unittest -import collections -try: - collectionsAbc = collections.abc -except AttributeError: - collectionsAbc = collections - -from azservice.tooling import GLOBAL_ARGUMENTS, initialize, load_command_table, get_help, get_current_subscription, get_configured_defaults, get_defaults, is_required, run_argument_value_completer, get_arguments - -TEST_GROUP = 'webapp' -TEST_COMMAND = 'webapp create' -TEST_ARGUMENT = 'plan' -TEST_ARGUMENT_OPTIONS = ['--plan', '-p'] -TEST_OPTIONAL_ARGUMENT = 'runtime' -TEST_GLOBAL_ARGUMENT = 'output' -TEST_GLOBAL_ARGUMENT_OPTIONS = ['--output', '-o'] -TEST_ARGUMENT_WITH_DEFAULT = 'deployment_source_branch' -TEST_ARGUMENT_WITHOUT_DEFAULT = 'deployment_source_url' -TEST_COMMAND_WITH_CHOICES = 'appservice plan create' -TEST_ARGUMENT_WITH_CHOICES = 'sku' -TEST_COMMAND_WITH_COMPLETER = 'account set' -TEST_ARGUMENT_WITH_COMPLETER = 'subscription' - - -class ToolingTest(unittest.TestCase): - @classmethod - def setUpClass(cls): - initialize() - cls.command_table = load_command_table() - - @classmethod - def tearDownClass(cls): - cls.command_table = None - - def test_group_help(self): - help = get_help(TEST_GROUP) - self.assertIsNotNone(help) - self.assertTrue(help.get('short-summary')) - - def test_command(self): - command = self.command_table.get(TEST_COMMAND) - self.assertIsNotNone(command) - self.assertEqual(TEST_COMMAND, command.name) - - def test_command_help(self): - help = get_help(TEST_COMMAND) - self.assertIsNotNone(help) - self.assertTrue(help.get('short-summary')) - examples = help.get('examples') - self.assertNotEqual(0, len(examples)) - self.assertTrue(examples[0]['name']) - self.assertTrue(examples[0]['text']) - - def test_argument(self): - command = self.command_table.get(TEST_COMMAND) - self.assertIsNotNone(command) - argument = get_arguments(command).get(TEST_ARGUMENT) - self.assertIsNotNone(argument) - self.assertSequenceEqual(TEST_ARGUMENT_OPTIONS, argument.options_list) - - def test_argument_help(self): - command = self.command_table.get(TEST_COMMAND) - self.assertIsNotNone(command) - argument = get_arguments(command).get(TEST_ARGUMENT) - self.assertIsNotNone(argument) - self.assertTrue(argument.type.settings.get('help')) - - def test_global_argument(self): - argument = GLOBAL_ARGUMENTS.get(TEST_GLOBAL_ARGUMENT) - self.assertIsNotNone(argument) - self.assertSequenceEqual(TEST_GLOBAL_ARGUMENT_OPTIONS, argument['options']) - self.assertTrue(argument['help']) - self.assertNotEqual(0, len(argument['choices'])) - - def test_required_argument(self): - command = self.command_table.get(TEST_COMMAND) - self.assertIsNotNone(command) - self.assertTrue(is_required(get_arguments(command).get(TEST_ARGUMENT))) - self.assertFalse(is_required(get_arguments(command).get(TEST_OPTIONAL_ARGUMENT))) - - def test_is_linux_optional(self): - command = self.command_table.get('appservice plan create') - self.assertIsNotNone(command) - self.assertFalse(is_required(get_arguments(command).get('is_linux'))) - - def test_argument_defaults(self): - command = self.command_table.get(TEST_COMMAND) - self.assertIsNotNone(command) - defaults = get_defaults(get_arguments(command)) - self.assertIsNotNone(defaults) - self.assertTrue(defaults.get(TEST_ARGUMENT_WITH_DEFAULT)) - self.assertFalse(defaults.get(TEST_ARGUMENT_WITHOUT_DEFAULT)) - - def test_argument_choices(self): - command = self.command_table.get(TEST_COMMAND_WITH_CHOICES) - self.assertIsNotNone(command) - argument = get_arguments(command)[TEST_ARGUMENT_WITH_CHOICES] - self.assertIsNotNone(argument) - self.assertIsNotNone(argument.choices) - self.assertIsNone(argument.completer) - self.assertNotEqual(0, len(argument.choices)) - - def test_argument_completer(self): - command = self.command_table.get(TEST_COMMAND_WITH_COMPLETER) - self.assertIsNotNone(command) - argument = get_arguments(command)[TEST_ARGUMENT_WITH_COMPLETER] - self.assertIsNotNone(argument) - self.assertIsNone(argument.choices) - self.assertIsNotNone(argument.completer) - values = run_argument_value_completer(command, argument, {}) - self.assertTrue(isinstance(values, collectionsAbc.Sequence)) - - def test_current_subscription(self): - subscription = get_current_subscription() - self.assertTrue(subscription is None or isinstance(subscription, str)) - - def test_configured_defaults(self): - defaults = get_configured_defaults() - self.assertTrue(isinstance(defaults, dict)) - - -if __name__ == '__main__': - unittest.main() From fdfc2b00758ed729f5597c1e874421f121f52ae5 Mon Sep 17 00:00:00 2001 From: "Nikola R. Hristov" Date: Wed, 1 May 2024 05:12:22 +0300 Subject: [PATCH 3/6] squash! --- .github/dependabot.yml | 14 +++++ .github/workflows/Dependabot.yml | 45 ++++++++++++++++ .github/workflows/GitHub.yml | 57 ++++++++++++++++++++ .github/workflows/NPM.yml | 43 +++++++++++++++ .github/workflows/Node.yml | 92 ++++++++++++++++++++++++++++++++ 5 files changed, 251 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/Dependabot.yml create mode 100644 .github/workflows/GitHub.yml create mode 100644 .github/workflows/NPM.yml create mode 100644 .github/workflows/Node.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..575fdde --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +enable-beta-ecosystems: true + +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + versioning-strategy: increase diff --git a/.github/workflows/Dependabot.yml b/.github/workflows/Dependabot.yml new file mode 100644 index 0000000..e6091e5 --- /dev/null +++ b/.github/workflows/Dependabot.yml @@ -0,0 +1,45 @@ +name: Dependabot + +concurrency: + group: Dependabot-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + pull_request: + +jobs: + Approve: + runs-on: ubuntu-latest + + if: ${{ github.actor == 'dependabot[bot]' }} + + steps: + - uses: dependabot/fetch-metadata@v2.1.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + Merge: + runs-on: ubuntu-latest + + if: ${{ github.actor == 'dependabot[bot]' }} + + steps: + - uses: dependabot/fetch-metadata@v2.1.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/GitHub.yml b/.github/workflows/GitHub.yml new file mode 100644 index 0000000..0be30ba --- /dev/null +++ b/.github/workflows/GitHub.yml @@ -0,0 +1,57 @@ +name: GitHub + +concurrency: + group: GitHub-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + issues: write + pull-requests: write + +on: + issues: + types: [opened] + pull_request: + types: [opened] + +jobs: + Assign: + runs-on: ubuntu-latest + + env: + ADBLOCK: true + ASTRO_TELEMETRY_DISABLED: 1 + AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 + AZURE_CORE_COLLECT_TELEMETRY: 0 + CHOOSENIM_NO_ANALYTICS: 1 + DIEZ_DO_NOT_TRACK: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 + DO_NOT_TRACK: 1 + ET_NO_TELEMETRY: 1 + GATSBY_TELEMETRY_DISABLED: 1 + GATSBY_TELEMETRY_OPTOUT: 1 + GATSBY_TELEMETRY_OPT_OUT: 1 + GRIT_TELEMETRY_DISABLED: 1 + HASURA_GRAPHQL_ENABLE_TELEMETRY: false + HINT_TELEMETRY: off + HOMEBREW_NO_ANALYTICS: 1 + INFLUXD_REPORTING_DISABLED: true + ITERATIVE_DO_NOT_TRACK: 1 + NEXT_TELEMETRY_DEBUG: 1 + NEXT_TELEMETRY_DISABLED: 1 + NG_CLI_ANALYTICS: false + NUXT_TELEMETRY_DISABLED: 1 + PIN_DO_NOT_TRACK: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + SAM_CLI_TELEMETRY: 0 + STNOUPGRADE: 1 + STRIPE_CLI_TELEMETRY_OPTOUT: 1 + TELEMETRY_DISABLED: 1 + + steps: + - uses: pozil/auto-assign-issue@v1.14.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + assignees: NikolaRHristov + numOfAssignee: 1 diff --git a/.github/workflows/NPM.yml b/.github/workflows/NPM.yml new file mode 100644 index 0000000..ede007f --- /dev/null +++ b/.github/workflows/NPM.yml @@ -0,0 +1,43 @@ +name: NPM + +concurrency: + group: NPM-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + release: + types: [created] + workflow_call: + +jobs: + Publish: + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4.1.4 + + - uses: actions/setup-node@v4.0.2 + with: + node-version: "18" + registry-url: "https://registry.npmjs.org" + + - run: npm install -g npm + + - name: Publish . + continue-on-error: true + working-directory: . + run: | + npm install --include prod dev optional peer --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/Node.yml b/.github/workflows/Node.yml new file mode 100644 index 0000000..730ee62 --- /dev/null +++ b/.github/workflows/Node.yml @@ -0,0 +1,92 @@ +name: Node + +concurrency: + group: Node-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + push: + branches: [Current] + pull_request: + branches: [Current] + workflow_call: + +jobs: + Pre-Publish: + runs-on: ubuntu-latest + + env: + ADBLOCK: true + ASTRO_TELEMETRY_DISABLED: 1 + AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 + AZURE_CORE_COLLECT_TELEMETRY: 0 + CHOOSENIM_NO_ANALYTICS: 1 + DIEZ_DO_NOT_TRACK: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 + DO_NOT_TRACK: 1 + ET_NO_TELEMETRY: 1 + GATSBY_TELEMETRY_DISABLED: 1 + GATSBY_TELEMETRY_OPTOUT: 1 + GATSBY_TELEMETRY_OPT_OUT: 1 + GRIT_TELEMETRY_DISABLED: 1 + HASURA_GRAPHQL_ENABLE_TELEMETRY: false + HINT_TELEMETRY: off + HOMEBREW_NO_ANALYTICS: 1 + INFLUXD_REPORTING_DISABLED: true + ITERATIVE_DO_NOT_TRACK: 1 + NEXT_TELEMETRY_DEBUG: 1 + NEXT_TELEMETRY_DISABLED: 1 + NG_CLI_ANALYTICS: false + NUXT_TELEMETRY_DISABLED: 1 + PIN_DO_NOT_TRACK: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + SAM_CLI_TELEMETRY: 0 + STNOUPGRADE: 1 + STRIPE_CLI_TELEMETRY_OPTOUT: 1 + TELEMETRY_DISABLED: 1 + + strategy: + matrix: + node-version: [18, 19, 20] + + steps: + - uses: actions/checkout@v4.1.4 + + - uses: pnpm/action-setup@v3.0.0 + with: + version: 8.15.5 + run_install: | + - recursive: true + args: [ + --link-workspace-packages=true, + --lockfile-only, + --prefer-frozen-lockfile=false, + --shamefully-hoist=false, + --shared-workspace-lockfile=true, + --strict-peer-dependencies=false, + --unsafe-perm=true + ] + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./pnpm-lock.yaml + + - run: pnpm install + working-directory: . + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.3 + with: + name: .-Node-${{ matrix.node-version }}-Target + path: ./Target From 0c6a5ca41c0dad60940f18d76601ff117db7e052 Mon Sep 17 00:00:00 2001 From: "Nikola R. Hristov" Date: Wed, 1 May 2024 19:21:12 +0300 Subject: [PATCH 4/6] squash! --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 1f99211..12ff83d 100644 --- a/package.json +++ b/package.json @@ -139,16 +139,16 @@ } }, "dependencies": { - "elegant-spinner": "2.0.0", - "jmespath": "0.15.0", - "semver": "7.5.2" + "elegant-spinner": "3.0.0", + "jmespath": "0.16.0", + "semver": "7.6.0" }, "devDependencies": { "@playform/build": "0.0.7", "@playform/document": "0.0.6", - "@types/jmespath": "0.15.0", - "@types/node": "10.14.1", - "@types/semver": "5.5.0" + "@types/jmespath": "0.15.2", + "@types/node": "20.12.7", + "@types/semver": "7.5.8" }, "publishConfig": { "access": "public" From 5714a20fff338d4943fd362a20040e331c07d86e Mon Sep 17 00:00:00 2001 From: "Nikola R. Hristov" Date: Wed, 1 May 2024 22:51:49 +0300 Subject: [PATCH 5/6] squash! --- .github/dependabot.yml | 14 ----- .github/workflows/Dependabot.yml | 45 ---------------- .github/workflows/GitHub.yml | 57 -------------------- .github/workflows/NPM.yml | 43 --------------- .github/workflows/Node.yml | 92 -------------------------------- 5 files changed, 251 deletions(-) delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/Dependabot.yml delete mode 100644 .github/workflows/GitHub.yml delete mode 100644 .github/workflows/NPM.yml delete mode 100644 .github/workflows/Node.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 575fdde..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: 2 -enable-beta-ecosystems: true - -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "daily" - versioning-strategy: increase diff --git a/.github/workflows/Dependabot.yml b/.github/workflows/Dependabot.yml deleted file mode 100644 index e6091e5..0000000 --- a/.github/workflows/Dependabot.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Dependabot - -concurrency: - group: Dependabot-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - security-events: write - contents: write - pull-requests: write - -on: - workflow_dispatch: - pull_request: - -jobs: - Approve: - runs-on: ubuntu-latest - - if: ${{ github.actor == 'dependabot[bot]' }} - - steps: - - uses: dependabot/fetch-metadata@v2.1.0 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - - run: gh pr review --approve "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - Merge: - runs-on: ubuntu-latest - - if: ${{ github.actor == 'dependabot[bot]' }} - - steps: - - uses: dependabot/fetch-metadata@v2.1.0 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - - run: gh pr merge --auto --merge "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/GitHub.yml b/.github/workflows/GitHub.yml deleted file mode 100644 index 0be30ba..0000000 --- a/.github/workflows/GitHub.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: GitHub - -concurrency: - group: GitHub-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - issues: write - pull-requests: write - -on: - issues: - types: [opened] - pull_request: - types: [opened] - -jobs: - Assign: - runs-on: ubuntu-latest - - env: - ADBLOCK: true - ASTRO_TELEMETRY_DISABLED: 1 - AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 - AZURE_CORE_COLLECT_TELEMETRY: 0 - CHOOSENIM_NO_ANALYTICS: 1 - DIEZ_DO_NOT_TRACK: 1 - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 - DO_NOT_TRACK: 1 - ET_NO_TELEMETRY: 1 - GATSBY_TELEMETRY_DISABLED: 1 - GATSBY_TELEMETRY_OPTOUT: 1 - GATSBY_TELEMETRY_OPT_OUT: 1 - GRIT_TELEMETRY_DISABLED: 1 - HASURA_GRAPHQL_ENABLE_TELEMETRY: false - HINT_TELEMETRY: off - HOMEBREW_NO_ANALYTICS: 1 - INFLUXD_REPORTING_DISABLED: true - ITERATIVE_DO_NOT_TRACK: 1 - NEXT_TELEMETRY_DEBUG: 1 - NEXT_TELEMETRY_DISABLED: 1 - NG_CLI_ANALYTICS: false - NUXT_TELEMETRY_DISABLED: 1 - PIN_DO_NOT_TRACK: 1 - POWERSHELL_TELEMETRY_OPTOUT: 1 - SAM_CLI_TELEMETRY: 0 - STNOUPGRADE: 1 - STRIPE_CLI_TELEMETRY_OPTOUT: 1 - TELEMETRY_DISABLED: 1 - - steps: - - uses: pozil/auto-assign-issue@v1.14.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - assignees: NikolaRHristov - numOfAssignee: 1 diff --git a/.github/workflows/NPM.yml b/.github/workflows/NPM.yml deleted file mode 100644 index ede007f..0000000 --- a/.github/workflows/NPM.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: NPM - -concurrency: - group: NPM-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - security-events: write - contents: write - pull-requests: write - -on: - workflow_dispatch: - release: - types: [created] - workflow_call: - -jobs: - Publish: - runs-on: ubuntu-latest - - permissions: - contents: read - id-token: write - - steps: - - uses: actions/checkout@v4.1.4 - - - uses: actions/setup-node@v4.0.2 - with: - node-version: "18" - registry-url: "https://registry.npmjs.org" - - - run: npm install -g npm - - - name: Publish . - continue-on-error: true - working-directory: . - run: | - npm install --include prod dev optional peer --legacy-peer-deps - npm publish --legacy-peer-deps --provenance - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/Node.yml b/.github/workflows/Node.yml deleted file mode 100644 index 730ee62..0000000 --- a/.github/workflows/Node.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: Node - -concurrency: - group: Node-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - security-events: write - contents: write - pull-requests: write - -on: - workflow_dispatch: - push: - branches: [Current] - pull_request: - branches: [Current] - workflow_call: - -jobs: - Pre-Publish: - runs-on: ubuntu-latest - - env: - ADBLOCK: true - ASTRO_TELEMETRY_DISABLED: 1 - AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 - AZURE_CORE_COLLECT_TELEMETRY: 0 - CHOOSENIM_NO_ANALYTICS: 1 - DIEZ_DO_NOT_TRACK: 1 - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 - DO_NOT_TRACK: 1 - ET_NO_TELEMETRY: 1 - GATSBY_TELEMETRY_DISABLED: 1 - GATSBY_TELEMETRY_OPTOUT: 1 - GATSBY_TELEMETRY_OPT_OUT: 1 - GRIT_TELEMETRY_DISABLED: 1 - HASURA_GRAPHQL_ENABLE_TELEMETRY: false - HINT_TELEMETRY: off - HOMEBREW_NO_ANALYTICS: 1 - INFLUXD_REPORTING_DISABLED: true - ITERATIVE_DO_NOT_TRACK: 1 - NEXT_TELEMETRY_DEBUG: 1 - NEXT_TELEMETRY_DISABLED: 1 - NG_CLI_ANALYTICS: false - NUXT_TELEMETRY_DISABLED: 1 - PIN_DO_NOT_TRACK: 1 - POWERSHELL_TELEMETRY_OPTOUT: 1 - SAM_CLI_TELEMETRY: 0 - STNOUPGRADE: 1 - STRIPE_CLI_TELEMETRY_OPTOUT: 1 - TELEMETRY_DISABLED: 1 - - strategy: - matrix: - node-version: [18, 19, 20] - - steps: - - uses: actions/checkout@v4.1.4 - - - uses: pnpm/action-setup@v3.0.0 - with: - version: 8.15.5 - run_install: | - - recursive: true - args: [ - --link-workspace-packages=true, - --lockfile-only, - --prefer-frozen-lockfile=false, - --shamefully-hoist=false, - --shared-workspace-lockfile=true, - --strict-peer-dependencies=false, - --unsafe-perm=true - ] - - - uses: actions/setup-node@v4.0.2 - with: - node-version: ${{ matrix.node-version }} - cache: "pnpm" - cache-dependency-path: ./pnpm-lock.yaml - - - run: pnpm install - working-directory: . - - - run: pnpm run prepublishOnly - working-directory: . - - - uses: actions/upload-artifact@v4.3.3 - with: - name: .-Node-${{ matrix.node-version }}-Target - path: ./Target From f2b1257183339a88ca39c995e582a3387c9366e2 Mon Sep 17 00:00:00 2001 From: "Nikola R. Hristov" Date: Thu, 2 May 2024 04:21:49 +0300 Subject: [PATCH 6/6] squash! --- .github/dependabot.yml | 14 +++++ .github/workflows/Dependabot.yml | 45 ++++++++++++++++ .github/workflows/GitHub.yml | 57 ++++++++++++++++++++ .github/workflows/NPM.yml | 43 +++++++++++++++ .github/workflows/Node.yml | 92 ++++++++++++++++++++++++++++++++ 5 files changed, 251 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/Dependabot.yml create mode 100644 .github/workflows/GitHub.yml create mode 100644 .github/workflows/NPM.yml create mode 100644 .github/workflows/Node.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..575fdde --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +enable-beta-ecosystems: true + +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + versioning-strategy: increase diff --git a/.github/workflows/Dependabot.yml b/.github/workflows/Dependabot.yml new file mode 100644 index 0000000..e6091e5 --- /dev/null +++ b/.github/workflows/Dependabot.yml @@ -0,0 +1,45 @@ +name: Dependabot + +concurrency: + group: Dependabot-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + pull_request: + +jobs: + Approve: + runs-on: ubuntu-latest + + if: ${{ github.actor == 'dependabot[bot]' }} + + steps: + - uses: dependabot/fetch-metadata@v2.1.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + Merge: + runs-on: ubuntu-latest + + if: ${{ github.actor == 'dependabot[bot]' }} + + steps: + - uses: dependabot/fetch-metadata@v2.1.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/GitHub.yml b/.github/workflows/GitHub.yml new file mode 100644 index 0000000..0be30ba --- /dev/null +++ b/.github/workflows/GitHub.yml @@ -0,0 +1,57 @@ +name: GitHub + +concurrency: + group: GitHub-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + issues: write + pull-requests: write + +on: + issues: + types: [opened] + pull_request: + types: [opened] + +jobs: + Assign: + runs-on: ubuntu-latest + + env: + ADBLOCK: true + ASTRO_TELEMETRY_DISABLED: 1 + AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 + AZURE_CORE_COLLECT_TELEMETRY: 0 + CHOOSENIM_NO_ANALYTICS: 1 + DIEZ_DO_NOT_TRACK: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 + DO_NOT_TRACK: 1 + ET_NO_TELEMETRY: 1 + GATSBY_TELEMETRY_DISABLED: 1 + GATSBY_TELEMETRY_OPTOUT: 1 + GATSBY_TELEMETRY_OPT_OUT: 1 + GRIT_TELEMETRY_DISABLED: 1 + HASURA_GRAPHQL_ENABLE_TELEMETRY: false + HINT_TELEMETRY: off + HOMEBREW_NO_ANALYTICS: 1 + INFLUXD_REPORTING_DISABLED: true + ITERATIVE_DO_NOT_TRACK: 1 + NEXT_TELEMETRY_DEBUG: 1 + NEXT_TELEMETRY_DISABLED: 1 + NG_CLI_ANALYTICS: false + NUXT_TELEMETRY_DISABLED: 1 + PIN_DO_NOT_TRACK: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + SAM_CLI_TELEMETRY: 0 + STNOUPGRADE: 1 + STRIPE_CLI_TELEMETRY_OPTOUT: 1 + TELEMETRY_DISABLED: 1 + + steps: + - uses: pozil/auto-assign-issue@v1.14.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + assignees: NikolaRHristov + numOfAssignee: 1 diff --git a/.github/workflows/NPM.yml b/.github/workflows/NPM.yml new file mode 100644 index 0000000..ede007f --- /dev/null +++ b/.github/workflows/NPM.yml @@ -0,0 +1,43 @@ +name: NPM + +concurrency: + group: NPM-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + release: + types: [created] + workflow_call: + +jobs: + Publish: + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4.1.4 + + - uses: actions/setup-node@v4.0.2 + with: + node-version: "18" + registry-url: "https://registry.npmjs.org" + + - run: npm install -g npm + + - name: Publish . + continue-on-error: true + working-directory: . + run: | + npm install --include prod dev optional peer --legacy-peer-deps + npm publish --legacy-peer-deps --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/Node.yml b/.github/workflows/Node.yml new file mode 100644 index 0000000..730ee62 --- /dev/null +++ b/.github/workflows/Node.yml @@ -0,0 +1,92 @@ +name: Node + +concurrency: + group: Node-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + push: + branches: [Current] + pull_request: + branches: [Current] + workflow_call: + +jobs: + Pre-Publish: + runs-on: ubuntu-latest + + env: + ADBLOCK: true + ASTRO_TELEMETRY_DISABLED: 1 + AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 + AZURE_CORE_COLLECT_TELEMETRY: 0 + CHOOSENIM_NO_ANALYTICS: 1 + DIEZ_DO_NOT_TRACK: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 + DO_NOT_TRACK: 1 + ET_NO_TELEMETRY: 1 + GATSBY_TELEMETRY_DISABLED: 1 + GATSBY_TELEMETRY_OPTOUT: 1 + GATSBY_TELEMETRY_OPT_OUT: 1 + GRIT_TELEMETRY_DISABLED: 1 + HASURA_GRAPHQL_ENABLE_TELEMETRY: false + HINT_TELEMETRY: off + HOMEBREW_NO_ANALYTICS: 1 + INFLUXD_REPORTING_DISABLED: true + ITERATIVE_DO_NOT_TRACK: 1 + NEXT_TELEMETRY_DEBUG: 1 + NEXT_TELEMETRY_DISABLED: 1 + NG_CLI_ANALYTICS: false + NUXT_TELEMETRY_DISABLED: 1 + PIN_DO_NOT_TRACK: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + SAM_CLI_TELEMETRY: 0 + STNOUPGRADE: 1 + STRIPE_CLI_TELEMETRY_OPTOUT: 1 + TELEMETRY_DISABLED: 1 + + strategy: + matrix: + node-version: [18, 19, 20] + + steps: + - uses: actions/checkout@v4.1.4 + + - uses: pnpm/action-setup@v3.0.0 + with: + version: 8.15.5 + run_install: | + - recursive: true + args: [ + --link-workspace-packages=true, + --lockfile-only, + --prefer-frozen-lockfile=false, + --shamefully-hoist=false, + --shared-workspace-lockfile=true, + --strict-peer-dependencies=false, + --unsafe-perm=true + ] + + - uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./pnpm-lock.yaml + + - run: pnpm install + working-directory: . + + - run: pnpm run prepublishOnly + working-directory: . + + - uses: actions/upload-artifact@v4.3.3 + with: + name: .-Node-${{ matrix.node-version }}-Target + path: ./Target