From e8d62131846a22c9a069bad9bb0aba3a65eb565d Mon Sep 17 00:00:00 2001 From: Kyle Finley Date: Thu, 15 Aug 2024 13:27:03 -0400 Subject: [PATCH 1/3] end support for installing via cURL & npm --- .github/labels.yml | 3 - .github/release-drafter.yml | 4 - .github/scripts/README.md | 3 - .github/scripts/cicd/build_pyinstaller.sh | 56 -- .../scripts/cicd/check_distance_from_tag.sh | 29 - .github/scripts/urlshortener/Makefile | 10 - .github/scripts/urlshortener/README.md | 30 - .../scripts/urlshortener/test_update_urls.py | 135 --- .github/scripts/urlshortener/update_urls.py | 156 ---- .github/workflows/on-push-pyinstaller.yml | 190 ---- .github/workflows/release.yml | 254 ------ .gitignore | 2 - .vscode/cspell.json | 22 +- .vscode/dictionaries/pypi.txt | 1 - Makefile | 26 +- README.md | 34 - docs/source/cfngin/configuration.rst | 14 +- docs/source/cfngin/persistent_graph.rst | 2 +- docs/source/commands.rst | 30 +- docs/source/conf.py | 2 +- docs/source/defining_tests.rst | 8 +- .../developers/advanced_configuration.rst | 2 +- docs/source/developers/pyinstaller.rst | 27 - docs/source/getting_started.rst | 167 ++-- docs/source/index.rst | 14 - docs/source/installation.rst | 132 +-- docs/source/kubernetes/configuration.rst | 4 +- .../source/kubernetes/directory_structure.rst | 2 +- docs/source/kubernetes/examples.rst | 2 +- docs/source/lookups/env.rst | 2 +- docs/source/lookups/index.rst | 2 +- docs/source/maintainers/release_process.rst | 4 +- docs/source/python_setup.rst | 81 -- docs/source/quickstart/cloudformation.rst | 11 +- docs/source/quickstart/conduit.rst | 4 +- docs/source/quickstart/other_ways_to_use.rst | 17 +- .../source/quickstart/private_static_site.rst | 4 +- docs/source/repo_structure.rst | 2 - docs/source/runway_config.rst | 63 +- docs/source/serverless/advanced_features.rst | 2 +- docs/source/serverless/configuration.rst | 2 +- docs/source/staticsite/configuration.rst | 2 +- .../source/staticsite/directory_structure.rst | 2 +- docs/source/staticsite/examples.rst | 2 +- docs/source/terminology.rst | 10 +- docs/source/terraform/advanced_features.rst | 2 +- npm/.npmignore | 24 - npm/postinstall.js | 102 --- npm/preuninstall.js | 30 - package-lock.json | 849 +----------------- package.json | 52 -- poetry.lock | 111 +-- pyproject.toml | 11 - quickstarts/runway/Dockerfile | 51 +- runway.file.spec | 137 --- runway.folder.spec | 145 --- runway/core/components/_module_type.py | 4 +- 57 files changed, 230 insertions(+), 2859 deletions(-) delete mode 100644 .github/scripts/README.md delete mode 100644 .github/scripts/cicd/build_pyinstaller.sh delete mode 100644 .github/scripts/cicd/check_distance_from_tag.sh delete mode 100644 .github/scripts/urlshortener/Makefile delete mode 100644 .github/scripts/urlshortener/README.md delete mode 100644 .github/scripts/urlshortener/test_update_urls.py delete mode 100755 .github/scripts/urlshortener/update_urls.py delete mode 100644 .github/workflows/on-push-pyinstaller.yml delete mode 100644 docs/source/developers/pyinstaller.rst delete mode 100644 docs/source/python_setup.rst delete mode 100644 npm/.npmignore delete mode 100755 npm/postinstall.js delete mode 100644 npm/preuninstall.js delete mode 100644 runway.file.spec delete mode 100644 runway.folder.spec diff --git a/.github/labels.yml b/.github/labels.yml index 9960c8e06..4aee5342b 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -68,9 +68,6 @@ - name: priority:medium color: fbca04 description: Medium priority issue or pull request - - name: pyinstaller - color: ffffff - description: Update to Pyinstaller configuration - name: python color: '306998' description: Update to Python code diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 79e7c44da..57ae25f9e 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -38,10 +38,6 @@ autolabeler: # cspell:ignore autolabeler - poetry.lock - poetry.toml - pyproject.toml - - label: pyinstaller - files: - - runway.file.spec - - runway.folder.spec - label: python files: - '**/*.py' diff --git a/.github/scripts/README.md b/.github/scripts/README.md deleted file mode 100644 index 6404fc095..000000000 --- a/.github/scripts/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# GitHub Action Scripts - -Scripts used by GitHub action workflows. diff --git a/.github/scripts/cicd/build_pyinstaller.sh b/.github/scripts/cicd/build_pyinstaller.sh deleted file mode 100644 index 0974c95b8..000000000 --- a/.github/scripts/cicd/build_pyinstaller.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash - -# Create pyinstaller "onefile" build - -set -ev - -if [ "$OS_NAME" == "ubuntu-latest" ]; then - LOCAL_OS_NAME="linux" -elif [ "$OS_NAME" == "macos-12" ]; then - LOCAL_OS_NAME="osx" -elif [ "$OS_NAME" == "windows-latest" ]; then - LOCAL_OS_NAME="windows" -else - echo 'Environment variable "OS_NAME" must be one of ["ubuntu-latest", "macos-12", "windows-latest"]' - exit 1 -fi - -if [ "$1" != "file" ] && [ "$1" != "folder" ]; then - echo 'First positional argument must be one of ["file", "folder"]' - exit 1 -fi - -RUNWAY_VERSION=$(poetry version --short) - -if [[ -n "${GITHUB_ACTION}" ]]; then - rm -rf ./.venv; # NOTE (kyle): this needs to be removed on GitHub -fi - -poetry build - -if [[ -n "${GITHUB_ACTION}" ]]; then - # NOTE (kyle): GitHub needs build tools reinstalled after `poetry build` - poetry install --only main,build --sync; -fi - -poetry run pip install "$(find dist -type f -name 'runway-*.tar.gz' -print | tail -n 1)" -find dist/* -exec rm -rfv "{}" + -mkdir -p "artifacts/${RUNWAY_VERSION}/${LOCAL_OS_NAME}" -poetry run pip show setuptools -poetry run pyinstaller --noconfirm --clean "runway.$1.spec" # cspell:ignore noconfirm - -if [ "$1" == 'file' ]; then - mv dist/* "artifacts/${RUNWAY_VERSION}/$LOCAL_OS_NAME" - chmod +x "artifacts/${RUNWAY_VERSION}/$LOCAL_OS_NAME/runway" - # quick functional test - "./artifacts/${RUNWAY_VERSION}/$LOCAL_OS_NAME/runway" --version -else - if [ "$OS_NAME" == "windows-latest" ]; then - 7z a -ttar -so ./runway.tar ./dist/runway/* | 7z a -si "./artifacts/${RUNWAY_VERSION}/${LOCAL_OS_NAME}/runway.tar.gz" # cspell:disable-line - else - chmod +x dist/runway/runway-cli - # quick functional test - ./dist/runway/runway-cli --version - tar -C dist/runway/ -czvf ."/artifacts/${RUNWAY_VERSION}/${LOCAL_OS_NAME}/runway.tar.gz" . # cspell:disable-line - fi -fi diff --git a/.github/scripts/cicd/check_distance_from_tag.sh b/.github/scripts/cicd/check_distance_from_tag.sh deleted file mode 100644 index 936eba261..000000000 --- a/.github/scripts/cicd/check_distance_from_tag.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -# Checks for this distance from the last tag. -# If there is no distance, return a non-zero exit code. -# -# This can be used in GitHub actions with the following steps using conditionals to handle either case. -# -# Example: -# -# - id: check_distance -# continue-on-error: true -# run: bash ./check_distance_from_tag.sh -# working-directory: .github/scripts/cicd -# - if: steps.check_distance.outcome == 'failure' -# run: echo "No distance" -# - if: steps.check_distance.outcome == 'success' -# run: echo "There is distance" - -DESCRIBE=`git describe --tags --match "v*.*.*"` -echo "Result from 'git describe': ${DESCRIBE}" -DISTANCE=`echo ${DESCRIBE} | grep -P '\-(\d)*\-g(\d)*'` -if [ -n "${DISTANCE}" ]; then - echo "Distance from last tag detected: ${DISTANCE}" - echo "It is safe to proceed with a pre-production release." - exit 0 -else - echo "No distance from last tag; skipping pre-production release." - exit 1 -fi diff --git a/.github/scripts/urlshortener/Makefile b/.github/scripts/urlshortener/Makefile deleted file mode 100644 index 4234def39..000000000 --- a/.github/scripts/urlshortener/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -install: - @poetry install - -lint: - @echo "no linters configured currently" - -test: - @poetry run pytest ./test_update_urls.py \ - --cov update_urls \ - --cov-config ./../../../pyproject.toml diff --git a/.github/scripts/urlshortener/README.md b/.github/scripts/urlshortener/README.md deleted file mode 100644 index 936545e65..000000000 --- a/.github/scripts/urlshortener/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# urlshortener - -Scripts for the URL shortener action. - -Table of Contents - -- [urlshortener](#urlshortener) - - [Scripts](#scripts) - - [update_urls.py](#update_urlspy) - -## Scripts - -### update_urls.py - -```text -Usage: update_urls.py [OPTIONS] - - Update/add URLs to the URL shortener. - -Options: - -b, --bucket-name - Name of S3 Bucket where Runway artifact is located. [required] - --bucket-region - AWS region where the S3 Bucket is located. [required] - --latest Update the "latest" URL. [default: False] - --table Name of the DynamoDB table containing entries for the URL shortener. [required] - --version Runway version being release. [required] - --table-region AWS region where the DynamoDB table is located. [default: us-east-1] - -h, --help Show this message and exit. [default: False] -``` diff --git a/.github/scripts/urlshortener/test_update_urls.py b/.github/scripts/urlshortener/test_update_urls.py deleted file mode 100644 index 67dc10381..000000000 --- a/.github/scripts/urlshortener/test_update_urls.py +++ /dev/null @@ -1,135 +0,0 @@ -"""Tests for update_urls.""" # noqa: INP001 - -# ruff: noqa: S101 -from typing import TYPE_CHECKING -from unittest.mock import ANY, Mock, call, patch - -import boto3 -import pytest -from botocore.stub import Stubber -from click.testing import CliRunner - -from update_urls import command, handler, put_item, sanitize_version - -if TYPE_CHECKING: - from mypy_boto3_dynamodb.service_resource import Table - - -def test_sanitize_version() -> None: - """Test sanitize_version.""" - assert sanitize_version(None, None, "1.0.0") == "1.0.0" - assert sanitize_version(None, None, "v1.0.0") == "1.0.0" - assert sanitize_version(None, None, "refs/tags/1.0.0") == "1.0.0" - assert sanitize_version(None, None, "refs/tags/v1.0.0") == "1.0.0" - assert sanitize_version(None, None, "refs/tags/v1.0.0-dev1") == "1.0.0-dev1" - - with pytest.raises(ValueError): # noqa: PT011 - assert not sanitize_version(None, None, "refs/tags/stable") - - -def test_put_item() -> None: - """Test put_item.""" - table_name = "test-table" - id_val = "my_id" - target = "my_target" - table: Table = boto3.resource("dynamodb").Table(table_name) - stubber = Stubber(table.meta.client) - - stubber.add_response("put_item", {"Attributes": {"id": {"S": id_val}, "target": {"S": target}}}) - - with stubber: - assert not put_item(table, id_val, target) - - -@patch("update_urls.put_item") -def test_handler(mock_put_item: Mock) -> None: - """Test handler.""" - table = Mock() - assert not handler(table, "test-bucket", "us-west-2", "1.0.0", True) - calls = [ - call( - table=table, - id_val="runway/latest/linux", - target="https://test-bucket.s3-us-west-2.amazonaws.com/runway/1.0.0/linux/runway", - ), - call( - table=table, - id_val="runway/1.0.0/linux", - target="https://test-bucket.s3-us-west-2.amazonaws.com/runway/1.0.0/linux/runway", - ), - call( - table=table, - id_val="runway/latest/osx", - target="https://test-bucket.s3-us-west-2.amazonaws.com/runway/1.0.0/osx/runway", - ), - call( - table=table, - id_val="runway/1.0.0/osx", - target="https://test-bucket.s3-us-west-2.amazonaws.com/runway/1.0.0/osx/runway", - ), - call( - table=table, - id_val="runway/latest/windows", - target="https://test-bucket.s3-us-west-2.amazonaws.com/" - "runway/1.0.0/windows/runway.exe", - ), - call( - table=table, - id_val="runway/1.0.0/windows", - target="https://test-bucket.s3-us-west-2.amazonaws.com/" - "runway/1.0.0/windows/runway.exe", - ), - ] - - assert not handler(table, "test-bucket", "us-east-1", "1.1.0", False) - calls.append( - call( - table=table, - id_val="runway/1.1.0/linux", - target="https://test-bucket.s3-us-east-1.amazonaws.com/runway/1.1.0/linux/runway", - ) - ) - calls.append( - call( - table=table, - id_val="runway/1.1.0/osx", - target="https://test-bucket.s3-us-east-1.amazonaws.com/runway/1.1.0/osx/runway", - ) - ) - calls.append( - call( - table=table, - id_val="runway/1.1.0/windows", - target="https://test-bucket.s3-us-east-1.amazonaws.com/" - "runway/1.1.0/windows/runway.exe", - ) - ) - - mock_put_item.assert_has_calls(calls) - - -@patch("update_urls.handler") -def test_command(mock_handler: Mock) -> None: - """Test command.""" - runner = CliRunner() - result = runner.invoke( - command, - args=[ - "--bucket-name", - "test-bucket", - "--bucket-region", - "us-west-2", - "--version", - "refs/tags/1.0.0", - "--table", - "test-table", - "--latest", - ], - env={ - "AWS_ACCESS_KEY_ID": "testing", - "AWS_SECRET_ACCESS_KEY": "testing", - "AWS_DEFAULT_REGION": "us-east-1", - }, - ) - assert result.exit_code == 0 - mock_handler.assert_called_once_with(ANY, "test-bucket", "us-west-2", "1.0.0", True) diff --git a/.github/scripts/urlshortener/update_urls.py b/.github/scripts/urlshortener/update_urls.py deleted file mode 100755 index bdc78460d..000000000 --- a/.github/scripts/urlshortener/update_urls.py +++ /dev/null @@ -1,156 +0,0 @@ -"""Update Runway release URLs.""" # noqa: INP001 - -from __future__ import annotations - -import logging -from typing import TYPE_CHECKING - -import boto3 -import click -from semver import VersionInfo - -if TYPE_CHECKING: - from mypy_boto3_dynamodb.service_resource import Table - -LOGGER = logging.getLogger("update_urls") -HDLR = logging.StreamHandler() -HDLR.setFormatter(logging.Formatter(logging.BASIC_FORMAT)) - -ID_TEMPLATE = "runway/{release}/{os}" -TARGET_TEMPLATE = "https://{bucket_name}.s3-{region}.amazonaws.com/runway/{version}/{os}/runway" - -OS_NAMES = ["linux", "osx", "windows"] - - -def sanitize_version( - _ctx: click.Context | None, - _param: click.Option | click.Parameter | None, - value: str, -) -> str: - """Sanitize a version number by stripping git tag ref and leading "v". - - To be used as the callback of a click option or parameter. - - Args: - ctx: Click context object. - param: The click option or parameter the callback is being used with. - value: Value passed to the option or parameter from the CLI. - - Returns: - str: The SemVer version number. - - """ - version = value.replace("refs/tags/", "") # strip git ref - if version.startswith("v"): # strip leading "v" - version = version[1:] - if VersionInfo.isvalid(version): # valid SemVer - return version - raise ValueError(f'version of "{version}" does not follow SemVer') - - -def put_item(table: Table, id_val: str, target: str) -> None: - """Format and put a DDB entry.""" - LOGGER.info('Adding entry for "%s"...', id_val) - table.put_item(Item={"id": id_val, "target": target}, ReturnValues="NONE") - - -def handler( - table: Table, - bucket_name: str, - bucket_region: str, - version: str, - latest: bool = False, -) -> None: - """Handle the command. - - Core logic executed by the command aside from boto3 session/resource - initialization and logging setup. - - Args: - table: DynamoDB table resource. - bucket_name: Name of S3 Bucket where Runway artifact is located - bucket_region: AWS region where the S3 Bucket is located. - version: SemVer version being release. - latest: Update the "latest" URL. - - """ - for os_name in OS_NAMES: - target = TARGET_TEMPLATE.format( - bucket_name=bucket_name, os=os_name, region=bucket_region, version=version - ) - if os_name == "windows": - target += ".exe" - if latest: - put_item( - table=table, - id_val=ID_TEMPLATE.format(release="latest", os=os_name), - target=target, - ) - put_item( - table=table, - id_val=ID_TEMPLATE.format(release=version, os=os_name), - target=target, - ) - - -@click.command( - context_settings={ - "help_option_names": ["-h", "--help"], - "max_content_width": 999, - "show_default": True, - } -) -@click.option( - "-b", - "--bucket-name", - metavar="", - required=True, - help="Name of S3 Bucket where Runway artifact is located.", -) -@click.option( - "--bucket-region", - metavar="", - required=True, - help="AWS region where the S3 Bucket is located.", -) -@click.option("--latest", is_flag=True, help='Update the "latest" URL.') -@click.option( - "--table", - "table_name", - metavar="
", - required=True, - help="Name of the DynamoDB table containing entries for the URL shortener.", -) -@click.option( - "--version", - metavar="", - required=True, - callback=sanitize_version, - help="Runway version being release.", -) -@click.option( - "--table-region", - metavar="", - default="us-east-1", - help="AWS region where the DynamoDB table is located.", -) -def command( - bucket_name: str, - bucket_region: str, - latest: bool, - table_name: str, - version: str, - table_region: str = "us-east-1", -) -> None: - """Update/add URLs to the URL shortener.""" - logging.basicConfig(level=logging.INFO, handlers=[HDLR]) - logging.getLogger("botocore").setLevel(logging.ERROR) - - session = boto3.Session(region_name=table_region) - table: Table = session.resource("dynamodb").Table(table_name) - - handler(table, bucket_name, bucket_region, version, latest) - - -if __name__ == "__main__": - command() diff --git a/.github/workflows/on-push-pyinstaller.yml b/.github/workflows/on-push-pyinstaller.yml deleted file mode 100644 index 48485ae7c..000000000 --- a/.github/workflows/on-push-pyinstaller.yml +++ /dev/null @@ -1,190 +0,0 @@ -name: Pyinstaller (on_push) - - -on: - push: - paths: - - .github/scripts/cicd/build_pyinstaller.sh - - .github/workflows/on-push-pyinstaller.yml - - runway/* - - poetry.lock - - pyproject.toml - - runway.file.spec - - runway.folder.spec - - -env: - AWS_DEFAULT_REGION: us-east-1 - - -jobs: - build-pyinstaller-onefile: - name: Pyinstaller "One File" Build - strategy: - matrix: - os: [macos-12, ubuntu-latest, windows-latest] - python-version: [3.9] - runs-on: ${{ matrix.os }} - env: - OS_NAME: ${{ matrix.os }} - # pydantic binary causes a recursion error - # https://github.com/pyinstaller/pyinstaller/issues/4406 - PIP_NO_BINARY: pydantic - steps: - - name: ⤵️ Check out code from GitHub (complete) - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: 🏗 Setup Python - uses: finleyfamily/action-setup-python@v1.0.0 - with: - poetry-install: false - poetry-plugins: poetry-dynamic-versioning[plugin] - python-version: ${{ matrix.python-version }} - # Remove apt repos that are known to break from time to time - # See https://github.com/actions/virtual-environments/issues/323 - - name: Remove broken apt repos (ubuntu) - if: startsWith( matrix.os, 'ubuntu' ) - run: | - for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done - - name: ⤵️ Install Dependencies (ubuntu) - if: startsWith( matrix.os, 'ubuntu' ) - run: sudo apt-get update && sudo apt-get install sed -y - - name: ⤵️ Install Dependencies (windows) - if: matrix.os == 'windows-latest' - run: choco install make sed - - name: 👷 Build - run: make build-pyinstaller-file - - name: ⤴️ Upload distribution artifact - uses: actions/upload-artifact@v4 - with: - name: pyinstaller-onefile-${{ matrix.os }} - path: artifacts - build-pyinstaller-onefolder: - name: Pyinstaller "One Folder" Build - strategy: - matrix: - os: [macos-12, ubuntu-latest, windows-latest] - python-version: [3.9] - runs-on: ${{ matrix.os }} - env: - OS_NAME: ${{ matrix.os }} - # pydantic binary causes a recursion error - # https://github.com/pyinstaller/pyinstaller/issues/4406 - PIP_NO_BINARY: pydantic - steps: - - name: ⤵️ Check out code from GitHub (complete) - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: 🏗 Setup Python - uses: finleyfamily/action-setup-python@v1.0.0 - with: - poetry-install: false - poetry-plugins: poetry-dynamic-versioning[plugin] - python-version: ${{ matrix.python-version }} - # Remove apt repos that are known to break from time to time - # See https://github.com/actions/virtual-environments/issues/323 - - name: Remove broken apt repos (ubuntu) - if: startsWith( matrix.os, 'ubuntu' ) - run: | - for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done - - name: ⤵️ Dependencies (ubuntu) - if: startsWith( matrix.os, 'ubuntu' ) - run: sudo apt-get update && sudo apt-get install sed -y - - name: ⤵️ Install Dependencies (windows) - if: matrix.os == 'windows-latest' - run: choco install make sed - - name: 👷 Build - run: make build-pyinstaller-folder - - name: ⤴️ Upload distribution artifact - uses: actions/upload-artifact@v4 - with: - name: pyinstaller-onefolder-${{ matrix.os }} - path: artifacts - build-npm: - name: Build npm 📦 - if: github.ref == 'refs/heads/master' - needs: - - build-pyinstaller-onefolder - env: - NODE_VERSION: 20 - NPM_PACKAGE_NAME: '@onica/runway' - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - python-version: [3.9] - runs-on: ${{ matrix.os }} - steps: - - name: ⤵️ Check out code from GitHub (complete) - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - id: check_distance - name: 💂 Ensure Commit Is Not Tagged - continue-on-error: true - run: bash ./check_distance_from_tag.sh - working-directory: .github/scripts/cicd - - name: 🏗 Setup Python - uses: finleyfamily/action-setup-python@v1.0.0 - with: - poetry-install: false - poetry-plugins: poetry-dynamic-versioning[plugin] - python-version: ${{ matrix.python-version }} - - name: 🏗 Setup Node - uses: actions/setup-node@v4 - if: steps.check_distance.outcome == 'success' - with: - always-auth: true - node-version: ${{ env.NODE_VERSION }} - registry-url: https://registry.npmjs.org - scope: '@onica' - # Remove apt repos that are known to break from time to time - # See https://github.com/actions/virtual-environments/issues/323 - - name: Remove broken apt repos (ubuntu) - if: startsWith( matrix.os, 'ubuntu' ) - run: | - for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done - - name: ⤵️ Install Dependencies (ubuntu) - if: steps.check_distance.outcome == 'success' - run: sudo apt-get update && sudo apt-get install sed tree -y - - name: ⤵️ Download distribution artifacts (macOS) - if: steps.check_distance.outcome == 'success' - uses: actions/download-artifact@v4 - with: - name: pyinstaller-onefolder-macos-12 - path: artifacts - - name: ⤵️ Download distribution artifacts (ubuntu) - if: steps.check_distance.outcome == 'success' - uses: actions/download-artifact@v4 - with: - name: pyinstaller-onefolder-ubuntu-latest - path: artifacts - - name: ⤵️ Download distribution artifacts (windows) - if: steps.check_distance.outcome == 'success' - uses: actions/download-artifact@v4 - with: - name: pyinstaller-onefolder-windows-latest - path: artifacts - - name: ℹ️ List artifacts - if: steps.check_distance.outcome == 'success' - run: tree artifacts/ - - name: 👷 npm Prep - if: steps.check_distance.outcome == 'success' - run: make npm-prep - - name: 👷 Build - if: steps.check_distance.outcome == 'success' - run: | - npm pack - rm -rf artifacts && mkdir -p artifacts - find . -name 'onica-runway-*.*.*.tgz' -exec mv {} artifacts/ \; - - name: ℹ️ Skipped Publishing - if: steps.check_distance.outcome == 'failure' - run: echo "A pre-production version was not published because the current commit is tagged for release." - - name: ⤴️ Upload distribution artifacts - if: steps.check_distance.outcome == 'success' - uses: actions/upload-artifact@v4 - with: - name: npm-pack - path: artifacts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 171e5252b..39ef370d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,5 @@ name: Publish Release - on: release: types: @@ -9,190 +8,7 @@ on: env: AWS_DEFAULT_REGION: us-east-1 - jobs: - build-pyinstaller-onefile: - name: Pyinstaller "One File" Build - strategy: - fail-fast: true - matrix: - os: [macos-12, ubuntu-latest, windows-latest] - python-version: [3.9] - runs-on: ${{ matrix.os }} - env: - OS_NAME: ${{ matrix.os }} - # pydantic binary causes a recursion error - # https://github.com/pyinstaller/pyinstaller/issues/4406 - PIP_NO_BINARY: pydantic - steps: - - name: ⤵️ Check out code from GitHub (complete) - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: 🏗 Setup Python - uses: finleyfamily/action-setup-python@v1.0.0 - with: - poetry-plugins: poetry-dynamic-versioning[plugin] - python-version: ${{ matrix.python-version }} - # Remove apt repos that are known to break from time to time - # See https://github.com/actions/virtual-environments/issues/323 - - name: Remove broken apt repos (ubuntu) - if: startsWith( matrix.os, 'ubuntu' ) - run: | - for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done - - name: ⤵️ Install Dependencies (ubuntu) - if: startsWith( matrix.os, 'ubuntu' ) - run: sudo apt-get update && sudo apt-get install sed -y - - name: ⤵️ Install Dependencies (windows) - if: matrix.os == 'windows-latest' - run: choco install make sed - - name: 👷 Build - run: make build-pyinstaller-file - - name: ⤴️ Upload distribution artifacts - uses: actions/upload-artifact@v4 - with: - name: pyinstaller-onefile-${{ matrix.os }} - path: artifacts - build-pyinstaller-onefolder: - name: Pyinstaller "One Folder" Build - strategy: - fail-fast: true - matrix: - os: [macos-12, ubuntu-latest, windows-latest] - python-version: [3.9] - runs-on: ${{ matrix.os }} - env: - OS_NAME: ${{ matrix.os }} - # pydantic binary causes a recursion error - # https://github.com/pyinstaller/pyinstaller/issues/4406 - PIP_NO_BINARY: pydantic - steps: - - name: ⤵️ Check out code from GitHub (complete) - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: 🏗 Setup Python - uses: finleyfamily/action-setup-python@v1.0.0 - with: - poetry-plugins: poetry-dynamic-versioning[plugin] - python-version: ${{ matrix.python-version }} - # Remove apt repos that are known to break from time to time - # See https://github.com/actions/virtual-environments/issues/323 - - name: Remove broken apt repos (ubuntu) - if: startsWith( matrix.os, 'ubuntu' ) - run: | - for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done - - name: ⤵️ Install Dependencies (ubuntu) - if: startsWith( matrix.os, 'ubuntu' ) - run: sudo apt-get update && sudo apt-get install sed -y - - name: ⤵️ Install Dependencies (windows) - if: matrix.os == 'windows-latest' - run: choco install make sed - - name: 👷 Build - run: make build-pyinstaller-folder - - name: ⤴️ Upload distribution artifact - uses: actions/upload-artifact@v4 - with: - name: pyinstaller-onefolder-${{ matrix.os }} - path: artifacts - build-npm: - name: Build npm 📦 - needs: - - build-pyinstaller-onefolder - env: - NODE_VERSION: 20 - NPM_PACKAGE_NAME: '@onica/runway' - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest] - python-version: [3.9] - runs-on: ${{ matrix.os }} - steps: - - name: ⤵️ Check out code from GitHub (complete) - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: 🏗 Setup Python - uses: finleyfamily/action-setup-python@v1.0.0 - with: - poetry-plugins: poetry-dynamic-versioning[plugin] - python-version: ${{ matrix.python-version }} - - name: 🏗 Setup Node - uses: actions/setup-node@v4 - with: - always-auth: true - node-version: ${{ env.NODE_VERSION }} - registry-url: https://registry.npmjs.org - scope: '@onica' - # Remove apt repos that are known to break from time to time - # See https://github.com/actions/virtual-environments/issues/323 - - name: Remove broken apt repos (ubuntu) - if: startsWith( matrix.os, 'ubuntu' ) - run: | - for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done - - name: ⤵️ Install Dependencies (ubuntu) - run: sudo apt-get update && sudo apt-get install sed tree -y - - name: ⤵️ Download distribution artifacts (macOS) - uses: actions/download-artifact@v4 - with: - name: pyinstaller-onefolder-macos-12 - path: artifacts - - name: ⤵️ Download distribution artifacts (ubuntu) - uses: actions/download-artifact@v4 - with: - name: pyinstaller-onefolder-ubuntu-latest - path: artifacts - - name: ⤵️ Download distribution artifacts (windows) - uses: actions/download-artifact@v4 - with: - name: pyinstaller-onefolder-windows-latest - path: artifacts - - name: ℹ️ List Artifacts - run: tree artifacts/ - - name: 👷 npm Prep - run: make npm-prep - - name: 👷 Build - run: | - npm pack - rm -rf artifacts && mkdir -p artifacts - find . -name 'onica-runway-*.*.*.tgz' -exec mv {} artifacts/ \; - - name: ⤴️ Upload distribution artifacts - uses: actions/upload-artifact@v4 - with: - name: npm-pack - path: artifacts - publish-npm: - name: Publish 📦 To npm - needs: - - build-npm - env: - CI: true - NODE_VERSION: 20 - NPM_PACKAGE_NAME: '@onica/runway' - NODE_AUTH_TOKEN: ${{ secrets.npm_api_token }} - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest] - python-version: [3.9] - runs-on: ${{ matrix.os }} - steps: - - name: 🏗 Setup Node - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - registry-url: https://registry.npmjs.org/ - - name: ⤵️ Download distribution artifact - uses: actions/download-artifact@v4 - with: - name: npm-pack - path: artifacts - - name: 🚀 Publish Distribution 📦 to npm - env: - NODE_AUTH_TOKEN: ${{ secrets.npm_api_token }} - run: | - find ./artifacts -name 'onica-runway-*.*.*.tgz' -exec npm publish --access public {} + build-pypi: name: Build PyPi 📦 runs-on: ubuntu-latest @@ -243,80 +59,10 @@ jobs: env: POETRY_PYPI_TOKEN_PYPI: ${{ secrets.pypi_password }} run: poetry publish - publish-s3: - name: Publish 📦 To S3 - needs: - - build-pyinstaller-onefile - env: - AWS_DEFAULT_REGION: us-west-2 - AWS_S3_BUCKET: common-runway-assets-bucket83908e77-u2xp1bj1tuhp # cspell:ignore common-runway-assets-bucket83908e77-u2xp1bj1tuhp - AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_key }} - runs-on: ubuntu-latest - steps: - - name: 🏗 Setup Python - uses: finleyfamily/action-setup-python@v1.0.0 - with: - poetry-install: false - - name: ⤵️ Download distribution artifacts (macOS) - uses: actions/download-artifact@v4 - with: - name: pyinstaller-onefile-macos-12 - path: artifacts - - name: ⤵️ Download distribution artifacts (ubuntu) - uses: actions/download-artifact@v4 - with: - name: pyinstaller-onefile-ubuntu-latest - path: artifacts - - name: ⤵️ Download distribution artifacts (windows) - uses: actions/download-artifact@v4 - with: - name: pyinstaller-onefile-windows-latest - path: artifacts - - name: 🚀 Install AWS CLI & Upload 📦 - run: | - pip install "awscli~=1.18.19" - aws s3 cp artifacts s3://$AWS_S3_BUCKET/runway/ --recursive --acl public-read - update-urlshortener: - name: Update URL Shortener - needs: - - publish-s3 - env: - BUCKET_NAME: common-runway-assets-bucket83908e77-u2xp1bj1tuhp - BUCKET_REGION: us-west-2 - TABLE: onica-urlshortener-prod - TABLE_REGION: us-east-1 - VERSION: ${{ github.ref }} - runs-on: ubuntu-latest - steps: - - name: ⤵️ Check out code from GitHub - uses: actions/checkout@v4 - - name: 🏗 Setup Python - uses: finleyfamily/action-setup-python@v1.0.0 - with: - poetry-plugins: poetry-dynamic-versioning[plugin] - - name: 🏗 Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.aws_access_key }} - aws-secret-access-key: ${{ secrets.aws_secret_key }} - aws-region: us-east-1 - - name: 🚀 Run Script - working-directory: .github/scripts/urlshortener - run: | - poetry run python update_urls.py \ - --bucket-name $BUCKET_NAME \ - --bucket-region $BUCKET_REGION \ - --table $TABLE \ - --table-region $TABLE_REGION \ - --version $VERSION \ - --latest notify-on-publish: name: Notify needs: - - publish-npm - publish-pypi - - update-urlshortener runs-on: ubuntu-latest steps: - name: ⤵️ Check out code from GitHub diff --git a/.gitignore b/.gitignore index e4a47a01a..66abfa70e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ !infrastructure/**/**/**/package.json -!runway/templates/**/.npmignore *.egg-info *.pyc *.pyo @@ -9,7 +8,6 @@ .eggs .idea .mypy_cache -.npmignore .runway .secrets .serverless diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 9eb419de4..92b0f2a0b 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -72,11 +72,20 @@ "maxNumberOfProblems": 100, "version": "0.2", "words": [ + "ALGS", + "EOCD", + "FQDNs", + "Fakhreddine", + "Inconsolata", + "Ngin", + "PYXMLSEC", + "Pipefile", + "SPHINXAUTOBUILD", + "SPHINXAUTOBUILDPORT", "absolutepath", "abstractmethod", "accesspoint", "addoption", - "ALGS", "appendleft", "arcname", "argparsing", @@ -115,11 +124,9 @@ "edgelambda", "ekscluster", "eksservicerole", - "EOCD", "errmsg", "excinfo", "execglobals", - "Fakhreddine", "filedes", "filedir", "filehandle", @@ -127,7 +134,6 @@ "fileinfos", "fileout", "foobarfoo", - "FQDNs", "frontmatter", "fstring", "furo", @@ -142,15 +148,16 @@ "humanreadable", "identless", "igittigitt", - "Inconsolata", "indentless", "instancerole", "intersphinx", "invalidtestkey", "keylist", "kwoa", + "libbz", "libltdl", "libmysqlclient", + "libncursesw", "libxmlsec", "lintfix", "locallocal", @@ -168,7 +175,6 @@ "nestedval", "newdir", "newfile", - "Ngin", "nitpicky", "nodegroup", "nodeinstanceprofile", @@ -184,12 +190,10 @@ "outputquery", "paravirtual", "partitionkey", - "Pipefile", "prehook", "prepad", "prevdir", "pyupgrade", - "PYXMLSEC", "readacl", "refreshable", "rglob", @@ -205,8 +209,6 @@ "shouldraise", "sourcebucket", "sourcekey", - "SPHINXAUTOBUILD", - "SPHINXAUTOBUILDPORT", "ssmstore", "ssword", "subclasscheck", diff --git a/.vscode/dictionaries/pypi.txt b/.vscode/dictionaries/pypi.txt index b8df9ffc3..cbb626db8 100644 --- a/.vscode/dictionaries/pypi.txt +++ b/.vscode/dictionaries/pypi.txt @@ -20,7 +20,6 @@ prettytable pydantic pydocstyle pyhcl -pyinstaller pywin pyyaml runpy diff --git a/Makefile b/Makefile index 349e7d00a..7fa7f4b08 100644 --- a/Makefile +++ b/Makefile @@ -16,14 +16,6 @@ help: ## show this message build: clean create-tfenv-ver-file ## build the PyPi release @poetry build -build-pyinstaller-file: clean create-tfenv-ver-file ## build Pyinstaller single file release (github) - @poetry dynamic-versioning - bash ./.github/scripts/cicd/build_pyinstaller.sh file - -build-pyinstaller-folder: clean create-tfenv-ver-file ## build Pyinstaller folder release (github) - @poetry dynamic-versioning - bash ./.github/scripts/cicd/build_pyinstaller.sh folder - clean: ## remove generated file from the project directory rm -rf ./build/ ./dist/ ./src/ ./tmp/ ./runway.egg-info/; rm -rf ./.pytest_cache ./.venv; @@ -90,23 +82,6 @@ lint-ruff: ## run ruff @poetry run ruff check . @echo "" -npm-ci: ## run "npm ci" with the option to ignore scripts - required to succeed for this project - @npm ci --ignore-scripts - -npm-install: ## run "npm install" with the option to ignore scripts - required to succeed for this project - @npm install --ignore-scripts - -# copies artifacts to src & npm package files to the root of the repo -npm-prep: ## process that needs to be run before creating an npm package - mkdir -p tmp - mkdir -p src - npm version $$(poetry version --short) --allow-same-version --no-git-tag-version - cp -r artifacts/$$(poetry version --short)/* src/ - cp npm/* . && cp npm/.[^.]* . - cp package.json tmp/package.json - jq ".name = \"$${NPM_PACKAGE_NAME-undefined}\"" tmp/package.json > package.json - rm -rf tmp/package.json - open-docs: ## open docs (HTML files must already exists) @make -C docs open @@ -118,6 +93,7 @@ run-pre-commit: ## run pre-commit for all files setup: setup-poetry setup-pre-commit setup-npm ## setup development environment setup-npm: npm-ci ## install node dependencies with npm + @npm ci setup-poetry: ## setup python virtual environment @poetry install $(POETRY_OPTS) --sync diff --git a/README.md b/README.md index 8b13a586f..87a8b0ee9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ [![CI/CD](https://github.com/onicagroup/runway/workflows/CI/CD/badge.svg?branch=master)](https://github.com/onicagroup/runway/actions?query=workflow%3ACI%2FCD) [![codecov](https://codecov.io/gh/onicagroup/runway/branch/master/graph/badge.svg?token=Ku28I0RY80)](https://codecov.io/gh/onicagroup/runway) [![PyPi](https://img.shields.io/pypi/v/runway?style=flat)](https://pypi.org/project/runway/) -[![npm](https://img.shields.io/npm/v/@onica/runway?style=flat)](https://www.npmjs.com/package/@onica/runway) [![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat)](https://github.com/psf/black) ![runway-example.gif](https://raw.githubusercontent.com/onicagroup/runway/master/docs/source/images/runway-example.gif) @@ -51,37 +50,6 @@ The example above contains enough information for Runway to deploy all resources ## Install -Runway is available via any of the following installation methods. Use whatever works best for your project/team (it's the same application no matter how you obtain it). - -### HTTPS Download (e.g cURL) - -Use one of the endpoints below to download a single-binary executable version of Runway based on your operating system. - -| Operating System | Endpoint | -| ---------------- | -------------------------------------- | -| Linux | | -| macOS | | -| Windows | | - -```shell -$ curl -L oni.ca/runway/latest/osx -o runway -$ chmod +x runway -$ ./runway new -``` - -**Suggested use:** CloudFormation or Terraform projects - -### npm - -```shell -$ npm i -D @onica/runway -$ npx runway new -``` - -**Suggested use:** Serverless or AWS CDK projects - -### pip (or poetry, etc) - ```shell $ pip install runway $ runway new @@ -90,8 +58,6 @@ $ poetry add --dev runway $ poetry run runway new ``` -**Suggested use:** Python projects - ## Documentation See the [doc site](https://runway.readthedocs.io) for full documentation. diff --git a/docs/source/cfngin/configuration.rst b/docs/source/cfngin/configuration.rst index e55d8b86a..5adafefbf 100644 --- a/docs/source/cfngin/configuration.rst +++ b/docs/source/cfngin/configuration.rst @@ -4,7 +4,7 @@ Configuration ############# -In addition to the :ref:`Runway Config File `, there are two files that can be used for configuration: +In addition to the :ref:`runway_config:Runway Config File`, there are two files that can be used for configuration: - a YAML :ref:`configuration file ` **[REQUIRED]** - a key/value :ref:`environment file ` @@ -48,7 +48,7 @@ Parameters Runway can pass :term:`Parameters` to a CloudFormation module in place of or in addition to values in an :ref:`environment file `. When :term:`Parameters` are passed to the module, the data type is retained (e.g. ``array``, ``boolean``, ``mapping``). -A typical usage pattern would be to use :ref:`Runway Lookups ` in combination with :term:`Parameters` to pass :term:`Deploy Environment` and/or region specific values to the module from the :ref:`Runway Config File `. +A typical usage pattern would be to use :ref:`Runway Lookups ` in combination with :term:`Parameters` to pass :term:`Deploy Environment` and/or region specific values to the module from the :ref:`runway_config:Runway Config File`. .. rubric:: Example .. code-block:: yaml @@ -313,7 +313,7 @@ Top-Level Fields :type: Optional[List[cfngin.hook]] :value: [] - Python functions/methods that are executed after processing the stacks in the config while using the :ref:`deploy command `. + Python functions/methods that are executed after processing the stacks in the config while using the :ref:`commands:deploy` command. See :ref:`Hooks ` for more detailed information. @@ -333,7 +333,7 @@ Top-Level Fields :type: Optional[List[cfngin.hook]] :value: [] - Python functions/methods that are executed after processing the stacks in the config while using the :ref:`destroy command `. + Python functions/methods that are executed after processing the stacks in the config while using the :ref:`commands:destroy` command. See :ref:`Hooks ` for more detailed information. @@ -347,7 +347,7 @@ Top-Level Fields :type: Optional[List[cfngin.hook]] :value: [] - Python functions/methods that are executed before processing the stacks in the config while using the :ref:`deploy command `. + Python functions/methods that are executed before processing the stacks in the config while using the :ref:`commands:deploy` command. See :ref:`Hooks ` for more detailed information. @@ -364,7 +364,7 @@ Top-Level Fields :type: Optional[List[cfngin.hook]] :value: [] - Python functions/methods that are executed before processing the stacks in the config while using the :ref:`destroy command `. + Python functions/methods that are executed before processing the stacks in the config while using the :ref:`commands:destroy` command. See :ref:`Hooks ` for more detailed information. @@ -873,7 +873,7 @@ The files must also be stored at the root of the module's directory. The region can optionally be omitted to apply a single file to all regions. Files following both naming schemes may be used. The file with the most specific name takes precedence. -Values passed in as ``parameters`` from the :ref:`Runway Config File ` take precedence over those provided in an environment file. +Values passed in as ``parameters`` from the :ref:`runway_config:Runway Config File` take precedence over those provided in an environment file. Usage diff --git a/docs/source/cfngin/persistent_graph.rst b/docs/source/cfngin/persistent_graph.rst index 102943709..7aba209c2 100644 --- a/docs/source/cfngin/persistent_graph.rst +++ b/docs/source/cfngin/persistent_graph.rst @@ -9,7 +9,7 @@ This is used to determine the order in which to execute them. This :term:`graph` can be persisted between runs to track the removal of :class:`stacks ` from the config file. When a |Stack| is present in the persistent graph but not in the :term:`graph` constructed from the config file, CFNgin will delete the Stack from CloudFormation. -This takes effect when running either the :ref:`deploy command ` or :ref:`destroy command `. +This takes effect when running either the :ref:`commands:deploy` command or :ref:`commands:destroy` command. To enable persistent graph, define the :attr:`~cfngin.config.persistent_graph_key` field as a unique value that will be used to construct the path to the persistent graph object in S3. This object is stored in the |cfngin_bucket| which is also used for CloudFormation templates. diff --git a/docs/source/commands.rst b/docs/source/commands.rst index e69d021f2..f1d6ab404 100644 --- a/docs/source/commands.rst +++ b/docs/source/commands.rst @@ -12,8 +12,6 @@ Commands :ellipsis: 13 -.. _command-deploy: - ****** deploy ****** @@ -32,7 +30,6 @@ deploy ---- -.. _command-destroy: ******* destroy @@ -52,7 +49,6 @@ destroy ---- -.. _command-dismantle: ********* dismantle @@ -72,7 +68,6 @@ dismantle ---- -.. _command-docs: **** docs @@ -90,7 +85,6 @@ docs ---- -.. _command-envvars: ******* envvars @@ -110,7 +104,6 @@ envvars ---- -.. _command-gen-sample: ********** gen-sample @@ -129,7 +122,6 @@ gen-sample ---- -.. _command-init: **** init @@ -149,8 +141,6 @@ init ---- -.. _command-kbenv: -.. _command-kbenv-install: ************* kbenv install @@ -169,7 +159,6 @@ kbenv install ---- -.. _command-kbenv-list: ********** kbenv list @@ -187,7 +176,6 @@ kbenv list ---- -.. _command-kbenv-run: ********* kbenv run @@ -206,7 +194,6 @@ kbenv run ---- -.. _command-kbenv-uninstall: *************** kbenv uninstall @@ -225,7 +212,6 @@ kbenv uninstall ---- -.. _command-new: **** new @@ -244,7 +230,6 @@ new ---- -.. _command-plan: **** plan @@ -252,7 +237,7 @@ plan .. file://./../../runway/_cli/commands/_plan.py -.. note:: Currently only supported for :ref:`mod-cdk`, :ref:`mod-cfn`, and :ref:`mod-tf`. +.. note:: Currently only supported for :ref:`index:AWS Cloud Development Kit (CDK)`, :ref:`index:CloudFormation & Troposphere`, and :ref:`index:Terraform`. .. command-output:: runway new --help @@ -266,7 +251,6 @@ plan ---- -.. _command-preflight: ********* preflight @@ -284,7 +268,6 @@ preflight ---- -.. _command-run-python: ********** run-python @@ -302,7 +285,6 @@ run-python ---- -.. _command-schema-cfngin: ************* schema cfngin @@ -320,7 +302,6 @@ schema cfngin ---- -.. _command-schema-runway: ************* schema runway @@ -338,7 +319,6 @@ schema runway ---- -.. _command-takeoff: ******* takeoff @@ -358,7 +338,6 @@ takeoff ---- -.. _command-taxi: **** taxi @@ -378,7 +357,6 @@ taxi ---- -.. _command-test: **** test @@ -396,8 +374,6 @@ test ---- -.. _command-tfenv: -.. _command-tfenv-install: ************* tfenv install @@ -415,7 +391,6 @@ tfenv install ---- -.. _command-tfenv-list: ********** tfenv list @@ -433,7 +408,6 @@ tfenv list ---- -.. _command-tfenv-run: ********* tfenv run @@ -452,7 +426,6 @@ tfenv run ---- -.. _command-tfenv-uninstall: *************** tfenv uninstall @@ -471,7 +444,6 @@ tfenv uninstall ---- -.. _command-whichenv: ******** whichenv diff --git a/docs/source/conf.py b/docs/source/conf.py index 1e9da9925..acc34fa18 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -129,7 +129,7 @@ # -- Options of sphinx.ext.autosectionlabel ---------------------------------- # https://www.sphinx-doc.org/en/master/usage/extensions/autosectionlabel.html -autosectionlabel_maxdepth = 2 +# autosectionlabel_maxdepth = 4 autosectionlabel_prefix_document = True diff --git a/docs/source/defining_tests.rst b/docs/source/defining_tests.rst index b338f51f1..36601b31e 100644 --- a/docs/source/defining_tests.rst +++ b/docs/source/defining_tests.rst @@ -4,8 +4,8 @@ Defining Tests ############## -:ref:`Tests` can be defined in the :ref:`runway config file` to test your modules in any way you desire before deploying. -They are run by using the ``runway test`` :ref:`command`. +:ref:`Tests ` can be defined in the :ref:`runway_config:Runway Config File` to test your modules in any way you desire before deploying. +They are run by using the ``runway test`` :ref:`command `. Tests are run in the order they are defined. .. rubric:: Example: @@ -58,7 +58,7 @@ cfn-lint *and additional checks. Includes checking valid values for resource properties* *and best practices*. -In order to use this test, there must be a ``.cfnlintrc`` file in the same directory as the :ref:`Runway config file`. +In order to use this test, there must be a ``.cfnlintrc`` file in the same directory as the :ref:`runway_config:Runway Config File`. .. rubric:: Example: .. code-block:: yaml @@ -101,7 +101,7 @@ yamllint *problems such as lines length, trailing spaces, indentation, etc*. A ``.yamllint`` file can be placed at in the same directory as the -:ref:`Runway config file` to customize the linter or, +:ref:`runway_config:Runway Config File` to customize the linter or, the Runway provided template will be used. .. rubric:: Example: diff --git a/docs/source/developers/advanced_configuration.rst b/docs/source/developers/advanced_configuration.rst index 9cbd32894..dfbf4cd37 100644 --- a/docs/source/developers/advanced_configuration.rst +++ b/docs/source/developers/advanced_configuration.rst @@ -50,7 +50,7 @@ Environment variables can be used to alter the functionality of Runway. :type: str :noindex: - Explicitly enable/disable colorized output for :ref:`CDK `, :ref:`Serverless `, and :ref:`Terraform ` modules. + Explicitly enable/disable colorized output for :ref:`index:AWS Cloud Development Kit (CDK)`, :ref:`index:Serverless Framework`, and :ref:`index:Terraform` :term:`Modules `. Having this set to a truthy value will prevent ``-no-color``/``--no-color`` from being added to any commands even if stdout is not a TTY. Having this set to a falsy value will include ``-no-color``/``--no-color`` in commands even if stdout is a TTY. If the IaC tool has other mechanisms for disabling color output, using a truthy value will not circumvent them. diff --git a/docs/source/developers/pyinstaller.rst b/docs/source/developers/pyinstaller.rst deleted file mode 100644 index 11c7b8172..000000000 --- a/docs/source/developers/pyinstaller.rst +++ /dev/null @@ -1,27 +0,0 @@ -##################################### -Building Pyinstaller Packages Locally -##################################### - -We use Pyinstaller_ to build executables that do not require Python to be installed on a system. -These are built by Travis CI for distribution to ensure a consistent environment but they can also be build locally for testing. - -.. _Pyinstaller: https://pypi.org/project/PyInstaller/ - - -************* -Prerequisites -************* - -These need to be installed globally. - -- `poetry `__ - - -******* -Process -******* - -1. Export ``OS_NAME`` environment variable for your system (``ubuntu-22.04``, ``macos-12``, or ``windows-latest``). -2. Execute ``make build-pyinstaller-file`` or ``make build-pyinstaller-folder`` from the root of the repo. - -The output of these commands can be found in ``./artifacts`` diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index e8360a480..f568fcda2 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -8,9 +8,8 @@ Getting Started Guide Basic Concepts ************** -Welcome to Runway! To get a basic understanding of Runway, we have listed out -the key concepts below that you will need to get started with deploying your -first module. +Welcome to Runway! +To get a basic understanding of Runway, we have listed out the key concepts below that you will need to get started with deploying your first module. Runway Config File @@ -23,31 +22,26 @@ It defines the modules that will be managed by Runway. Deployment ========== -A deployment contains a list of modules and options for all the modules in the deployment. -A Runway config file can contain multiple deployments and a deployment can contain multiple modules. +A :term:`Deployment` contains a list of :term:`Modules ` and options for all the :term:`Modules ` in the deployment. +A Runway config file can contain multiple :term:`Deployments ` and a :term:`Deployment` can contain multiple :term:`Modules `. Module ====== -A module is a directory containing a single infrastructure as code tool -configuration of an application, a component, or some infrastructure -(eg. a set of CloudFormation templates). +A :term:`Module` is a directory containing a single infrastructure as code tool configuration of an application, a component, or some infrastructure (eg. a set of CloudFormation templates). It is defined in a deployment by path. -Modules can also contain granular options that only pertain to it. +:term:`Modules ` can also contain granular options that only pertain to it. Deploy Environment ================== -Deploy environments are used for selecting the options/variables/parameters to -be used with each modules . -They can be defined by the name of a directory (if its not a git repo), -git branch, or environment variable (``DEPLOY_ENVIRONMENT``). -Standard environments would be something like prod, dev, and test. +:term:`Deploy Environments ` are used for selecting the options/variables/parameters to be used with each :term:`Modules `. +They can be defined by the name of a directory (if its not a git repo), git branch, or environment variable (``DEPLOY_ENVIRONMENT``). +Standard environments would be something like ``prod``, ``dev``, and ``test``. -No matter how the environment is determined, the name is made available -to be consumed by your modules as the ``DEPLOY_ENVIRONMENT`` environment variable. +No matter how the environment is determined, the name is made available to be consumed by your modules as the ``DEPLOY_ENVIRONMENT`` environment variable. @@ -55,8 +49,7 @@ to be consumed by your modules as the ``DEPLOY_ENVIRONMENT`` environment variabl Deploying Your First Module *************************** -#. Create a directory for our project and change directory into the new - directory. +#. Create a directory for our project and change directory into the new directory. .. code-block:: sh @@ -69,51 +62,76 @@ Deploying Your First Module $ git init && git checkout -b ENV-dev -#. Download Runway using :ref:`curl`. Be sure to use the endpoint - that corresponds to your operating system. Then, change the downloaded - file's permissions to allow execution. +#. Install Runway. .. tab-set:: - .. tab-item:: Linux + .. tab-item:: poetry (recommended) + :sync: poetry - .. code-block:: sh + .. code-block:: console - $ curl -L https://oni.ca/runway/latest/linux -o runway - $ chmod +x runway + $ poetry init --quiet + $ poetry add --group deploy runway - .. tab-item:: macOS + .. tab-item:: pip (Unix/macOS) + :sync: pip-unix - .. code-block:: sh + .. code-block:: console - $ curl -L https://oni.ca/runway/latest/osx -o runway - $ chmod +x runway + $ python -m venv .venv + $ source .venv/bin/activate + $ pip install runway - .. tab-item:: Windows + .. tab-item:: pip (Windows) + :sync: pip-win - .. code-block:: powershell + .. code-block:: console - Invoke-WebRequest -Uri "https://oni.ca/runway/latest/windows" -OutFile runway + $ python -m venv .venv + $ .venv\Scripts\activate + $ pip install runway -#. Use Runway to generate a sample module using the :ref:`gen-sample` command. - This will give us a preformatted module` command. + This will give us a preformatted CloudFormation :term:`Module` that is ready to be deployed after we change a few variables. + To read more about the directory structure, see :ref:`repo_structure:Repo Structure`. .. code-block:: sh $ ./runway gen-sample cfn -#. To finish configuring our CloudFormation module, lets open the - ``dev-us-east-1.env`` file that was created in ``sampleapp.cfn/``. - Here is where we will define values for our stacks that will be deployed as - part of the **dev** environment in the **us-east-1** region. + .. tab-set:: + + .. tab-item:: poetry (recommended) + :sync: poetry + + .. code-block:: console + + $ poetry shell + $ runway gen-sample cfn + + .. tab-item:: pip (Unix/macOS) + :sync: pip-unix + + .. code-block:: console + + $ runway gen-sample cfn + + .. tab-item:: pip (Windows) + :sync: pip-win + + .. code-block:: console + + $ runway gen-sample cfn + +#. To finish configuring our CloudFormation :term:`Module`, lets open the ``dev-us-east-1.env`` file that was created in ``sampleapp.cfn/``. + Here is where we will define values for our stacks that will be deployed as part of the **dev** environment in the **us-east-1** region. Replace the place holder values in this file with your own information. - It is important that the ``cfngin_bucket_name`` value is globally unique for - this example as it will be used to create a new S3 bucket. + It is important that the ``cfngin_bucket_name`` value is globally unique for this example as it will be used to create a new S3 bucket. .. code-block:: yaml :caption: dev-us-east-1.env + :linenos: namespace: onica-dev customer: onica @@ -122,18 +140,17 @@ Deploying Your First Module # The CFNgin bucket is used for CFN template uploads to AWS cfngin_bucket_name: cfngin-onica-us-east-1 -#. With the module ready to deploy, now we need to create our Runway config file. - To do this, use the :ref:`new` command to generate a sample - file at the root of the project repo. +#. With the :term:`Module` ready to deploy, now we need to create our Runway config file. + To do this, use the :ref:`commands:new` command to generate a sample file at the root of the project repo. - .. code-block:: sh + .. code-block:: console - $ ./runway new + $ runway new .. code-block:: yaml :caption: runway.yml + :linenos: - --- # See full syntax at https://runway.readthedocs.io deployments: - modules: @@ -143,18 +160,13 @@ Deploying Your First Module regions: - us-east-1 -#. Now, we need to modify the ``runway.yml`` file that was just created to - tell it where the module is located that we want it to deploy and what - regions it will be deployed to. - Each module type has their own configuration options which are described in - more detail in the :ref:`Module Configurations` - section but, for this example we are only concerned with the - :ref:`CloudFormation module configuration`. +#. Now, we need to modify the ``runway.yml`` file that was just created to tell it where the :term:`Module` is located that we want it to deploy and what regions it will be deployed to. + Each :term:`Module` type has their own configuration options which are described in more detail in the :ref:`index:Module Configuration` section but, for this example we are only concerned with the :ref:`index:CloudFormation & Troposphere`. .. code-block:: yaml :caption: runway.yml + :linenos: - --- # See full syntax at https://runway.readthedocs.io deployments: - modules: @@ -162,28 +174,23 @@ Deploying Your First Module regions: - us-east-1 -#. Before we deploy, it is always a good idea to know how the module will - impact the currently deployed infrastructure in your AWS account. - This is less of a concern for net-new infrastructure as it is when making - modifications. - But, for this example, lets run the :ref:`plan` command to see - what is about to happen. +#. Before we deploy, it is always a good idea to know how the :term:`Module` will impact the currently deployed infrastructure in your AWS account. + This is less of a concern for net-new infrastructure as it is when making modifications. + But, for this example, lets run the :ref:`commands:plan` command to see what is about to happen. - .. code-block:: shell + .. code-block:: console - $ ./runway plan + $ runway plan #. We are finally ready to deploy! - Use the :ref:`deploy` command to deploy our module. + Use the :ref:`commands:deploy` command to deploy our :term:`Module`. - .. code-block:: shell + .. code-block:: console - $ ./runway deploy + $ runway deploy We have only scratched the surface with what is possible in this example. -Proceed below to find out how to delete the module we just deployed or, -review the pages linked throughout this section to learn more about what we -have done to this point before continuing. +Proceed below to find out how to delete the :term:`Module` we just deployed or, review the pages linked throughout this section to learn more about what we have done to this point before continuing. @@ -191,29 +198,21 @@ have done to this point before continuing. Deleting Your First Module ************************** -From the root of the project directory we created in -`Deploying Your First Module`_ we only need to run the -:ref:`destroy` command to remove what we have deployed. - -.. code-block:: shell +From the root of the project directory we created in `Deploying Your First Module`_ we only need to run the :ref:`commands:destroy` command to remove what we have deployed. - $ ./runway destroy +.. code-block:: console + $ runway destroy -.. _non-interactive-mode: ***************************************** Execution Without A TTY (non-interactive) ***************************************** -Runway allows you to set an environment variable to allow execution without a -TTY or if STDIN is closed. -This allows users to execute Runway :ref:`deployments` in -their CI/CD infrastructure as code deployment systems avoiding the -``EOF when reading a line`` error message. -In order to execute runway without a TTY, set the ``CI`` environment variable -before your ``runway [deploy|destroy]`` execution. +Runway allows you to set an environment variable to allow execution without a TTY or if STDIN is closed. +This allows users to execute Runway :term:`Deployments ` in their CI/CD infrastructure as code deployment systems avoiding the ``EOF when reading a line`` error message. +In order to execute Runway without a TTY, set the ``CI`` environment variable before your ``runway [deploy|destroy]`` execution. .. important:: Executing Runway in this way will cause Runway to perform updates in your environment without prompt. diff --git a/docs/source/index.rst b/docs/source/index.rst index aea642802..60b13ef75 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -26,15 +26,11 @@ Runway is a lightweight wrapper around infrastructure deployment (e.g. CloudForm ---- -.. _module-configurations: - ******************** Module Configuration ******************** -.. _mod-cdk: - AWS Cloud Development Kit (CDK) =============================== @@ -56,8 +52,6 @@ This means that the CDK must be included as a dev dependency in the **package.js cdk/advanced_features -.. _mod-cfn: - CloudFormation & Troposphere ============================ @@ -81,8 +75,6 @@ It is able to deploy raw CloudFormation templates (JSON & YAML) and Troposphere_ .. _Troposphere: https://github.com/cloudtools/troposphere -.. _mod-k8s: - Kubernetes ========== @@ -104,8 +96,6 @@ Kubernetes manifests can be deployed via Runway offering an ideal way to handle kubernetes/advanced_features -.. _mod-sls: - Serverless Framework ==================== @@ -127,8 +117,6 @@ This means that Serverless must be included as a dev dependency in the **package serverless/advanced_features -.. _mod-staticsite: - Static Site =========== @@ -157,8 +145,6 @@ A start-to-finish example walkthrough is available in the :ref:`Conduit quicksta staticsite/advanced_features -.. _mod-tf: - Terraform ========= diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 9173b6de4..ec5b879dc 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -1,144 +1,54 @@ -.. _install: - ############ Installation ############ -To enable Runway to conform to our users' varying use cases, we have made it -available via three different install methods - `cURL`_, `npm`_, and `pip`_. - - -.. _install-curl: - -**** -cURL -**** - -Arguably the easiest way to install Runway is by using curl. Use one of the -endpoints below to download a single-binary executable version of Runway based -on your operating system. - -+------------------+---------------------------------------------------+ -| Operating System | Endpoint | -+==================+===================================================+ -| Linux | https://oni.ca/runway/latest/linux | -+------------------+---------------------------------------------------+ -| macOS | https://oni.ca/runway/latest/osx | -+------------------+---------------------------------------------------+ -| Windows | https://oni.ca/runway/latest/windows | -+------------------+---------------------------------------------------+ - -.. tab-set:: - - .. tab-item:: Linux - - .. code-block:: sh - - curl -L https://oni.ca/runway/latest/linux -o runway - - .. tab-item:: macOS - - .. code-block:: sh - - curl -L https://oni.ca/runway/latest/osx -o runway - - .. tab-item:: Windows - - .. code-block:: powershell - - Invoke-WebRequest -Uri "https://oni.ca/runway/latest/windows" -OutFile runway - -.. note:: To install a specific version of Runway, you can replace ``latest`` - with a version number. - -.. rubric:: Usage - -To use the single-binary, run it directly as shown below. Please note that -after download, you may need to adjust the permissions before it can be -executed. (eg. Linux/macOS:``chmod +x runway``) - -.. code-block:: sh - - $ ./runway deploy -**Suggested use:** CloudFormation or Terraform projects - - -.. _install-npm: - -*** -npm -*** - -Runway is published on npm as ``@onica/runway``. -It currently contains binaries to support macOS, Ubuntu, and Windows. - -While Runway can be installed globally like any other npm package, we strongly -recommend using it per-project as a dev dependency. -See `Why Version Lock Per-Project`_ for more info regarding this suggestion. - -.. code-block:: shell - - $ npm i -D @onica/runway - -.. rubric:: Usage - -.. code-block:: shell - - $ npx runway deploy - -**Suggested use:** Serverless or AWS CDK projects - - -.. _install-python: - -*** -pip -*** - -Runway runs on Python 2.7 and Python 3.5+. - -Runway is hosted on PyPI as the package named ``runway``. -It can be installed like any other Python package, but we instead strongly recommend using it -per-project with `poetry `_. +Runway can be installed like any other Python package, but we instead strongly recommend using it per-project with :link:`poetry`. See `Why Version Lock Per-Project`_ for more info regarding this suggestion. -**Suggested use:** Python projects - .. tab-set:: - .. tab-item:: poetry + .. tab-item:: poetry (recommended) + :sync: poetry - .. code-block:: sh + .. code-block:: console - poetry add runway + $ poetry add runway .. tab-item:: pip + :sync: pip - .. code-block:: sh + .. code-block:: console - pip install --user runway + $ pip install --user runway # or (depending on how Python was installed) - pip install runway + $ pip install runway .. rubric:: Usage .. tab-set:: .. tab-item:: poetry + :sync: poetry - .. code-block:: sh + .. code-block:: console - poetry run runway --help + $ poetry run runway --help .. tab-item:: pip + :sync: pip + + .. code-block:: console + + $ runway --help - .. code-block:: sh - runway --help +.. versionremoved:: 2.8.0 + Support for installation via cURL and npm was removed. + Prior versions published to npm will remain, in a deprecated/unsupported state, indefinably. + Prior versions published to S3 will be removed at a date yet to be determined. -.. _why-version-lock: **************************** Why Version Lock Per-Project diff --git a/docs/source/kubernetes/configuration.rst b/docs/source/kubernetes/configuration.rst index d092bab9d..25cf6087e 100644 --- a/docs/source/kubernetes/configuration.rst +++ b/docs/source/kubernetes/configuration.rst @@ -4,7 +4,7 @@ Configuration ############# -Configuration options and parameters for :ref:`Kubernetes ` modules. +Configuration options and parameters for :ref:`index:Kubernetes` :term:`Modules `. @@ -46,4 +46,4 @@ Options Parameters ********** -:ref:`Kubernetes ` does not support the use of :attr:`deployment.parameters`/:attr:`module.parameters` at this time. +:ref:`index:Kubernetes` does not support the use of :attr:`deployment.parameters`/:attr:`module.parameters` at this time. diff --git a/docs/source/kubernetes/directory_structure.rst b/docs/source/kubernetes/directory_structure.rst index c6d45d9f3..046e3fb7f 100644 --- a/docs/source/kubernetes/directory_structure.rst +++ b/docs/source/kubernetes/directory_structure.rst @@ -4,7 +4,7 @@ Directory Structure ################### -Example directory structures for a :ref:`Kubernetes ` module. +Example directory structures for a :ref:`index:Kubernetes` :term:`Module`. .. code-block:: diff --git a/docs/source/kubernetes/examples.rst b/docs/source/kubernetes/examples.rst index 3f5e7d117..3b7acecdb 100644 --- a/docs/source/kubernetes/examples.rst +++ b/docs/source/kubernetes/examples.rst @@ -4,7 +4,7 @@ Examples ######## -Example uses of the :ref:`Kubernetes ` module +Example uses of the :ref:`index:Kubernetes` :term:`Module` diff --git a/docs/source/lookups/env.rst b/docs/source/lookups/env.rst index 0f7869bf3..5f4338f15 100644 --- a/docs/source/lookups/env.rst +++ b/docs/source/lookups/env.rst @@ -16,7 +16,7 @@ These environment variables are manipulated at runtime by Runway to fill in addi .. note:: ``DEPLOY_ENVIRONMENT`` and ``AWS_REGION`` can only be resolved during the processing of a module. - To ensure no error occurs when trying to resolve one of these in a :ref:`Deployment ` definition, provide a default value. + To ensure no error occurs when trying to resolve one of these in a :ref:`Deployment ` definition, provide a default value. If the Lookup is unable to find an environment variable matching the provided query, the default value is returned or a :exc:`ValueError` is raised if a default value was not provided. diff --git a/docs/source/lookups/index.rst b/docs/source/lookups/index.rst index ce120330c..8b9cc7d08 100644 --- a/docs/source/lookups/index.rst +++ b/docs/source/lookups/index.rst @@ -5,7 +5,7 @@ Lookups ####### Runway Lookups allow the use of variables within the Runway config file. -These variables can then be passed along to :ref:`deployments `, :ref:`modules ` and :ref:`tests `. +These variables can then be passed along to :ref:`Deployment `, :ref:`Modules ` and :ref:`tests `. The syntax for a lookup is ``${ ::=}``. diff --git a/docs/source/maintainers/release_process.rst b/docs/source/maintainers/release_process.rst index 968c2b3d2..6af125b08 100644 --- a/docs/source/maintainers/release_process.rst +++ b/docs/source/maintainers/release_process.rst @@ -32,7 +32,5 @@ Execution #. Publish the release. -At this point, GitHub Actions will begin building the deployment packages & automatically publishing them to npm, PyPi, and AWS S3. +At this point, GitHub Actions will begin building the deployment package & automatically publishing it to PyPI. The **Publish Release** workflow can be monitored for progress. -It can take around 20 minutes for the process to complete. -At which time, the logs and package repositories should be checked to verify that the release was published successfully. diff --git a/docs/source/python_setup.rst b/docs/source/python_setup.rst deleted file mode 100644 index f759fab69..000000000 --- a/docs/source/python_setup.rst +++ /dev/null @@ -1,81 +0,0 @@ -.. _python-setup: - -Python Setup -============ - -Perform the following to install/configure Python & package management tools. - -.. note:: All commands below are to be run as your user. - (i.e. not root/sudo/Administrator). - -1. Ensure you have a working python environment: - - On macOS: - - Note: Substitute ``.bash_profile`` in place of ``.zshrc`` below if using Bash (e.g. macOS pre-Catalina) - - Add local python bin directories to $PATH:: - - PYTHONVER=$(python3 -c "import sys;print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))") - if ! grep -s '\.local\/bin' ~/.zshrc > /dev/null 2>&1 || ! grep -s "Library\/Python\/$PYTHONVER/bin" ~/.zshrc > /dev/null 2>&1 ; then echo "export PATH=\"\$HOME/Library/Python/$PYTHONVER/bin:\$HOME/.local/bin:\$PATH\"" >> ~/.zshrc; fi - - - Run ``source ~/.zshrc`` to use the updated PATH. - - - On Windows: - - Install :link:`Python` (choose the latest ``Windows x86-64 executable installer`` and run it): - - On the initial setup page, click ``Customize installation`` - - Leave all Optional Features selected, and click Next - - On the Advanced Options page change the following options and click Install: - - Check the ``Install for all users`` and ``Add Python to environment variables`` options. - - Change the install location to ``C:\Python37`` (updating ``Python37`` to the appropriate directory for the installed version, e.g. ``Python39`` for Python 3.9) - - At the ``Setup was successful`` screen, click ``Disable path length limit`` and then close the setup program. - - Edit the Path environment variable for your user: - - In the Start Menu, start typing ``environment variables`` and select ``Edit environment variables for your account``. - - In the User variables for your username, select ``Path`` and click ``Edit...`` - - Append ``%USERPROFILE%\AppData\Roaming\Python\Python37\Scripts`` & ``%USERPROFILE%\.local\bin`` to the current Variable values and click Ok - - Change ``Python37`` to the appropriate directory for the installed version (e.g. ``Python39`` for Python 3.9) - - In Windows Server 2016, the value is shown in a single line -- add it with semicolons:: - - %USERPROFILE%\AppData\Roaming\Python\Python37\Scripts;%USERPROFILE%\.local\bin; - - - Click Ok to close the Environment Variables window. - - Close all existing PowerShell windows and launch a new one to use the updated PATH. - - - On Ubuntu Linux: - - Add local python bin directory to $PATH:: - - if ! grep 'HOME\/\.local\/bin' ~/.bash_profile > /dev/null 2>&1; then echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.bash_profile; fi - - - Run ``source ~/.bash_profile`` to use the updated PATH. - - Install Python 3 and dependencies:: - - sudo apt -y install python3-pip - -2. Install python package managers:: - - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - - -Package Installation --------------------- - -Afterwards, your user will be able to install additional Python packages using -one of the following tools. Each wraps the base pip package manager and -automatically manages virtual environments to ensure package dependencies don't -conflict. - -pipx -~~~~ - -Global CLIs & utilities, like the AWS CLI, can be installed via -`pipx `_:: - - pipx install awscli - -poetry -~~~~~~ - -Utilities used in a project should generally have their versions stored in the -project repository, so users (now and in the future) and remote build systems -use the same versions specified in the repo. - -`poetry `_ works similarly to pipx, but -creates a lockfile that can be checked into a repo:: - - poetry add --dev runway diff --git a/docs/source/quickstart/cloudformation.rst b/docs/source/quickstart/cloudformation.rst index 44a946bbc..fefa16369 100644 --- a/docs/source/quickstart/cloudformation.rst +++ b/docs/source/quickstart/cloudformation.rst @@ -4,8 +4,7 @@ CloudFormation Quickstart ######################### -#. Prepare the project directory. See :ref:`Repo Structure` - for more details. +#. Prepare the project directory. See :ref:`repo_structure:Repo Structure` for more details. .. code-block:: sh @@ -13,11 +12,9 @@ CloudFormation Quickstart $ git init && git checkout -b ENV-dev #. Download/install Runway. - To see available install methods, see :ref:`Installation`. + To see available install methods, see :ref:`installation:Installation`. -#. Use Runway to :ref:`generate a sample` CloudFormation - module` CloudFormation :ref:`Module `, edit the values in the environment file, and create a :ref:`runway_config:Runway Config File` to use the :term:`Module`. .. tab-set:: @@ -56,7 +53,7 @@ CloudFormation Quickstart "@ $RunwayTemplate | Out-File -FilePath runway.yml -Encoding ASCII -#. :ref:`Deploy` the stack. +#. :ref:`Deploy ` the stack. .. code-block:: sh diff --git a/docs/source/quickstart/conduit.rst b/docs/source/quickstart/conduit.rst index 3fc16e0ea..742aab769 100644 --- a/docs/source/quickstart/conduit.rst +++ b/docs/source/quickstart/conduit.rst @@ -30,7 +30,7 @@ Setup ***** #. Prepare the project directory. - See :ref:`Repo Structure` for more details. + See :ref:`repo_structure:Repo Structure` for more details. .. code-block:: sh @@ -40,7 +40,7 @@ Setup $ git checkout -b ENV-dev #. Download/install Runway. - To see available install methods, see :ref:`Installation`. + To see available install methods, see :ref:`installation:Installation`. #. Download the source files. diff --git a/docs/source/quickstart/other_ways_to_use.rst b/docs/source/quickstart/other_ways_to_use.rst index 1948b6cc2..0f951258c 100644 --- a/docs/source/quickstart/other_ways_to_use.rst +++ b/docs/source/quickstart/other_ways_to_use.rst @@ -5,11 +5,7 @@ Other Ways to Use Runway ######################## -While we recommend using one of the install methods outlined in the -:ref:`Installation` section, we realize that these may not be an -option for some so we have provided a `CloudFormation`_ template for spinning -up a deploy environment in AWS and a `Docker`_ image/Dockerfile that can be -used to run Runway. +While we recommend using one of the install methods outlined in the :ref:`installation:Installation` section, we realize that these may not be an option for some so we have provided a `CloudFormation`_ template for spinning up a deploy environment in AWS and a `Docker`_ image/Dockerfile that can be used to run Runway. @@ -17,18 +13,13 @@ used to run Runway. CloudFormation ************** -This `CloudFormation template`_ is probably the easiest and quickest way to go -from "zero to Runway" as it allows for using an IAM Role eliminate the need to -configure API keys. +This `CloudFormation template`_ is probably the easiest and quickest way to go from "zero to Runway" as it allows for using an IAM Role eliminate the need to configure API keys. The template will deploy your preference of Linux or Windows Runway host. -Windows Runway host includes Visual Studio Code, which some users may -find easier for manipulating Runway config files. +Windows Runway host includes Visual Studio Code, which some users may find easier for manipulating Runway config files. ****** Docker ****** -Docker users can build their own Docker image to run a local Runway -container or modify this `Dockerfile`_ to build a Runway image to suit specific -needs. +Docker users can build their own Docker image to run a local Runway container or modify this `Dockerfile`_ to build a Runway image to suit specific needs. diff --git a/docs/source/quickstart/private_static_site.rst b/docs/source/quickstart/private_static_site.rst index f8185bb0a..bbcc636a3 100644 --- a/docs/source/quickstart/private_static_site.rst +++ b/docs/source/quickstart/private_static_site.rst @@ -27,7 +27,7 @@ Project Setup ============= #. Download/install Runway. - To see available install methods, see :ref:`Installation`. + To see available install methods, see :ref:`installation:Installation`. #. From a directory of your choosing run the following to generate a sample React project: @@ -43,7 +43,7 @@ Project Setup $ mv static-react my-static-site #. Change directories into the new project folder and prepare the project directory. - See :ref:`Repo Structure` for more details. + See :ref:`repo_structure:Repo Structure` for more details. .. code-block:: shell diff --git a/docs/source/repo_structure.rst b/docs/source/repo_structure.rst index 4234736bb..b073320f1 100644 --- a/docs/source/repo_structure.rst +++ b/docs/source/repo_structure.rst @@ -1,5 +1,3 @@ -.. _repo-structure: - ############## Repo Structure ############## diff --git a/docs/source/runway_config.rst b/docs/source/runway_config.rst index b26f09968..d5972e7b9 100644 --- a/docs/source/runway_config.rst +++ b/docs/source/runway_config.rst @@ -1,5 +1,3 @@ -.. _runway-config: - ################## Runway Config File ################## @@ -76,7 +74,7 @@ Top-Level Configuration :type: Optional[List[test]] :value: [] - List of Runway test definitions that are executed with the :ref:`test command ` command. + List of Runway test definitions that are executed with the :ref:`test command `. See Test_ for detailed information about defining this value. .. rubric:: Example @@ -159,7 +157,6 @@ Top-Level Configuration ---- -.. _runway-deployment: ********** Deployment @@ -169,10 +166,10 @@ Deployment A deployment defines modules and options that affect the modules. - Deployments are processed during a :ref:`deploy `/:ref:`destroy `/:ref:`plan ` action. + Deployments are processed during a :ref:`commands:deploy`/:ref:`commands:destroy`/:ref:`commands:plan` action. If the processing of one deployment fails, the action will end. - During a :ref:`deploy `/:ref:`destroy ` action, the user has the option to select which deployment will run unless the ``CI`` environment variable (``--ci`` cli option) is set, the ``--tag ...`` cli option was provided, or only one deployment is defined. + During a :ref:`commands:deploy`/:ref:`commands:destroy` action, the user has the option to select which deployment will run unless the ``CI`` environment variable (``--ci`` cli option) is set, the ``--tag ...`` cli option was provided, or only one deployment is defined. .. rubric:: Lookup Support @@ -570,7 +567,6 @@ Deployment ---- -.. _runway-module: ****** Module @@ -578,31 +574,31 @@ Module .. class:: module - A module defines the directory to be processed and applicable options. + A :term:`Module` defines the directory to be processed and applicable options. - It can consist of :ref:`CloudFormation `, :ref:`Terraform `, :ref:`Serverless Framework `, :ref:`AWS CDK `, :ref:`Kubernetes `, or a :ref:`Static Site`. + It can consist of :ref:`index:CloudFormation & Troposphere`, :ref:`index:Terraform`, :ref:`index:Serverless Framework`, :ref:`index:AWS Cloud Development Kit (CDK)`, :ref:`index:Kubernetes`, or a :ref:`index:Static Site`. It is recommended to place the appropriate extension on each directory for identification (but it is not required). - See :ref:`Repo Structure` for examples of a module directory structure. - - +------------------+-----------------------------------------------+ - | Suffix/Extension | IaC Tool/Framework | - +==================+===============================================+ - | ``.cdk`` | :ref:`AWS CDK ` | - +------------------+-----------------------------------------------+ - | ``.cfn`` | :ref:`CloudFormation ` | - +------------------+-----------------------------------------------+ - | ``.k8s`` | :ref:`Kubernetes ` | - +------------------+-----------------------------------------------+ - | ``.sls`` | :ref:`Serverless Framework ` | - +------------------+-----------------------------------------------+ - | ``.tf`` | :ref:`Terraform ` | - +------------------+-----------------------------------------------+ - | ``.web`` | :ref:`Static Site` | - +------------------+-----------------------------------------------+ + See :ref:`repo_structure:Repo Structure` for examples of a module directory structure. + + +------------------+---------------------------------------------------------+ + | Suffix/Extension | IaC Tool/Framework | + +==================+=========================================================+ + | ``.cdk`` | :ref:`index:AWS Cloud Development Kit (CDK)` | + +------------------+---------------------------------------------------------+ + | ``.cfn`` | :ref:`index:CloudFormation & Troposphere` | + +------------------+---------------------------------------------------------+ + | ``.k8s`` | :ref:`index:Kubernetes` | + +------------------+---------------------------------------------------------+ + | ``.sls`` | :ref:`index:Serverless Framework` | + +------------------+---------------------------------------------------------+ + | ``.tf`` | :ref:`index:Terraform` | + +------------------+---------------------------------------------------------+ + | ``.web`` | :ref:`index:Static Site` | + +------------------+---------------------------------------------------------+ A module is only deployed if there is a corresponding environment file present, it is explicitly enabled via :attr:`deployment.environments`/:attr:`module.environments`, or :attr:`deployment.parameters`/:attr:`module.parameters` is defined. The naming format of an environment file varies per module type. - See :ref:`Module Configurations` for acceptable environment file name formats. + See :ref:`index:Module Configuration` for acceptable environment file name formats. Modules can be defined as a string or a mapping. The minimum requirement for a module is a string that is equal to the name of the module directory. @@ -630,7 +626,7 @@ Module It is only used for custom module type handlers. Import path to a custom Runway module handler class. - See :ref:`Module Configurations` for detailed usage. + See :ref:`index:Module Configuration` for detailed usage. .. rubric:: Example .. code-block:: yaml @@ -740,7 +736,7 @@ Module Options that are passed directly to the module type handler class. The options that can be used with each module vary. - For detailed information about options for each type of module, see :ref:`Module Configurations`. + For detailed information about options for each type of module, see :ref:`index:Module Configuration`. Anything defined here is merged with the value of :attr:`deployment.module_options`. Values defined here take precedence. @@ -887,7 +883,6 @@ Module .. versionadded:: 1.4.0 -.. _runway-module-path: path ==== @@ -929,7 +924,6 @@ The syntax is based on that of `Terraform module sources ` to execute them. + Simply define all tests for a project in the Runway config file and use the :ref:`test command ` to execute them. .. rubric:: Lookup Support .. note:: - Runway does not set ``AWS_REGION`` or ``AWS_DEFAULT_REGION`` environment variables when using the :ref:`test command`. + Runway does not set ``AWS_REGION`` or ``AWS_DEFAULT_REGION`` environment variables when using the :ref:`test command `. The following fields support lookups: @@ -1039,7 +1032,7 @@ Test Whether the test must pass for subsequent tests to be run. If ``false``, testing will continue if the test fails. - If the test fails, the :ref:`test command ` will always return a non-zero exit code regardless of this value. + If the test fails, the :ref:`test command ` will always return a non-zero exit code regardless of this value. .. rubric:: Example .. code-block:: yaml diff --git a/docs/source/serverless/advanced_features.rst b/docs/source/serverless/advanced_features.rst index ba9cbc44f..96b035d2f 100644 --- a/docs/source/serverless/advanced_features.rst +++ b/docs/source/serverless/advanced_features.rst @@ -38,7 +38,7 @@ The value of this option is recursively merged into a resolved clone of the modu To create this resolved clone, Runway uses "`serverless print`_" (including `args `_) to resolve the module's Serverless configuration file and output the contents to a temporary file. The temporary file is deleted after each execution of Runway. -This functionality can be especially useful when used alongside :ref:`remote module paths ` such as a module from a :ref:`git repository ` to change values on the fly without needing to modify the source for small differences in each environment. +This functionality can be especially useful when used alongside :ref:`remote module paths ` such as a module from a :ref:`git repository ` to change values on the fly without needing to modify the source for small differences in each environment. .. rubric:: Example .. code-block:: yaml diff --git a/docs/source/serverless/configuration.rst b/docs/source/serverless/configuration.rst index 14d6840d1..c7e851fe3 100644 --- a/docs/source/serverless/configuration.rst +++ b/docs/source/serverless/configuration.rst @@ -105,7 +105,7 @@ Stages Runway's concept of a :term:`Deploy Environment` has a 1-to-1 mapping to Serverless's **stage**. For example, if the deploy environment is **dev**, Serverless will be run with ``--stage dev``. -Each stage requires either its own variables file (even if empty for a particular stage) following a specific `File Naming`_ scheme and/or a configured ``environment`` for the module or deployment (see :ref:`Runway Config File ` for details). +Each stage requires either its own variables file (even if empty for a particular stage) following a specific `File Naming`_ scheme and/or a configured ``environment`` for the module or deployment (see :ref:`runway_config:Runway Config File` for details). File Naming =========== diff --git a/docs/source/staticsite/configuration.rst b/docs/source/staticsite/configuration.rst index fe0cd0c95..27ce0cdb4 100644 --- a/docs/source/staticsite/configuration.rst +++ b/docs/source/staticsite/configuration.rst @@ -5,7 +5,7 @@ Configuration ############# -Configuration options and parameters for :ref:`static site ` modules. +Configuration options and parameters for :ref:`index:Static Site` :term:`Modules `. Example uses of the options and parameters can be found in the :ref:`Examples ` section. diff --git a/docs/source/staticsite/directory_structure.rst b/docs/source/staticsite/directory_structure.rst index 7bc03b60d..371ca98e7 100644 --- a/docs/source/staticsite/directory_structure.rst +++ b/docs/source/staticsite/directory_structure.rst @@ -4,7 +4,7 @@ Directory Structure ################### -Example directory structures for a ref:`static site ` module. +Example directory structures for a :ref:`index:Static Site` :term:`Module`. diff --git a/docs/source/staticsite/examples.rst b/docs/source/staticsite/examples.rst index ffcb69266..696b746ca 100644 --- a/docs/source/staticsite/examples.rst +++ b/docs/source/staticsite/examples.rst @@ -4,7 +4,7 @@ Examples ######## -Example uses of the :ref:`static site ` module +Example uses of the :ref:`index:Static Site` :term:`Module` diff --git a/docs/source/terminology.rst b/docs/source/terminology.rst index ece07414b..c89756106 100644 --- a/docs/source/terminology.rst +++ b/docs/source/terminology.rst @@ -24,17 +24,17 @@ Terminology If this is found, Runway knows that it should always use the value that follows the prefix. Deployment - A :ref:`Deployment ` contains a list of :term:`Modules ` and options for all the :term:`Modules ` in the :term:`Deployment`. - A :ref:`runway-config` can contain multiple :ref:`deployments ` and a :term:`Deployment` can contain multiple :term:`Modules `. + A :ref:`Deployment ` contains a list of :term:`Modules ` and options for all the :term:`Modules ` in the :term:`Deployment`. + A :ref:`runway_config:Runway Config File` can contain multiple :ref:`Deployments ` and a :term:`Deployment` can contain multiple :term:`Modules `. Lookup - In the context of Runway, a :term:`Lookup` is a method for expanding values in the :ref:`runway-config` file when processing a :term:`Deployment`/:term:`Module`. - These are only supported in select areas of the :ref:`runway-config` (see the config docs for more details). + In the context of Runway, a :term:`Lookup` is a method for expanding values in the :ref:`runway_config:Runway Config File` file when processing a :term:`Deployment`/:term:`Module`. + These are only supported in select areas of the :ref:`runway_config:Runway Config File` (see the config docs for more details). In the context of :term:`CFNgin`, a :term:`Lookup` is method for expanding values in the :class:`~cfngin.config` at runtime. Module - A :ref:`Module ` is a directory containing a single Infrastructure-as-Code tool configuration of an application, a component, or some infrastructure (e.g. a set of :link:`CloudFormation` Templates). + A :ref:`Module ` is a directory containing a single Infrastructure-as-Code tool configuration of an application, a component, or some infrastructure (e.g. a set of :link:`CloudFormation` Templates). It is defined in a :term:`Deployment` by path. :term:`Modules ` can also contain granular options that only pertain to it based on its :attr:`module.type`. diff --git a/docs/source/terraform/advanced_features.rst b/docs/source/terraform/advanced_features.rst index 6f7a558e9..f4a43d3ed 100644 --- a/docs/source/terraform/advanced_features.rst +++ b/docs/source/terraform/advanced_features.rst @@ -32,7 +32,7 @@ However, it's generally preferable to separate the backend configuration out fro This form of configuration is known as `partial configuration`_ and allows for dynamic or secret values to be passed in at runtime. Below are examples of how to implement `partial configuration`_ with Runway. -All examples provided showcase the use of the s3 backend type as it is the easiest to use when going from zero to deployed (try :ref:`runway gen-sample cfngin ` for quickstart Terraform backend infrastructure). +All examples provided showcase the use of the s3 backend type as it is the easiest to use when going from zero to deployed (try :ref:`runway gen-sample cfngin ` for quickstart Terraform backend infrastructure). However, Runway supports the use of any `backend type `__ (refer to Terraform's documentation for proper `partial configuration`_ instructions). .. seealso:: diff --git a/npm/.npmignore b/npm/.npmignore deleted file mode 100644 index da2927653..000000000 --- a/npm/.npmignore +++ /dev/null @@ -1,24 +0,0 @@ -**/.egg -**/.travis -**/.vscode -**/codebuild -**/docs -**/integration_tests -**/build -**/dist -**/quickstarts -**/scripts -**/src -**/test -**/tf_test -**/.env -**/.gitignore -**/.pylintrv -**/.travis.yml -**/buildspec.yml -**/Makefile -**/MANAGEST.ini -**/Pipfile* -**/README.rst -**/runway.spec -**/setup* diff --git a/npm/postinstall.js b/npm/postinstall.js deleted file mode 100755 index e10cf8e05..000000000 --- a/npm/postinstall.js +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env node -const os = require('os'); -const fs = require('fs'); -const path = require('path'); -const tar = require('tar'); - -// e.g. '../..' for 'runway'; '../../..' for `@onica/runway', etc -let pathTraversal = '..' -for (var i = 0; i < process.env.npm_package_name.split("/").length; i++) { - pathTraversal += '/..' -} - -const basepath = `${path.resolve(process.cwd(), pathTraversal)}/node_modules`; // goes to the top level node_modules -const moduleDir = `${basepath}/${process.env.npm_package_name}/src`; -let osName; -let binPath; - -function symLink(target, dest_path, callback) { - return fs.symlink(target, dest_path, 'file', (err, data) => { - // error is thrown if the file already exists - if (err && err.code === 'EEXIST') { - fs.unlink(dest_path, (err, data) => { - if (err) { - console.log(err); - throw err; - } else { - return symLink(target, dest_path, callback); - } - }); - } else { - return callback(err, data); - } - }); -} - -// translate os name used during binary build -switch (os.platform()) { - case 'darwin': - osName = 'osx'; - break; - case 'win32': - osName = 'windows'; - break; - default: - osName = os.platform(); -} - -fs.mkdir(`${moduleDir}/runway`, { recursive: true }, (err, data) => { - if (err) throw err; - - // unzip the tar for os version to ./src/runway - tar.x({ - cwd: `${moduleDir}/runway`, - file: `${moduleDir}/${osName}/runway.tar.gz`, - gzip: true, - unlink: true - }, (err, data) => { - if (err) throw err; - - if (os.platform() !== 'win32') { - // determine correct bin path to use based on global/local install - if (process.env.npm_config_global) { - binPath = `${process.env.NVM_BIN || '/usr/local/bin'}/runway`; - } else { - try { - fs.mkdirSync(`${basepath}/.bin`, { recursive: true }); - } catch (err) { - // shouldn't need to catch an EEXIST error with the recursive option - // set on mkdirSync, but it still can occur (e.g. on older - // versions of nodejs without the recursive option) - // https://github.com/nodejs/node/issues/27293 - if (err && err.code !== 'EEXIST') { - throw err; - } - } - binPath = `${basepath}/.bin/runway`; - } - // create symlink in bin to the appropriate runway binary - symLink(`${moduleDir}/runway/runway-cli`, binPath, (err, data) => { - if (err) { - if (err.code === 'EACCES') { - console.log('User does not have sufficient privileges to install. Please try again with sudo.') - } - throw err; - } - }); - } else { - // determine correct bin path to use based on global/local install - if (process.env.npm_config_global) { - binPath = path.resolve(process.env.APPDATA, './npm/runway.bat'); - } else { - fs.mkdirSync(`${basepath}/.bin`, { recursive: true }); - binPath = `${basepath}/.bin/runway.bat`; - } - // symlink does not work for windows so we need to use a bat file - // this will overwrite the file if it already exists so no fancy error handling needed - fs.writeFile(binPath, `@"${moduleDir}/runway/runway-cli.exe" %*`, (err, data) => { - if (err) throw err; - }) - } - }); -}); diff --git a/npm/preuninstall.js b/npm/preuninstall.js deleted file mode 100644 index 77ffb3ab5..000000000 --- a/npm/preuninstall.js +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node -const os = require('os'); -const fs = require('fs'); -const path = require('path'); - -const basepath = `${path.resolve(process.cwd(), '../..')}/node_modules`; // goes to the top level node_modules - -if (os.platform() === 'win32') { - if (process.env.npm_config_global) { - binPath = path.resolve(process.env.APPDATA, './npm/runway.bat'); - } else { - binPath = `${basepath}/.bin/runway.bat`; - } -} else { - if (process.env.npm_config_global) { - binPath = `${process.env.NVM_BIN || '/usr/local/bin'}/runway`; - } else { - binPath = `${basepath}/.bin/runway`; - } -} - -// remove symlink/exe from bin created by postinstall script -fs.unlink(binPath, (err, data) => { - if (err) { - // ignore file/dir missing - if (err.code !== 'ENOENT') { - throw err; - } - } -}); diff --git a/package-lock.json b/package-lock.json index b275a3b97..44b9923f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,16 +7,6 @@ "": { "name": "runway", "version": "0.0.0", - "hasInstallScript": true, - "license": "Apache-2.0", - "os": [ - "darwin", - "linux", - "win32" - ], - "dependencies": { - "tar": "^7.4.3" - }, "devDependencies": { "cspell": "^8.13.3", "pyright": "^1.1.223" @@ -487,33 +477,6 @@ "node": ">=18.0" } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/fs-minipass": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", - "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", - "dependencies": { - "minipass": "^7.0.4" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -549,19 +512,11 @@ "node": ">= 8" } }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "optional": true, - "engines": { - "node": ">=14" - } - }, "node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, "engines": { "node": ">=12" }, @@ -569,36 +524,12 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/array-timsort": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", "dev": true }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", @@ -647,14 +578,6 @@ "url": "https://github.com/chalk/chalk-template?sponsor=1" } }, - "node_modules/chownr": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", - "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", - "engines": { - "node": ">=18" - } - }, "node_modules/clear-module": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/clear-module/-/clear-module-4.1.2.tgz", @@ -671,22 +594,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "node_modules/commander": { "version": "12.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", @@ -718,19 +625,6 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/cspell": { "version": "8.13.3", "resolved": "https://registry.npmjs.org/cspell/-/cspell-8.13.3.tgz", @@ -905,16 +799,6 @@ "node": ">=18" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" - }, "node_modules/env-paths": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", @@ -1035,21 +919,6 @@ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, - "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/gensequence": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-7.0.0.tgz", @@ -1071,27 +940,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -1193,14 +1041,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -1222,28 +1062,6 @@ "node": ">=0.12.0" } }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -1281,54 +1099,6 @@ "node": ">=8.6" } }, - "node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/minizlib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.1.tgz", - "integrity": "sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==", - "dependencies": { - "minipass": "^7.0.4", - "rimraf": "^5.0.5" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/parent-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", @@ -1341,37 +1111,6 @@ "node": ">=8" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", - "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", - "engines": { - "node": "14 || >=16.14" - } - }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -1445,23 +1184,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", - "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", - "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -1497,94 +1219,11 @@ "node": ">=10" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, "dependencies": { "ansi-regex": "^6.0.1" }, @@ -1595,50 +1234,6 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/tar": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", - "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", - "dependencies": { - "@isaacs/fs-minipass": "^4.0.0", - "chownr": "^3.0.0", - "minipass": "^7.1.2", - "minizlib": "^3.0.1", - "mkdirp": "^3.0.1", - "yallist": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/tar/node_modules/yallist": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", - "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", - "engines": { - "node": ">=18" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -1663,104 +1258,6 @@ "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", "dev": true }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/xdg-basedir": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", @@ -2225,27 +1722,6 @@ "integrity": "sha512-hsxoTnZHwtdR2x9QEE6yfDBB1LUwAj67o1GyKTvI8A2OE/AfzAttirZs+9sxgOGWoBdTOxM9sMLtqB3SxtDB3A==", "dev": true }, - "@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "requires": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - } - }, - "@isaacs/fs-minipass": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", - "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", - "requires": { - "minipass": "^7.0.4" - } - }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2272,21 +1748,11 @@ "fastq": "^1.6.0" } }, - "@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "optional": true - }, "ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==" - }, - "ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==" + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true }, "array-timsort": { "version": "1.0.3", @@ -2294,19 +1760,6 @@ "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", "dev": true }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, "braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", @@ -2337,11 +1790,6 @@ "chalk": "^5.2.0" } }, - "chownr": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", - "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==" - }, "clear-module": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/clear-module/-/clear-module-4.1.2.tgz", @@ -2352,19 +1800,6 @@ "resolve-from": "^5.0.0" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "commander": { "version": "12.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", @@ -2390,16 +1825,6 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, "cspell": { "version": "8.13.3", "resolved": "https://registry.npmjs.org/cspell/-/cspell-8.13.3.tgz", @@ -2534,16 +1959,6 @@ "gensequence": "^7.0.0" } }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" - }, "env-paths": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", @@ -2630,15 +2045,6 @@ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, - "foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - } - }, "gensequence": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-7.0.0.tgz", @@ -2651,18 +2057,6 @@ "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", "dev": true }, - "glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", - "requires": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - } - }, "glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -2732,11 +2126,6 @@ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -2752,20 +2141,6 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", - "requires": { - "@isaacs/cliui": "^8.0.2", - "@pkgjs/parseargs": "^0.11.0" - } - }, "json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -2797,33 +2172,6 @@ "picomatch": "^2.3.1" } }, - "minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==" - }, - "minizlib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.1.tgz", - "integrity": "sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==", - "requires": { - "minipass": "^7.0.4", - "rimraf": "^5.0.5" - } - }, - "mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==" - }, "parent-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", @@ -2833,27 +2181,6 @@ "callsites": "^3.1.0" } }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - }, - "path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", - "requires": { - "lru-cache": "^9.1.1 || ^10.0.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==" - } - } - }, "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -2890,14 +2217,6 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, - "rimraf": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", - "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", - "requires": { - "glob": "^10.3.7" - } - }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -2913,107 +2232,15 @@ "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==" - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "string-width-cjs": { - "version": "npm:string-width@4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - } - } - } - }, "strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, "requires": { "ansi-regex": "^6.0.1" } }, - "strip-ansi-cjs": { - "version": "npm:strip-ansi@6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - } - } - }, - "tar": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", - "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", - "requires": { - "@isaacs/fs-minipass": "^4.0.0", - "chownr": "^3.0.0", - "minipass": "^7.1.2", - "minizlib": "^3.0.1", - "mkdirp": "^3.0.1", - "yallist": "^5.0.0" - }, - "dependencies": { - "yallist": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", - "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==" - } - } - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3035,72 +2262,6 @@ "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", "dev": true }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - }, - "wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "requires": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - } - }, - "wrap-ansi-cjs": { - "version": "npm:wrap-ansi@7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - } - } - } - }, "xdg-basedir": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", diff --git a/package.json b/package.json index 7f168de62..be956a38d 100644 --- a/package.json +++ b/package.json @@ -1,60 +1,8 @@ { - "author": { - "email": "opensource@onica.com", - "name": "Onica Group LLC", - "url": "https://onica.com" - }, - "bugs": { - "url": "https://github.com/onicagroup/runway/issues" - }, - "dependencies": { - "tar": "^7.4.3" - }, - "description": "Simplify infrastructure/app testing/deployment", "devDependencies": { "cspell": "^8.13.3", "pyright": "^1.1.223" }, - "files": [ - "src/osx/*", - "src/linux/*", - "src/windows/*", - "postinstall.js", - "preuninstall.js" - ], - "homepage": "https://github.com/onicagroup/runway", - "keywords": [ - "aws", - "ci", - "cd", - "cli", - "test", - "tool", - "serverless", - "terraform", - "cloudformation", - "cdk" - ], - "license": "Apache-2.0", - "licenses": [ - { - "type": "Apache-2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - } - ], - "main": "NA", "name": "runway", - "os": [ - "darwin", - "linux", - "win32" - ], - "publishConfig": { - "access": "public" - }, - "scripts": { - "postinstall": "node ./postinstall.js", - "preuninstall": "node ./preuninstall.js" - }, "version": "0.0.0" } diff --git a/poetry.lock b/poetry.lock index 7b68925c7..3d0a23011 100644 --- a/poetry.lock +++ b/poetry.lock @@ -11,17 +11,6 @@ files = [ {file = "alabaster-0.7.16.tar.gz", hash = "sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65"}, ] -[[package]] -name = "altgraph" -version = "0.17.4" -description = "Python graph (network) package" -optional = false -python-versions = "*" -files = [ - {file = "altgraph-0.17.4-py2.py3-none-any.whl", hash = "sha256:642743b4750de17e655e6711601b077bc6598dbfa3ba5fa2b2a35ce12b508dff"}, - {file = "altgraph-0.17.4.tar.gz", hash = "sha256:1b5afbb98f6c4dcadb2e2ae6ab9fa994bbb8c1d75f4fa96d340f9437ae454406"}, -] - [[package]] name = "attrs" version = "24.2.0" @@ -1513,20 +1502,6 @@ files = [ cli-exit-tools = "*" click = "*" -[[package]] -name = "macholib" -version = "1.16.3" -description = "Mach-O header analysis and editing" -optional = false -python-versions = "*" -files = [ - {file = "macholib-1.16.3-py2.py3-none-any.whl", hash = "sha256:0e315d7583d38b8c77e815b1ecbdbf504a8258d8b3e17b61165c6feb60d18f2c"}, - {file = "macholib-1.16.3.tar.gz", hash = "sha256:07ae9e15e8e4cd9a788013d81f5908b3609aa76f9b1421bae9c4d7606ec86a30"}, -] - -[package.dependencies] -altgraph = ">=0.17" - [[package]] name = "markupsafe" version = "2.1.5" @@ -1957,17 +1932,6 @@ files = [ {file = "pbr-6.0.0.tar.gz", hash = "sha256:d1377122a5a00e2f940ee482999518efe16d745d423a670c27773dfbc3c9a7d9"}, ] -[[package]] -name = "pefile" -version = "2023.2.7" -description = "Python PE parsing module" -optional = false -python-versions = ">=3.6.0" -files = [ - {file = "pefile-2023.2.7-py3-none-any.whl", hash = "sha256:da185cd2af68c08a6cd4481f7325ed600a88f6a813bad9dea07ab3ef73d8d8d6"}, - {file = "pefile-2023.2.7.tar.gz", hash = "sha256:82e6114004b3d6911c77c3953e3838654b04511b8b66e8583db70c65998017dc"}, -] - [[package]] name = "pip" version = "23.3.1" @@ -2180,57 +2144,6 @@ files = [ {file = "pyhcl-0.4.5.tar.gz", hash = "sha256:c47293a51ccdd25e18bb5c8c0ab0ffe355b37c87f8d6f9d3280dc41efd4740bc"}, ] -[[package]] -name = "pyinstaller" -version = "6.9.0" -description = "PyInstaller bundles a Python application and all its dependencies into a single package." -optional = false -python-versions = "<3.13,>=3.8" -files = [ - {file = "pyinstaller-6.9.0-py3-none-macosx_10_13_universal2.whl", hash = "sha256:5ced2e83acf222b936ea94abc5a5cc96588705654b39138af8fb321d9cf2b954"}, - {file = "pyinstaller-6.9.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:f18a3d551834ef8fb7830d48d4cc1527004d0e6b51ded7181e78374ad6111846"}, - {file = "pyinstaller-6.9.0-py3-none-manylinux2014_i686.whl", hash = "sha256:f2fc568de3d6d2a176716a3fc9f20da06d351e8bea5ddd10ecb5659fce3a05b0"}, - {file = "pyinstaller-6.9.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:a0f378f64ad0655d11ade9fde7877e7573fd3d5066231608ce7dfa9040faecdd"}, - {file = "pyinstaller-6.9.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:7bf0c13c5a8560c89540746ae742f4f4b82290e95a6b478374d9f34959fe25d6"}, - {file = "pyinstaller-6.9.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:da994aba14c5686db88796684de265a8665733b4df09b939f7ebdf097d18df72"}, - {file = "pyinstaller-6.9.0-py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:4e3e50743c091a06e6d01c59bdd6d03967b453ee5384a9e790759be4129db4a4"}, - {file = "pyinstaller-6.9.0-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:b041be2fe78da47a269604d62c940d68c62f9a3913bdf64af4123f7689d47099"}, - {file = "pyinstaller-6.9.0-py3-none-win32.whl", hash = "sha256:2bf4de17a1c63c0b797b38e13bfb4d03b5ee7c0a68e28b915a7eaacf6b76087f"}, - {file = "pyinstaller-6.9.0-py3-none-win_amd64.whl", hash = "sha256:43709c70b1da8441a730327a8ed362bfcfdc3d42c1bf89f3e2b0a163cc4e7d33"}, - {file = "pyinstaller-6.9.0-py3-none-win_arm64.whl", hash = "sha256:f15c1ef11ed5ceb32447dfbdab687017d6adbef7fc32aa359d584369bfe56eda"}, - {file = "pyinstaller-6.9.0.tar.gz", hash = "sha256:f4a75c552facc2e2a370f1e422b971b5e5cdb4058ff38cea0235aa21fc0b378f"}, -] - -[package.dependencies] -altgraph = "*" -importlib-metadata = {version = ">=4.6", markers = "python_version < \"3.10\""} -macholib = {version = ">=1.8", markers = "sys_platform == \"darwin\""} -packaging = ">=22.0" -pefile = {version = ">=2022.5.30", markers = "sys_platform == \"win32\""} -pyinstaller-hooks-contrib = ">=2024.7" -pywin32-ctypes = {version = ">=0.2.1", markers = "sys_platform == \"win32\""} -setuptools = ">=42.0.0" - -[package.extras] -completion = ["argcomplete"] -hook-testing = ["execnet (>=1.5.0)", "psutil", "pytest (>=2.7.3)"] - -[[package]] -name = "pyinstaller-hooks-contrib" -version = "2024.7" -description = "Community maintained hooks for PyInstaller" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pyinstaller_hooks_contrib-2024.7-py2.py3-none-any.whl", hash = "sha256:8bf0775771fbaf96bcd2f4dfd6f7ae6c1dd1b1efe254c7e50477b3c08e7841d8"}, - {file = "pyinstaller_hooks_contrib-2024.7.tar.gz", hash = "sha256:fd5f37dcf99bece184e40642af88be16a9b89613ecb958a8bd1136634fc9fac5"}, -] - -[package.dependencies] -importlib-metadata = {version = ">=4.6", markers = "python_version < \"3.10\""} -packaging = ">=22.0" -setuptools = ">=42.0.0" - [[package]] name = "pyopenssl" version = "24.2.1" @@ -2444,17 +2357,6 @@ files = [ {file = "pywin32-306-cp39-cp39-win_amd64.whl", hash = "sha256:39b61c15272833b5c329a2989999dcae836b1eed650252ab1b7bfbe1d59f30f4"}, ] -[[package]] -name = "pywin32-ctypes" -version = "0.2.2" -description = "A (partial) reimplementation of pywin32 using ctypes/cffi" -optional = false -python-versions = ">=3.6" -files = [ - {file = "pywin32-ctypes-0.2.2.tar.gz", hash = "sha256:3426e063bdd5fd4df74a14fa3cf80a0b42845a87e1d1e81f6549f9daec593a60"}, - {file = "pywin32_ctypes-0.2.2-py3-none-any.whl", hash = "sha256:bf490a1a709baf35d688fe0ecf980ed4de11d2b3e37b51e5442587a75d9957e7"}, -] - [[package]] name = "pyyaml" version = "6.0.2" @@ -2844,17 +2746,6 @@ files = [ attrs = "*" pbr = "*" -[[package]] -name = "semver" -version = "2.13.0" -description = "Python helper for Semantic Versioning (http://semver.org/)" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "semver-2.13.0-py2.py3-none-any.whl", hash = "sha256:ced8b23dceb22134307c1b8abfa523da14198793d9787ac838e70e29e77458d4"}, - {file = "semver-2.13.0.tar.gz", hash = "sha256:fa0fe2722ee1c3f57eac478820c3a5ae2f624af8264cbdf9000c980ff7f75e3f"}, -] - [[package]] name = "send2trash" version = "1.8.3" @@ -3467,4 +3358,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = ">=3.9, <3.13" -content-hash = "05c7023fe4de9e6457ebcd9422d6e6a735c4c4d181117f826424bb5878d84076" +content-hash = "0d6a1510ca2fda7cd14106d6615720e3ff824668ad67f400338306a9da53c9df" diff --git a/pyproject.toml b/pyproject.toml index a1cab38a5..9b9d41b72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,12 +57,8 @@ troposphere = ">=2.4, <5" typing_extensions = "*" # only really needed for < 3.8 but can still be used in >= 3.8 yamllint = "*" -[tool.poetry.group.build.dependencies] -pyinstaller = "^6.2.0" - [tool.poetry.group.dev.dependencies] pre-commit = "^3.8.0" -semver = "^2.13" # only used in .github/scripts/urlshortener [tool.poetry.group.docs.dependencies] doc8 = "^1.1.1" @@ -140,7 +136,6 @@ force-exclude = ''' | _build | build | dist - | npm | runway/aws_sso_botocore )/ ''' @@ -200,9 +195,6 @@ exclude = [ "**/tests/unit", "**/typings", ] -extraPaths = [ - "./.github/scripts/urlshortener", -] pythonPlatform = "All" pythonVersion = "3.9" reportDuplicateImport = "none" @@ -297,9 +289,6 @@ select = ["ALL"] "*.py" = [ "PYI024", # Use `typing.NamedTuple` instead of `collections.namedtuple` # NOTE (kyle): should only apply to pyi ] -".github/scripts/*" = [ - "EXE002", # The file is executable but no shebang is present # NOTE (kyle): fails linting on windows -] "runway/templates/*" = [ "N999", # Invalid module name # NOTE (kyle): these are fine here ] diff --git a/quickstarts/runway/Dockerfile b/quickstarts/runway/Dockerfile index 046d7181f..ae431d2e2 100644 --- a/quickstarts/runway/Dockerfile +++ b/quickstarts/runway/Dockerfile @@ -1,22 +1,35 @@ -FROM ubuntu:bionic -MAINTAINER Onica Group LLC +FROM ubuntu:24.04 -RUN set -xe && \ - apt-get update && \ - apt-get -y install \ - curl \ - git \ - nano \ - npm \ - python-pip \ - unzip \ - uuid-runtime \ - vim && \ - rm -rf /var/lib/apt/lists/* && \ - update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10 && \ - npm install npm@latest -g && \ - curl -L oni.ca/runway/latest/linux -o runway && \ - chmod +x runway && \ - mv runway /usr/local/bin +ARG PYTHON_VERSION="3.12.5" + +SHELL ["/bin/bash", "--login", "-o", "pipefail", "-c"] + +RUN set -ex; \ + apt-get update; \ + apt-get install -y build-essential libssl-dev zlib1g-dev \ + libbz2-dev libreadline-dev libsqlite3-dev curl git \ + libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev\ + npm; \ + rm -rf /var/lib/apt/lists/*; + +ENV PYTHON_VERSION="${PYTHON_VERSION}" +ENV PYENV_ROOT="/usr/local/share/.pyenv" +ENV PATH="$PYENV_ROOT/bin:$PATH" + +# Install python +RUN set -ex; \ + curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash; \ + PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install "${PYTHON_VERSION}"; \ + pyenv global "${PYTHON_VERSION}"; \ + "${PYENV_ROOT}/versions/${PYTHON_VERSION}/bin/pip" install --disable-pip-version-check --upgrade pip setuptools wheel; \ + "${PYENV_ROOT}/versions/${PYTHON_VERSION}/bin/pip" install pipx; \ + mkdir ~/.profile.d; \ + echo 'eval "$(pyenv init -)";' >> ~/.profile.d/001-pyenv.sh; \ + echo 'if [ -d ~/.profile.d ]; then for rc in ~/.profile.d/*.sh; do if [ -f "$rc" ]; then . "$rc"; fi done fi; unset rc;' > ~/.profile + +# Install runway - it is recommend to install poetry instad and use poetry to install runway per-project +RUN set -ex; \ + pipx ensurepath; \ + pipx install runway CMD ["bash"] diff --git a/runway.file.spec b/runway.file.spec deleted file mode 100644 index a02017b88..000000000 --- a/runway.file.spec +++ /dev/null @@ -1,137 +0,0 @@ -"""pyinstaller spec file to build a single-binary distribution of runway. - -This file should be considered a python file and linted as such. - -""" -import os -import pkgutil -from pkg_resources import get_distribution, get_entry_info - -from PyInstaller.utils.hooks import collect_data_files, copy_metadata - -# distutils not included with virtualenv < 20 so we have to import it here -# can be removed once we can upgrade virtualenv and pyinstaller -import distutils - -if getattr(distutils, "distutils_path", "").endswith("__init__.py"): - distutils.distutils_path = os.path.dirname(distutils.distutils_path) - -CLI_PATH = os.path.join(os.path.dirname(os.path.dirname(workpath)), "runway") - - -def get_submodules(package): - """Get submodules of a package to add to hiddenimports. - - Package must be installed and imported for this to be used. - - This is needed for dependencies that do not have a - native pyinstaller hook. This may not find everything that - needs to be included. - - Args: - package: An import package to inspect. - - Returns: - List of submodules. - - """ - return [ - name - for _, name, _ in pkgutil.walk_packages( - path=package.__path__, prefix=package.__name__ + ".", onerror=lambda x: None - ) - ] - - -def Entrypoint(dist, group, name, **kwargs): - """Get entrypoint info for packages using setuptools.""" - ep = get_entry_info(dist, group, name) - # script name must not be a valid module name to avoid name clashes on import - script_path = os.path.join(workpath, name + "-script.py") - print("creating script for entry point", dist, group, name) - with open(script_path, "w") as fh: - print("import", ep.module_name, file=fh) - print("%s.%s()" % (ep.module_name, ".".join(ep.attrs)), file=fh) - - return Analysis([script_path] + kwargs.get("scripts", []), **kwargs) - - -# files that are not explicitly imported but consumed at runtime -# need to be included as data_files. -data_files = [ - (os.path.join(CLI_PATH, "blueprints"), "./runway/blueprints"), - (os.path.join(CLI_PATH, "cfngin/hooks"), "./runway/cfngin/hooks"), - (os.path.join(CLI_PATH, "templates"), "./runway/templates"), -] -data_files.append( - ("{}/yamllint/conf".format(get_distribution("yamllint").location), "yamllint/conf/") -) -data_files.append( - ("{}/cfnlint/rules".format(get_distribution("cfn-lint").location), "cfnlint/rules/") -) -data_files.append( - ("{}/botocore/data".format(get_distribution("botocore").location), "botocore/data/") -) -data_files.extend(collect_data_files("cfnlint")) -data_files.extend(collect_data_files("distutils")) -data_files.extend(collect_data_files("hcl2")) -data_files.extend(collect_data_files("pip")) -data_files.extend(collect_data_files("wheel")) -data_files.append(copy_metadata("runway")[0]) # support scm version - -# pyinstaller is not able to find dependencies of dependencies -# unless a hook already exists for pyinstaller so we have to -# add their dependencies here. -hiddenimports = [] -# these packages do not have pyinstaller hooks so we need to import -# them to collect a list of submodules to include as hidden imports. -import runway -import troposphere -import awacs -import botocore -import pip -import wheel -import yamllint -import cfnlint - -hiddenimports.extend(get_submodules(runway)) -hiddenimports.extend(get_submodules(troposphere)) -hiddenimports.extend(get_submodules(awacs)) -hiddenimports.extend(get_submodules(botocore)) -hiddenimports.extend(get_submodules(pip)) -hiddenimports.extend(get_submodules(wheel)) -hiddenimports.extend(get_submodules(distutils)) -hiddenimports.extend(get_submodules(yamllint)) -hiddenimports.extend(get_submodules(cfnlint)) -# needed due to pkg_resources dropping python2 support -# can be removed on the next pyinstaller release -# https://github.com/pypa/setuptools/issues/1963#issuecomment-582084099 -hiddenimports.append("pkg_resources.py2_warn") - -a = Entrypoint( - "runway", - "console_scripts", - "runway", - pathex=[CLI_PATH], - datas=data_files, - hiddenimports=hiddenimports, - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=None, - noarchive=False, - binaries=[], -) -pyz = PYZ(a.pure, a.zipped_data, cipher=None) -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - [], - name="runway", - strip=False, - upx=True, - runtime_tmpdir=None, - console=True, -) diff --git a/runway.folder.spec b/runway.folder.spec deleted file mode 100644 index 1b8ee4c52..000000000 --- a/runway.folder.spec +++ /dev/null @@ -1,145 +0,0 @@ -"""pyinstaller spec file to build a single-binary distribution of runway. - -This file should be considered a python file and linted as such. - -""" -import os -import pkgutil -from pkg_resources import get_distribution, get_entry_info - -from PyInstaller.utils.hooks import collect_data_files, copy_metadata - -# distutils not included with virtualenv < 20 so we have to import it here -# can be removed once we can upgrade virtualenv and pyinstaller -import distutils - -if getattr(distutils, "distutils_path", "").endswith("__init__.py"): - distutils.distutils_path = os.path.dirname(distutils.distutils_path) - -CLI_PATH = os.path.join(os.path.dirname(os.path.dirname(workpath)), "runway") - - -def get_submodules(package): - """Get submodules of a package to add to hiddenimports. - - Package must be installed and imported for this to be used. - - This is needed for dependencies that do not have a - native pyinstaller hook. This may not find everything that - needs to be included. - - Args: - package: An import package to inspect. - - Returns: - List of submodules. - - """ - return [ - name - for _, name, _ in pkgutil.walk_packages( - path=package.__path__, prefix=package.__name__ + ".", onerror=lambda x: None - ) - ] - - -def Entrypoint(dist, group, name, **kwargs): - """Get entrypoint info for packages using setuptools.""" - ep = get_entry_info(dist, group, name) - # script name must not be a valid module name to avoid name clashes on import - script_path = os.path.join(workpath, name + "-script.py") - print("creating script for entry point", dist, group, name) - with open(script_path, "w") as fh: - print("import", ep.module_name, file=fh) - print("%s.%s()" % (ep.module_name, ".".join(ep.attrs)), file=fh) - - return Analysis([script_path] + kwargs.get("scripts", []), **kwargs) - - -# files that are not explicitly imported but consumed at runtime -# need to be included as data_files. -data_files = [ - (os.path.join(CLI_PATH, "blueprints"), "./runway/blueprints"), - (os.path.join(CLI_PATH, "cfngin/hooks"), "./runway/cfngin/hooks"), - (os.path.join(CLI_PATH, "templates"), "./runway/templates"), -] -data_files.append( - ("{}/yamllint/conf".format(get_distribution("yamllint").location), "yamllint/conf/") -) -data_files.append( - ("{}/cfnlint/rules".format(get_distribution("cfn-lint").location), "cfnlint/rules/") -) -data_files.append( - ("{}/botocore/data".format(get_distribution("botocore").location), "botocore/data/") -) -data_files.extend(collect_data_files("cfnlint")) -data_files.extend(collect_data_files("distutils")) -data_files.extend(collect_data_files("hcl2")) -data_files.extend(collect_data_files("pip")) -data_files.extend(collect_data_files("wheel")) -data_files.append(copy_metadata("runway")[0]) # support scm version - -# pyinstaller is not able to find dependencies of dependencies -# unless a hook already exists for pyinstaller so we have to -# add their dependencies here. -hiddenimports = [] -# these packages do not have pyinstaller hooks so we need to import -# them to collect a list of submodules to include as hidden imports. -import runway -import troposphere -import awacs -import botocore -import pip -import wheel -import yamllint -import cfnlint - -hiddenimports.extend(get_submodules(runway)) -hiddenimports.extend(get_submodules(troposphere)) -hiddenimports.extend(get_submodules(awacs)) -hiddenimports.extend(get_submodules(botocore)) -hiddenimports.extend(get_submodules(pip)) -hiddenimports.extend(get_submodules(wheel)) -hiddenimports.extend(get_submodules(distutils)) -hiddenimports.extend(get_submodules(yamllint)) -hiddenimports.extend(get_submodules(cfnlint)) -# needed due to pkg_resources dropping python2 support -# can be removed on the next pyinstaller release -# https://github.com/pypa/setuptools/issues/1963#issuecomment-582084099 -hiddenimports.append("pkg_resources.py2_warn") - -a = Entrypoint( - "runway", - "console_scripts", - "runway", - pathex=[CLI_PATH], - datas=data_files, - hiddenimports=hiddenimports, - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=None, - noarchive=False, - binaries=[], -) -pyz = PYZ(a.pure, a.zipped_data, cipher=None) -exe = EXE( - pyz, - a.scripts, - [], - exclude_binaries=True, - # for some reason pyinstaller won't create the correct dir - # structure if this is the same name as a dir used in datas - name="runway-cli", - strip=False, - upx=True, - console=True, -) -coll = COLLECT( - exe, - a.binaries, - a.zipfiles, - a.datas, - name="runway", - strip=False, - upx=True, -) diff --git a/runway/core/components/_module_type.py b/runway/core/components/_module_type.py index 8b6d5c00a..b489f716f 100644 --- a/runway/core/components/_module_type.py +++ b/runway/core/components/_module_type.py @@ -33,7 +33,7 @@ class RunwayModuleType: Runway determines the type of module you are trying to deploy in 3 different ways. First, it will check for the ``type`` property as described here, next it will look - for a suffix as described in :ref:`Module Definition`, + for a suffix as described in :ref:`Module Definition `, and finally it will attempt to autodetect your module type by scanning the files of the project. If none of those settings produces a valid result an error will @@ -52,7 +52,7 @@ class RunwayModuleType: +--------------------+-----------------------------------------------+ | ``kubernetes`` | Kubernetes | +--------------------+-----------------------------------------------+ - | ``static`` | :ref:`Static Site` | + | ``static`` | :ref:`index:Static Site` | +--------------------+-----------------------------------------------+ Even when specifying a module ``type`` the module structure From 055faea67863066bde4bb7f480bb6c2c2c6d626b Mon Sep 17 00:00:00 2001 From: Kyle Finley Date: Thu, 15 Aug 2024 13:38:14 -0400 Subject: [PATCH 2/3] update use of `make npm-ci` to `make setup-npm` --- .github/workflows/cicd.yml | 2 +- .github/workflows/spell-check.yml | 2 +- Makefile | 2 +- docs/source/developers/getting_started.rst | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 4d9df3373..f65c2ed81 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -129,7 +129,7 @@ jobs: poetry-plugins: poetry-dynamic-versioning[plugin] python-version: ${{ matrix.python-version }} - name: ⤵️ Install Node Dependencies - run: make npm-ci + run: make setup-npm - name: 🚀 Run Linters run: make lint pre-commit: diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index fd45bcdd0..7d86c82ed 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -24,6 +24,6 @@ jobs: cache: npm node-version: ${{ env.NODE_VERSION }} - name: ⤵️ Install Node Dependencies - run: make npm-ci + run: make setup-npm - name: 🚀 Run spellcheck run: make spellcheck diff --git a/Makefile b/Makefile index 7fa7f4b08..dec475f1e 100644 --- a/Makefile +++ b/Makefile @@ -92,7 +92,7 @@ run-pre-commit: ## run pre-commit for all files setup: setup-poetry setup-pre-commit setup-npm ## setup development environment -setup-npm: npm-ci ## install node dependencies with npm +setup-npm: ## install node dependencies with npm @npm ci setup-poetry: ## setup python virtual environment diff --git a/docs/source/developers/getting_started.rst b/docs/source/developers/getting_started.rst index 2892fad02..514beb014 100644 --- a/docs/source/developers/getting_started.rst +++ b/docs/source/developers/getting_started.rst @@ -43,4 +43,4 @@ You can also run ``make run-pre-commit`` at any time to manually trigger these h pyright Type Checking ===================== -This project uses pyright to perform type checking. To run type checking locally, install pyright (``make npm-ci``) then run ``make lint`` or ``make lint-pyright``. +This project uses pyright to perform type checking. To run type checking locally, install pyright (``make setup-npm``) then run ``make lint`` or ``make lint-pyright``. From c3a47befbc53b7461000a0c6d7c6d48e140b3e91 Mon Sep 17 00:00:00 2001 From: Kyle Finley Date: Thu, 15 Aug 2024 13:41:32 -0400 Subject: [PATCH 3/3] update use of `make npm-install` to `make setup-npm` --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index f65c2ed81..a20c1f1a1 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -209,7 +209,7 @@ jobs: poetry-plugins: poetry-dynamic-versioning[plugin] python-version: ${{ matrix.python-version }} - name: ⤵️ Install Node Dependencies - run: make npm-install + run: make setup-npm - name: 🏗 Configure Pagefile # avoid MemoryError during tests if: runner.os == 'Windows' uses: al-cheb/configure-pagefile-action@v1.4 # cspell:ignore cheb