From 49a09f9365cb280b36f8781a3942d8a6396b3f8f Mon Sep 17 00:00:00 2001 From: dcdunkan <70066170+dcdunkan@users.noreply.github.com> Date: Sun, 2 Oct 2022 21:10:26 +0530 Subject: [PATCH 1/8] remove unwanted files --- .eslintignore | 5 - .eslintrc | 37 - .github/workflows/build-deno.yml | 14 - .github/workflows/build-node.yml | 18 - .github/workflows/lint.yml | 28 - .github/workflows/npm-publish.yml | 23 - .gitignore | 3 - .gitmodules | 3 - .vscode/settings.json | 3 - CHANGELOG.md | 51 - LICENSE | 190 -- README.md | 71 - configs/docker/deno/Dockerfile | 11 - configs/docker/node/.dockerignore | 4 - configs/docker/node/Dockerfile | 13 - configs/tsconfig.json | 21 - package.json | 70 - pnpm-lock.yaml | 2385 ------------------ renovate.json | 20 - src/deps.deno.ts | 96 - src/deps.node.ts | 66 - src/helper/dir.ts | 72 - src/helper/docker.ts | 23 - src/helper/git.ts | 52 - src/helper/package-manager.ts | 111 - src/helper/platform.ts | 28 - src/helper/reponame.ts | 1 - src/helper/template.ts | 38 - src/helper/tsconfig.ts | 15 - src/index.ts | 194 -- src/node/updater.ts | 56 - src/types.ts | 8 - templates/deno/.gitkeep | 0 templates/deno/base-runner/README.md | 3 - templates/deno/base-runner/src/mod.ts | 32 - templates/node/.gitkeep | 0 templates/node/base-runner/README.md | 3 - templates/node/base-runner/package.json | 14 - templates/node/base-runner/src/index.ts | 32 - templates/node/bot-base-template | 1 - templates/other/.gitkeep | 0 templates/other/vercel-base-bot/.example.env | 4 - templates/other/vercel-base-bot/README.md | 7 - templates/other/vercel-base-bot/api/index.ts | 13 - templates/other/vercel-base-bot/index.ts | 5 - templates/other/vercel-base-bot/vercel.json | 8 - tsconfig.json | 17 - 47 files changed, 3869 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc delete mode 100644 .github/workflows/build-deno.yml delete mode 100644 .github/workflows/build-node.yml delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/npm-publish.yml delete mode 100644 .gitignore delete mode 100644 .gitmodules delete mode 100644 .vscode/settings.json delete mode 100644 CHANGELOG.md delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 configs/docker/deno/Dockerfile delete mode 100644 configs/docker/node/.dockerignore delete mode 100644 configs/docker/node/Dockerfile delete mode 100644 configs/tsconfig.json delete mode 100644 package.json delete mode 100644 pnpm-lock.yaml delete mode 100644 renovate.json delete mode 100644 src/deps.deno.ts delete mode 100644 src/deps.node.ts delete mode 100644 src/helper/dir.ts delete mode 100644 src/helper/docker.ts delete mode 100644 src/helper/git.ts delete mode 100644 src/helper/package-manager.ts delete mode 100644 src/helper/platform.ts delete mode 100644 src/helper/reponame.ts delete mode 100644 src/helper/template.ts delete mode 100644 src/helper/tsconfig.ts delete mode 100644 src/index.ts delete mode 100644 src/node/updater.ts delete mode 100644 src/types.ts delete mode 100644 templates/deno/.gitkeep delete mode 100644 templates/deno/base-runner/README.md delete mode 100644 templates/deno/base-runner/src/mod.ts delete mode 100644 templates/node/.gitkeep delete mode 100644 templates/node/base-runner/README.md delete mode 100644 templates/node/base-runner/package.json delete mode 100644 templates/node/base-runner/src/index.ts delete mode 160000 templates/node/bot-base-template delete mode 100644 templates/other/.gitkeep delete mode 100644 templates/other/vercel-base-bot/.example.env delete mode 100644 templates/other/vercel-base-bot/README.md delete mode 100644 templates/other/vercel-base-bot/api/index.ts delete mode 100644 templates/other/vercel-base-bot/index.ts delete mode 100644 templates/other/vercel-base-bot/vercel.json delete mode 100644 tsconfig.json diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 67cc41b..0000000 --- a/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -examples -node_modules -my-app -build -templates diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index f7a8397..0000000 --- a/.eslintrc +++ /dev/null @@ -1,37 +0,0 @@ -{ - "root": true, - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint" - ], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - "rules": { - "quotes": ["error", "single", { "allowTemplateLiterals": true }], - "@typescript-eslint/no-var-requires": 1, - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/indent": ["error", 2], - "@typescript-eslint/no-inferrable-types": "off", - "semi": [2, "always"], - "prefer-const": ["error", { - "destructuring": "all", - "ignoreReadBeforeAssign": false - }], - "no-var": 2, - "comma-dangle": [2, "always-multiline"], - "@typescript-eslint/no-explicit-any": "off", - "brace-style": "error", - "object-curly-spacing": [2, "always"] - }, - "parserOptions": { - "ecmaFeatures": { - "jsx": true - }, - "useJSXTextNode": true, - "tsconfigRootDir": "./" - }, - "ignorePatterns": ["dist"] -} \ No newline at end of file diff --git a/.github/workflows/build-deno.yml b/.github/workflows/build-deno.yml deleted file mode 100644 index f776afc..0000000 --- a/.github/workflows/build-deno.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Build deno - -on: - - push - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Setup Deno - uses: maximousblk/setup-deno@v1 - - run: deno -V - - run: deno check src/index.ts \ No newline at end of file diff --git a/.github/workflows/build-node.yml b/.github/workflows/build-node.yml deleted file mode 100644 index 55e60a7..0000000 --- a/.github/workflows/build-node.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Build node - -on: - - push - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - registry-url: https://registry.npmjs.org/ - - run: npm i -g pnpm - - run: pnpm install - - run: pnpm lint - - run: pnpm build \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index a57eaec..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Lint and Build - -on: - - push - -jobs: - lint: - name: lint - runs-on: ubuntu-latest - steps: - - name: check out code 🛎 - uses: actions/checkout@v3 - - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: "16.x" - registry-url: "https://registry.npmjs.org" - - - run: npm i -g pnpm - - name: Install dependencies - run: pnpm install - - - name: Run ESLint - run: pnpm lint - - - name: Build - run: pnpm build diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 2302de7..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Publish - -on: - release: - types: [created] - workflow_dispatch: - -jobs: - publish-npm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - registry-url: https://registry.npmjs.org/ - - run: npm i -g pnpm - - run: pnpm install - - run: pnpm lint - - run: pnpm build - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 9fc3532..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -build -my-app \ No newline at end of file diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 368d489..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "templates/node/bot-base-template"] - path = templates/node/bot-base-template - url = https://github.com/bot-base/telegram-bot-template diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index dc3b310..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deno.enablePaths": ["./src/deps.deno.ts", "./src/index.ts", "./src/helper"], -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index cd7f4bc..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,51 +0,0 @@ -## [0.1.3](https://github.com/grammyjs/create-grammy/compare/0.1.2...0.1.3) (2022-04-25) - - -### Bug Fixes - -* **node:** add missed env to index ([6c6d240](https://github.com/grammyjs/create-grammy/commit/6c6d2409d0b2290b48cdfa0d3c2317efecb86086)) - - - -## [0.1.2](https://github.com/grammyjs/create-grammy/compare/0.1.1...0.1.2) (2022-04-25) - - -### Bug Fixes - -* **node:** fix node entrypoint ([1e7fcaf](https://github.com/grammyjs/create-grammy/commit/1e7fcafab851e1b66a8f4ce59f4beac8f4389c1b)) - - - -## [0.1.1](https://github.com/grammyjs/create-grammy/compare/0.1.0...0.1.1) (2022-04-25) - - -### Bug Fixes - -* **node:** fix package name in updater script ([2c46381](https://github.com/grammyjs/create-grammy/commit/2c46381d28bf5a2e69b9da3cc3d44b54a7a5fdf6)) - - - -# [0.1.0](https://github.com/grammyjs/create-grammy/compare/0.0.2...0.1.0) (2022-04-25) - - -### Features - -* add deno support ([#5](https://github.com/grammyjs/create-grammy/issues/5)) ([bf2b355](https://github.com/grammyjs/create-grammy/commit/bf2b355f59d59e0a04283d749c9ec74b22e88ba8)) - - - -## 0.0.2 (2022-04-23) - - -### Bug Fixes - -* **readme:** change scope of example usage ([b7bb517](https://github.com/grammyjs/create-grammy/commit/b7bb517f2f2754e657cd062658b1c06c473125f4)) -* **readme:** fix example usage ([c959e6c](https://github.com/grammyjs/create-grammy/commit/c959e6c78c72fe55ce941bc4321ede27dd0ca341)) - - -### Features - -* add .gitignore file for node platform ([0b15ba5](https://github.com/grammyjs/create-grammy/commit/0b15ba55526a20ec616872f6dfd36444412d08ea)) - - - diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 38da5d2..0000000 --- a/LICENSE +++ /dev/null @@ -1,190 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2021 Vijay Meena - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 0c2acd8..0000000 --- a/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# 📖 Introduction - -Create grammY apps with one command. Inspired and original code by [create-discordx](https://github.com/oceanroleplay/discord.ts/tree/main/packages/create-discordx). - - -# ℹ How it works - -After starting cli, you will be prompted to select your platform, your favorite package manager, and even dockerfiles, if you so choose. - -It will then download the files you want. - -# 💻 Usage - -## Node -``` -npx @grammyjs/create-grammy@latest -``` - -Or - -``` -npm init @grammyjs/grammy@latest -``` - -## Deno - -To always use the latest version, the prefetching way to start: - -``` -deno run --unstable --allow-env --allow-read --allow-write --allow-net --allow-run -r https://deno.land/x/create_grammy/src/index.ts -``` - -Or - -```bash -deno install --unstable --allow-env --allow-read --allow-write --allow-net --allow-run -r -n create-grammy https://deno.land/x/create_grammy/src/index.ts - -create-grammy -``` - -# ➕ Adding own template - -## If you plan add template into this repository - - -1. [Fork](https://github.com/grammy/create-grammy/fork) the repository -2. Clone your own repository -3. In your forked repository, make your changes in a new git branch: - ```shell - git checkout -b my-branch main - ``` -4. Create your template in templates/{PLATFORM} directory - - - We would like you to create templates for both platforms, if it's possible - - **Node** template should contain entrypoint as `src/index.ts` - - **Deno** template should contain entrypoint as `src/mod.ts` - - By **default** we ship own Dockerfile, but you can write own one - - For **node** we already have needed `tsconfig.json`, so you **don't** need to write this - - For **node** leave **name** in *package.json* empty, because this field is automatically created at the stage of template installation - -5. Push your branch to GitHub: - ```shell - git push origin my-branch - ``` - -6. In GitHub, send a pull request to create-grammy:main. - - -## If you have own repository with template - -In this case we will mount your template as git submodule. Please, open issue with choosed **Connect my own template** option. diff --git a/configs/docker/deno/Dockerfile b/configs/docker/deno/Dockerfile deleted file mode 100644 index 75a34d8..0000000 --- a/configs/docker/deno/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM denoland/deno - -RUN mkdir -p /app -WORKDIR /app - -USER deno -COPY . /app - -RUN deno cache src/mod.ts - -CMD ["run", "--unstable", "--allow-all", "src/mod.ts"] \ No newline at end of file diff --git a/configs/docker/node/.dockerignore b/configs/docker/node/.dockerignore deleted file mode 100644 index b157fb4..0000000 --- a/configs/docker/node/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -build -dist -dest \ No newline at end of file diff --git a/configs/docker/node/Dockerfile b/configs/docker/node/Dockerfile deleted file mode 100644 index 33e4a13..0000000 --- a/configs/docker/node/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM node:lts-alpine - -RUN mkdir -p /app -WORKDIR /app - -COPY package.json /app/ -RUN npm install - -COPY . /app - -RUN npm run build - -CMD ["node", "dist/index.js"] \ No newline at end of file diff --git a/configs/tsconfig.json b/configs/tsconfig.json deleted file mode 100644 index 2c1cb2c..0000000 --- a/configs/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node", - "target": "ES2019", - "lib": [ - "ES2019" - ], - "declaration": false, - "strict": false, - "esModuleInterop": true, - "inlineSourceMap": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "skipLibCheck": true, - "outDir": "./dist" - }, - "include": ["src"], - "exclude": [ - "node_modules" - ] -} \ No newline at end of file diff --git a/package.json b/package.json deleted file mode 100644 index f206ca9..0000000 --- a/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "@grammyjs/create-grammy", - "version": "0.1.3", - "description": "create grammY bots with one command", - "keywords": [ - "grammY", - "create", - "telegram", - "framework", - "cmd", - "command", - "generator", - "template", - "bot" - ], - "homepage": "https://github.com/grammyjs/create-grammy#readme", - "bugs": { - "url": "https://github.com/grammyjs/create-grammy/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/grammyjs/create-grammy.git" - }, - "license": "Apache-2.0", - "author": "Satont (https://github.com/satont)", - "main": "./build/index.js", - "type": "module", - "files": [ - "build", - "LICENSE", - "README.md", - "package.json" - ], - "bin": { - "create-grammy": "./build/index.js" - }, - "scripts": { - "build": "deno2node tsconfig.json", - "lint": "npx eslint --ext .ts src", - "lint:fix": "npx eslint --fix --ext .ts src", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" - }, - "dependencies": { - "boxen": "^6.2.1", - "chalk": "^5.0.1", - "is-installed-globally": "^0.4.0", - "node-fetch": "^3.2.3", - "ora": "^6.1.0", - "prompts": "^2.4.2", - "tar": "^6.1.11", - "typescript": "^4.6.3", - "update-check": "^1.5.4" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - }, - "publishConfig": { - "access": "public" - }, - "devDependencies": { - "@types/prompts": "^2.0.14", - "@types/tar": "^6.1.1", - "@typescript-eslint/eslint-plugin": "^5.20.0", - "@typescript-eslint/parser": "^5.20.0", - "conventional-changelog-cli": "^2.2.2", - "deno2node": "^1.3.0", - "eslint": "^8.13.0" - } -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml deleted file mode 100644 index 06deeef..0000000 --- a/pnpm-lock.yaml +++ /dev/null @@ -1,2385 +0,0 @@ -lockfileVersion: 5.4 - -specifiers: - '@types/prompts': ^2.0.14 - '@types/tar': ^6.1.1 - '@typescript-eslint/eslint-plugin': ^5.20.0 - '@typescript-eslint/parser': ^5.20.0 - boxen: ^6.2.1 - chalk: ^5.0.1 - conventional-changelog-cli: ^2.2.2 - deno2node: ^1.3.0 - eslint: ^8.13.0 - is-installed-globally: ^0.4.0 - node-fetch: ^3.2.3 - ora: ^6.1.0 - prompts: ^2.4.2 - tar: ^6.1.11 - typescript: ^4.6.3 - update-check: ^1.5.4 - -dependencies: - boxen: 6.2.1 - chalk: 5.0.1 - is-installed-globally: 0.4.0 - node-fetch: 3.2.4 - ora: 6.1.0 - prompts: 2.4.2 - tar: 6.1.11 - typescript: 4.6.4 - update-check: 1.5.4 - -devDependencies: - '@types/prompts': 2.0.14 - '@types/tar': 6.1.1 - '@typescript-eslint/eslint-plugin': 5.21.0_vxtfsxfxxyksjzzdyas4bgfolu - '@typescript-eslint/parser': 5.21.0_t725usgvqspm5woeqpaxbfp2qu - conventional-changelog-cli: 2.2.2 - deno2node: 1.3.0 - eslint: 8.14.0 - -packages: - - /@babel/code-frame/7.16.7: - resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.17.9 - dev: true - - /@babel/helper-validator-identifier/7.16.7: - resolution: {integrity: sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/highlight/7.17.9: - resolution: {integrity: sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.16.7 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - - /@babel/runtime-corejs3/7.17.9: - resolution: {integrity: sha512-WxYHHUWF2uZ7Hp1K+D1xQgbgkGUfA+5UPOegEXGt2Y5SMog/rYCVaifLZDbw8UkNXozEqqrZTy6bglL7xTaCOw==} - engines: {node: '>=6.9.0'} - dependencies: - core-js-pure: 3.22.3 - regenerator-runtime: 0.13.9 - dev: true - - /@deno/shim-deno-test/0.3.2: - resolution: {integrity: sha512-STxWMnLuA0/bT0F41yKx6AbyzVVSjXYvgleFE4xit/m4aooMG/0Bs0MiQUe95EVS8DrzYmWbuCtdIlWymAdlsw==} - dev: true - - /@deno/shim-deno/0.4.3: - resolution: {integrity: sha512-m5iXsq3Nvv1aJ1xwUQGnXXOztZ5UUF9dZje3l6EbX41zE5+MioK1NN+2+C3nlWWs9PvSFam4EbZVG3JUbLCeDg==} - dependencies: - '@deno/shim-deno-test': 0.3.2 - which: 2.0.2 - dev: true - - /@eslint/eslintrc/1.2.2: - resolution: {integrity: sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - ajv: 6.12.6 - debug: 4.3.4 - espree: 9.3.1 - globals: 13.13.0 - ignore: 5.2.0 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@humanwhocodes/config-array/0.9.5: - resolution: {integrity: sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==} - engines: {node: '>=10.10.0'} - dependencies: - '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@humanwhocodes/object-schema/1.2.1: - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} - dev: true - - /@hutson/parse-repository-url/3.0.2: - resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} - engines: {node: '>=6.9.0'} - dev: true - - /@nodelib/fs.scandir/2.1.5: - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - dev: true - - /@nodelib/fs.stat/2.0.5: - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - dev: true - - /@nodelib/fs.walk/1.2.8: - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.13.0 - dev: true - - /@ts-morph/common/0.13.0: - resolution: {integrity: sha512-fEJ6j7Cu8yiWjA4UmybOBH9Efgb/64ZTWuvCF4KysGu4xz8ettfyaqFt8WZ1btCxXsGZJjZ2/3svOF6rL+UFdQ==} - dependencies: - fast-glob: 3.2.11 - minimatch: 5.0.1 - mkdirp: 1.0.4 - path-browserify: 1.0.1 - dev: true - - /@types/json-schema/7.0.11: - resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} - dev: true - - /@types/minimist/1.2.2: - resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} - dev: true - - /@types/minipass/3.1.2: - resolution: {integrity: sha512-foLGjgrJkUjLG/o2t2ymlZGEoBNBa/TfoUZ7oCTkOjP1T43UGBJspovJou/l3ZuHvye2ewR5cZNtp2zyWgILMA==} - dependencies: - '@types/node': 17.0.31 - dev: true - - /@types/node/17.0.31: - resolution: {integrity: sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==} - dev: true - - /@types/normalize-package-data/2.4.1: - resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} - dev: true - - /@types/prompts/2.0.14: - resolution: {integrity: sha512-HZBd99fKxRWpYCErtm2/yxUZv6/PBI9J7N4TNFffl5JbrYMHBwF25DjQGTW3b3jmXq+9P6/8fCIb2ee57BFfYA==} - dependencies: - '@types/node': 17.0.31 - dev: true - - /@types/tar/6.1.1: - resolution: {integrity: sha512-8mto3YZfVpqB1CHMaYz1TUYIQfZFbh/QbEq5Hsn6D0ilCfqRVCdalmc89B7vi3jhl9UYIk+dWDABShNfOkv5HA==} - dependencies: - '@types/minipass': 3.1.2 - '@types/node': 17.0.31 - dev: true - - /@typescript-eslint/eslint-plugin/5.21.0_vxtfsxfxxyksjzzdyas4bgfolu: - resolution: {integrity: sha512-fTU85q8v5ZLpoZEyn/u1S2qrFOhi33Edo2CZ0+q1gDaWWm0JuPh3bgOyU8lM0edIEYgKLDkPFiZX2MOupgjlyg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/parser': 5.21.0_t725usgvqspm5woeqpaxbfp2qu - '@typescript-eslint/scope-manager': 5.21.0 - '@typescript-eslint/type-utils': 5.21.0_t725usgvqspm5woeqpaxbfp2qu - '@typescript-eslint/utils': 5.21.0_t725usgvqspm5woeqpaxbfp2qu - debug: 4.3.4 - eslint: 8.14.0 - functional-red-black-tree: 1.0.1 - ignore: 5.2.0 - regexpp: 3.2.0 - semver: 7.3.7 - tsutils: 3.21.0_typescript@4.6.4 - typescript: 4.6.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/parser/5.21.0_t725usgvqspm5woeqpaxbfp2qu: - resolution: {integrity: sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 5.21.0 - '@typescript-eslint/types': 5.21.0 - '@typescript-eslint/typescript-estree': 5.21.0_typescript@4.6.4 - debug: 4.3.4 - eslint: 8.14.0 - typescript: 4.6.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/scope-manager/5.21.0: - resolution: {integrity: sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.21.0 - '@typescript-eslint/visitor-keys': 5.21.0 - dev: true - - /@typescript-eslint/type-utils/5.21.0_t725usgvqspm5woeqpaxbfp2qu: - resolution: {integrity: sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '*' - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/utils': 5.21.0_t725usgvqspm5woeqpaxbfp2qu - debug: 4.3.4 - eslint: 8.14.0 - tsutils: 3.21.0_typescript@4.6.4 - typescript: 4.6.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/types/5.21.0: - resolution: {integrity: sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/typescript-estree/5.21.0_typescript@4.6.4: - resolution: {integrity: sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.21.0 - '@typescript-eslint/visitor-keys': 5.21.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.3.7 - tsutils: 3.21.0_typescript@4.6.4 - typescript: 4.6.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/utils/5.21.0_t725usgvqspm5woeqpaxbfp2qu: - resolution: {integrity: sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.21.0 - '@typescript-eslint/types': 5.21.0 - '@typescript-eslint/typescript-estree': 5.21.0_typescript@4.6.4 - eslint: 8.14.0 - eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.14.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/visitor-keys/5.21.0: - resolution: {integrity: sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.21.0 - eslint-visitor-keys: 3.3.0 - dev: true - - /JSONStream/1.3.5: - resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} - hasBin: true - dependencies: - jsonparse: 1.3.1 - through: 2.3.8 - dev: true - - /acorn-jsx/5.3.2_acorn@8.7.1: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - acorn: 8.7.1 - dev: true - - /acorn/8.7.1: - resolution: {integrity: sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - - /add-stream/1.0.0: - resolution: {integrity: sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=} - dev: true - - /ajv/6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - dev: true - - /ansi-align/3.0.1: - resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} - dependencies: - string-width: 4.2.3 - dev: false - - /ansi-regex/5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - /ansi-regex/6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} - engines: {node: '>=12'} - dev: false - - /ansi-styles/3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - dependencies: - color-convert: 1.9.3 - dev: true - - /ansi-styles/4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - - /ansi-styles/6.1.0: - resolution: {integrity: sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==} - engines: {node: '>=12'} - dev: false - - /argparse/2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true - - /array-ify/1.0.0: - resolution: {integrity: sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=} - dev: true - - /array-union/2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - dev: true - - /arrify/1.0.1: - resolution: {integrity: sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=} - engines: {node: '>=0.10.0'} - dev: true - - /balanced-match/1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true - - /base64-js/1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - dev: false - - /bl/5.0.0: - resolution: {integrity: sha512-8vxFNZ0pflFfi0WXA3WQXlj6CaMEwsmh63I1CNp0q+wWv8sD0ARx1KovSQd0l2GkwrMIOyedq0EF1FxI+RCZLQ==} - dependencies: - buffer: 6.0.3 - inherits: 2.0.4 - readable-stream: 3.6.0 - dev: false - - /boxen/6.2.1: - resolution: {integrity: sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - ansi-align: 3.0.1 - camelcase: 6.3.0 - chalk: 4.1.2 - cli-boxes: 3.0.0 - string-width: 5.1.2 - type-fest: 2.12.2 - widest-line: 4.0.1 - wrap-ansi: 8.0.1 - dev: false - - /brace-expansion/1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: true - - /brace-expansion/2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - dependencies: - balanced-match: 1.0.2 - dev: true - - /braces/3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - dev: true - - /buffer/6.0.3: - resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - dev: false - - /callsites/3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - dev: true - - /camelcase-keys/6.2.2: - resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} - engines: {node: '>=8'} - dependencies: - camelcase: 5.3.1 - map-obj: 4.3.0 - quick-lru: 4.0.1 - dev: true - - /camelcase/5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - dev: true - - /camelcase/6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - dev: false - - /chalk/2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - dev: true - - /chalk/4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - /chalk/5.0.1: - resolution: {integrity: sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - dev: false - - /chownr/2.0.0: - resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} - engines: {node: '>=10'} - dev: false - - /cli-boxes/3.0.0: - resolution: {integrity: sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==} - engines: {node: '>=10'} - dev: false - - /cli-cursor/4.0.0: - resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - restore-cursor: 4.0.0 - dev: false - - /cli-spinners/2.6.1: - resolution: {integrity: sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==} - engines: {node: '>=6'} - dev: false - - /cliui/7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - - /clone/1.0.4: - resolution: {integrity: sha1-2jCcwmPfFZlMaIypAheco8fNfH4=} - engines: {node: '>=0.8'} - dev: false - - /code-block-writer/11.0.0: - resolution: {integrity: sha512-GEqWvEWWsOvER+g9keO4ohFoD3ymwyCnqY3hoTr7GZipYFwEhMHJw+TtV0rfgRhNImM6QWZGO2XYjlJVyYT62w==} - dependencies: - tslib: 2.3.1 - dev: true - - /color-convert/1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - dependencies: - color-name: 1.1.3 - dev: true - - /color-convert/2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - - /color-name/1.1.3: - resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=} - dev: true - - /color-name/1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - /compare-func/2.0.0: - resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} - dependencies: - array-ify: 1.0.0 - dot-prop: 5.3.0 - dev: true - - /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} - dev: true - - /conventional-changelog-angular/5.0.13: - resolution: {integrity: sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==} - engines: {node: '>=10'} - dependencies: - compare-func: 2.0.0 - q: 1.5.1 - dev: true - - /conventional-changelog-atom/2.0.8: - resolution: {integrity: sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-cli/2.2.2: - resolution: {integrity: sha512-8grMV5Jo8S0kP3yoMeJxV2P5R6VJOqK72IiSV9t/4H5r/HiRqEBQ83bYGuz4Yzfdj4bjaAEhZN/FFbsFXr5bOA==} - engines: {node: '>=10'} - hasBin: true - dependencies: - add-stream: 1.0.0 - conventional-changelog: 3.1.25 - lodash: 4.17.21 - meow: 8.1.2 - tempfile: 3.0.0 - dev: true - - /conventional-changelog-codemirror/2.0.8: - resolution: {integrity: sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-conventionalcommits/4.6.3: - resolution: {integrity: sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==} - engines: {node: '>=10'} - dependencies: - compare-func: 2.0.0 - lodash: 4.17.21 - q: 1.5.1 - dev: true - - /conventional-changelog-core/4.2.4: - resolution: {integrity: sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg==} - engines: {node: '>=10'} - dependencies: - add-stream: 1.0.0 - conventional-changelog-writer: 5.0.1 - conventional-commits-parser: 3.2.4 - dateformat: 3.0.3 - get-pkg-repo: 4.2.1 - git-raw-commits: 2.0.11 - git-remote-origin-url: 2.0.0 - git-semver-tags: 4.1.1 - lodash: 4.17.21 - normalize-package-data: 3.0.3 - q: 1.5.1 - read-pkg: 3.0.0 - read-pkg-up: 3.0.0 - through2: 4.0.2 - dev: true - - /conventional-changelog-ember/2.0.9: - resolution: {integrity: sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-eslint/3.0.9: - resolution: {integrity: sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-express/2.0.6: - resolution: {integrity: sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-jquery/3.0.11: - resolution: {integrity: sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 - dev: true - - /conventional-changelog-jshint/2.0.9: - resolution: {integrity: sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA==} - engines: {node: '>=10'} - dependencies: - compare-func: 2.0.0 - q: 1.5.1 - dev: true - - /conventional-changelog-preset-loader/2.3.4: - resolution: {integrity: sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==} - engines: {node: '>=10'} - dev: true - - /conventional-changelog-writer/5.0.1: - resolution: {integrity: sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - conventional-commits-filter: 2.0.7 - dateformat: 3.0.3 - handlebars: 4.7.7 - json-stringify-safe: 5.0.1 - lodash: 4.17.21 - meow: 8.1.2 - semver: 6.3.0 - split: 1.0.1 - through2: 4.0.2 - dev: true - - /conventional-changelog/3.1.25: - resolution: {integrity: sha512-ryhi3fd1mKf3fSjbLXOfK2D06YwKNic1nC9mWqybBHdObPd8KJ2vjaXZfYj1U23t+V8T8n0d7gwnc9XbIdFbyQ==} - engines: {node: '>=10'} - dependencies: - conventional-changelog-angular: 5.0.13 - conventional-changelog-atom: 2.0.8 - conventional-changelog-codemirror: 2.0.8 - conventional-changelog-conventionalcommits: 4.6.3 - conventional-changelog-core: 4.2.4 - conventional-changelog-ember: 2.0.9 - conventional-changelog-eslint: 3.0.9 - conventional-changelog-express: 2.0.6 - conventional-changelog-jquery: 3.0.11 - conventional-changelog-jshint: 2.0.9 - conventional-changelog-preset-loader: 2.3.4 - dev: true - - /conventional-commits-filter/2.0.7: - resolution: {integrity: sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==} - engines: {node: '>=10'} - dependencies: - lodash.ismatch: 4.4.0 - modify-values: 1.0.1 - dev: true - - /conventional-commits-parser/3.2.4: - resolution: {integrity: sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==} - engines: {node: '>=10'} - hasBin: true - dependencies: - is-text-path: 1.0.1 - JSONStream: 1.3.5 - lodash: 4.17.21 - meow: 8.1.2 - split2: 3.2.2 - through2: 4.0.2 - dev: true - - /core-js-pure/3.22.3: - resolution: {integrity: sha512-oN88zz7nmKROMy8GOjs+LN+0LedIvbMdnB5XsTlhcOg1WGARt9l0LFg0zohdoFmCsEZ1h2ZbSQ6azj3M+vhzwQ==} - requiresBuild: true - dev: true - - /core-util-is/1.0.3: - resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - dev: true - - /cross-spawn/7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - dev: true - - /dargs/7.0.0: - resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==} - engines: {node: '>=8'} - dev: true - - /data-uri-to-buffer/4.0.0: - resolution: {integrity: sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==} - engines: {node: '>= 12'} - dev: false - - /dateformat/3.0.3: - resolution: {integrity: sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==} - dev: true - - /debug/4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - - /decamelize-keys/1.1.0: - resolution: {integrity: sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=} - engines: {node: '>=0.10.0'} - dependencies: - decamelize: 1.2.0 - map-obj: 1.0.1 - dev: true - - /decamelize/1.2.0: - resolution: {integrity: sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=} - engines: {node: '>=0.10.0'} - dev: true - - /deep-extend/0.6.0: - resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} - engines: {node: '>=4.0.0'} - dev: false - - /deep-is/0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - dev: true - - /defaults/1.0.3: - resolution: {integrity: sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=} - dependencies: - clone: 1.0.4 - dev: false - - /deno2node/1.3.0: - resolution: {integrity: sha512-+r1bYJEwo3pe/8jyWqNK/uOjt2wVor1QygEDMTeL2Gn723EfaP47SQzAgP+lH8wZxe6wyoMuVGvXQ8mBlDIq9g==} - engines: {node: '>=14.13.1'} - hasBin: true - dependencies: - '@deno/shim-deno': 0.4.3 - ts-morph: 14.0.0 - xregexp: 5.1.0 - zod: 3.14.4 - dev: true - - /dir-glob/3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} - dependencies: - path-type: 4.0.0 - dev: true - - /doctrine/3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dependencies: - esutils: 2.0.3 - dev: true - - /dot-prop/5.3.0: - resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} - engines: {node: '>=8'} - dependencies: - is-obj: 2.0.0 - dev: true - - /eastasianwidth/0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - dev: false - - /emoji-regex/8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - /emoji-regex/9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - dev: false - - /error-ex/1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - dependencies: - is-arrayish: 0.2.1 - dev: true - - /escalade/3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} - dev: true - - /escape-string-regexp/1.0.5: - resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=} - engines: {node: '>=0.8.0'} - dev: true - - /escape-string-regexp/4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - dev: true - - /eslint-scope/5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - dev: true - - /eslint-scope/7.1.1: - resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - dev: true - - /eslint-utils/3.0.0_eslint@8.14.0: - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint: 8.14.0 - eslint-visitor-keys: 2.1.0 - dev: true - - /eslint-visitor-keys/2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - dev: true - - /eslint-visitor-keys/3.3.0: - resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /eslint/8.14.0: - resolution: {integrity: sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true - dependencies: - '@eslint/eslintrc': 1.2.2 - '@humanwhocodes/config-array': 0.9.5 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.14.0 - eslint-visitor-keys: 3.3.0 - espree: 9.3.1 - esquery: 1.4.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - functional-red-black-tree: 1.0.1 - glob-parent: 6.0.2 - globals: 13.13.0 - ignore: 5.2.0 - import-fresh: 3.3.0 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.1 - regexpp: 3.2.0 - strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 - text-table: 0.2.0 - v8-compile-cache: 2.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /espree/9.3.1: - resolution: {integrity: sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - acorn: 8.7.1 - acorn-jsx: 5.3.2_acorn@8.7.1 - eslint-visitor-keys: 3.3.0 - dev: true - - /esquery/1.4.0: - resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==} - engines: {node: '>=0.10'} - dependencies: - estraverse: 5.3.0 - dev: true - - /esrecurse/4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - dependencies: - estraverse: 5.3.0 - dev: true - - /estraverse/4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - dev: true - - /estraverse/5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - dev: true - - /esutils/2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - dev: true - - /fast-deep-equal/3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - dev: true - - /fast-glob/3.2.11: - resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} - engines: {node: '>=8.6.0'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.5 - dev: true - - /fast-json-stable-stringify/2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - dev: true - - /fast-levenshtein/2.0.6: - resolution: {integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=} - dev: true - - /fastq/1.13.0: - resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} - dependencies: - reusify: 1.0.4 - dev: true - - /fetch-blob/3.1.5: - resolution: {integrity: sha512-N64ZpKqoLejlrwkIAnb9iLSA3Vx/kjgzpcDhygcqJ2KKjky8nCgUQ+dzXtbrLaWZGZNmNfQTsiQ0weZ1svglHg==} - engines: {node: ^12.20 || >= 14.13} - dependencies: - node-domexception: 1.0.0 - web-streams-polyfill: 3.2.1 - dev: false - - /file-entry-cache/6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - dependencies: - flat-cache: 3.0.4 - dev: true - - /fill-range/7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: true - - /find-up/2.1.0: - resolution: {integrity: sha1-RdG35QbHF93UgndaK3eSCjwMV6c=} - engines: {node: '>=4'} - dependencies: - locate-path: 2.0.0 - dev: true - - /find-up/4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} - dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - dev: true - - /flat-cache/3.0.4: - resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} - engines: {node: ^10.12.0 || >=12.0.0} - dependencies: - flatted: 3.2.5 - rimraf: 3.0.2 - dev: true - - /flatted/3.2.5: - resolution: {integrity: sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==} - dev: true - - /formdata-polyfill/4.0.10: - resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} - engines: {node: '>=12.20.0'} - dependencies: - fetch-blob: 3.1.5 - dev: false - - /fs-minipass/2.1.0: - resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} - engines: {node: '>= 8'} - dependencies: - minipass: 3.1.6 - dev: false - - /fs.realpath/1.0.0: - resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} - dev: true - - /function-bind/1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: true - - /functional-red-black-tree/1.0.1: - resolution: {integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=} - dev: true - - /get-caller-file/2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - dev: true - - /get-pkg-repo/4.2.1: - resolution: {integrity: sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA==} - engines: {node: '>=6.9.0'} - hasBin: true - dependencies: - '@hutson/parse-repository-url': 3.0.2 - hosted-git-info: 4.1.0 - through2: 2.0.5 - yargs: 16.2.0 - dev: true - - /git-raw-commits/2.0.11: - resolution: {integrity: sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==} - engines: {node: '>=10'} - hasBin: true - dependencies: - dargs: 7.0.0 - lodash: 4.17.21 - meow: 8.1.2 - split2: 3.2.2 - through2: 4.0.2 - dev: true - - /git-remote-origin-url/2.0.0: - resolution: {integrity: sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=} - engines: {node: '>=4'} - dependencies: - gitconfiglocal: 1.0.0 - pify: 2.3.0 - dev: true - - /git-semver-tags/4.1.1: - resolution: {integrity: sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA==} - engines: {node: '>=10'} - hasBin: true - dependencies: - meow: 8.1.2 - semver: 6.3.0 - dev: true - - /gitconfiglocal/1.0.0: - resolution: {integrity: sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=} - dependencies: - ini: 1.3.8 - dev: true - - /glob-parent/5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - dev: true - - /glob-parent/6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} - dependencies: - is-glob: 4.0.3 - dev: true - - /glob/7.2.0: - resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /global-dirs/3.0.0: - resolution: {integrity: sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==} - engines: {node: '>=10'} - dependencies: - ini: 2.0.0 - dev: false - - /globals/13.13.0: - resolution: {integrity: sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==} - engines: {node: '>=8'} - dependencies: - type-fest: 0.20.2 - dev: true - - /globby/11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.2.11 - ignore: 5.2.0 - merge2: 1.4.1 - slash: 3.0.0 - dev: true - - /graceful-fs/4.2.10: - resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} - dev: true - - /handlebars/4.7.7: - resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==} - engines: {node: '>=0.4.7'} - hasBin: true - dependencies: - minimist: 1.2.6 - neo-async: 2.6.2 - source-map: 0.6.1 - wordwrap: 1.0.0 - optionalDependencies: - uglify-js: 3.15.4 - dev: true - - /hard-rejection/2.1.0: - resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} - engines: {node: '>=6'} - dev: true - - /has-flag/3.0.0: - resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=} - engines: {node: '>=4'} - dev: true - - /has-flag/4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - /has/1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - dev: true - - /hosted-git-info/2.8.9: - resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - dev: true - - /hosted-git-info/4.1.0: - resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} - engines: {node: '>=10'} - dependencies: - lru-cache: 6.0.0 - dev: true - - /ieee754/1.2.1: - resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - dev: false - - /ignore/5.2.0: - resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} - engines: {node: '>= 4'} - dev: true - - /import-fresh/3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - dev: true - - /imurmurhash/0.1.4: - resolution: {integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=} - engines: {node: '>=0.8.19'} - dev: true - - /indent-string/4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} - engines: {node: '>=8'} - dev: true - - /inflight/1.0.6: - resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - - /inherits/2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - - /ini/1.3.8: - resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - - /ini/2.0.0: - resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==} - engines: {node: '>=10'} - dev: false - - /is-arrayish/0.2.1: - resolution: {integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=} - dev: true - - /is-core-module/2.9.0: - resolution: {integrity: sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==} - dependencies: - has: 1.0.3 - dev: true - - /is-extglob/2.1.1: - resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} - engines: {node: '>=0.10.0'} - dev: true - - /is-fullwidth-code-point/3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - /is-glob/4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - dev: true - - /is-installed-globally/0.4.0: - resolution: {integrity: sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==} - engines: {node: '>=10'} - dependencies: - global-dirs: 3.0.0 - is-path-inside: 3.0.3 - dev: false - - /is-interactive/2.0.0: - resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==} - engines: {node: '>=12'} - dev: false - - /is-number/7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - dev: true - - /is-obj/2.0.0: - resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} - engines: {node: '>=8'} - dev: true - - /is-path-inside/3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - dev: false - - /is-plain-obj/1.1.0: - resolution: {integrity: sha1-caUMhCnfync8kqOQpKA7OfzVHT4=} - engines: {node: '>=0.10.0'} - dev: true - - /is-text-path/1.0.1: - resolution: {integrity: sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=} - engines: {node: '>=0.10.0'} - dependencies: - text-extensions: 1.9.0 - dev: true - - /is-unicode-supported/1.2.0: - resolution: {integrity: sha512-wH+U77omcRzevfIG8dDhTS0V9zZyweakfD01FULl97+0EHiJTTZtJqxPSkIIo/SDPv/i07k/C9jAPY+jwLLeUQ==} - engines: {node: '>=12'} - dev: false - - /isarray/1.0.0: - resolution: {integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=} - dev: true - - /isexe/2.0.0: - resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} - dev: true - - /js-tokens/4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: true - - /js-yaml/4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - dependencies: - argparse: 2.0.1 - dev: true - - /json-parse-better-errors/1.0.2: - resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} - dev: true - - /json-parse-even-better-errors/2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - dev: true - - /json-schema-traverse/0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - dev: true - - /json-stable-stringify-without-jsonify/1.0.1: - resolution: {integrity: sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=} - dev: true - - /json-stringify-safe/5.0.1: - resolution: {integrity: sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=} - dev: true - - /jsonparse/1.3.1: - resolution: {integrity: sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=} - engines: {'0': node >= 0.2.0} - dev: true - - /kind-of/6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} - dev: true - - /kleur/3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - dev: false - - /levn/0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - dev: true - - /lines-and-columns/1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: true - - /load-json-file/4.0.0: - resolution: {integrity: sha1-L19Fq5HjMhYjT9U62rZo607AmTs=} - engines: {node: '>=4'} - dependencies: - graceful-fs: 4.2.10 - parse-json: 4.0.0 - pify: 3.0.0 - strip-bom: 3.0.0 - dev: true - - /locate-path/2.0.0: - resolution: {integrity: sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=} - engines: {node: '>=4'} - dependencies: - p-locate: 2.0.0 - path-exists: 3.0.0 - dev: true - - /locate-path/5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} - dependencies: - p-locate: 4.1.0 - dev: true - - /lodash.ismatch/4.4.0: - resolution: {integrity: sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=} - dev: true - - /lodash.merge/4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - dev: true - - /lodash/4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: true - - /log-symbols/5.1.0: - resolution: {integrity: sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==} - engines: {node: '>=12'} - dependencies: - chalk: 5.0.1 - is-unicode-supported: 1.2.0 - dev: false - - /lru-cache/6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - dependencies: - yallist: 4.0.0 - dev: true - - /map-obj/1.0.1: - resolution: {integrity: sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=} - engines: {node: '>=0.10.0'} - dev: true - - /map-obj/4.3.0: - resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} - engines: {node: '>=8'} - dev: true - - /meow/8.1.2: - resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} - engines: {node: '>=10'} - dependencies: - '@types/minimist': 1.2.2 - camelcase-keys: 6.2.2 - decamelize-keys: 1.1.0 - hard-rejection: 2.1.0 - minimist-options: 4.1.0 - normalize-package-data: 3.0.3 - read-pkg-up: 7.0.1 - redent: 3.0.0 - trim-newlines: 3.0.1 - type-fest: 0.18.1 - yargs-parser: 20.2.9 - dev: true - - /merge2/1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} - dev: true - - /micromatch/4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} - dependencies: - braces: 3.0.2 - picomatch: 2.3.1 - dev: true - - /mimic-fn/2.1.0: - resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} - engines: {node: '>=6'} - dev: false - - /min-indent/1.0.1: - resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} - engines: {node: '>=4'} - dev: true - - /minimatch/3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 - dev: true - - /minimatch/5.0.1: - resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} - engines: {node: '>=10'} - dependencies: - brace-expansion: 2.0.1 - dev: true - - /minimist-options/4.1.0: - resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} - engines: {node: '>= 6'} - dependencies: - arrify: 1.0.1 - is-plain-obj: 1.1.0 - kind-of: 6.0.3 - dev: true - - /minimist/1.2.6: - resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} - - /minipass/3.1.6: - resolution: {integrity: sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==} - engines: {node: '>=8'} - dependencies: - yallist: 4.0.0 - dev: false - - /minizlib/2.1.2: - resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} - engines: {node: '>= 8'} - dependencies: - minipass: 3.1.6 - yallist: 4.0.0 - dev: false - - /mkdirp/1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - - /modify-values/1.0.1: - resolution: {integrity: sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==} - engines: {node: '>=0.10.0'} - dev: true - - /ms/2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true - - /natural-compare/1.4.0: - resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=} - dev: true - - /neo-async/2.6.2: - resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - dev: true - - /node-domexception/1.0.0: - resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} - engines: {node: '>=10.5.0'} - dev: false - - /node-fetch/3.2.4: - resolution: {integrity: sha512-WvYJRN7mMyOLurFR2YpysQGuwYrJN+qrrpHjJDuKMcSPdfFccRUla/kng2mz6HWSBxJcqPbvatS6Gb4RhOzCJw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - data-uri-to-buffer: 4.0.0 - fetch-blob: 3.1.5 - formdata-polyfill: 4.0.10 - dev: false - - /normalize-package-data/2.5.0: - resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} - dependencies: - hosted-git-info: 2.8.9 - resolve: 1.22.0 - semver: 5.7.1 - validate-npm-package-license: 3.0.4 - dev: true - - /normalize-package-data/3.0.3: - resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==} - engines: {node: '>=10'} - dependencies: - hosted-git-info: 4.1.0 - is-core-module: 2.9.0 - semver: 7.3.7 - validate-npm-package-license: 3.0.4 - dev: true - - /once/1.4.0: - resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=} - dependencies: - wrappy: 1.0.2 - dev: true - - /onetime/5.1.2: - resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} - engines: {node: '>=6'} - dependencies: - mimic-fn: 2.1.0 - dev: false - - /optionator/0.9.1: - resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} - engines: {node: '>= 0.8.0'} - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.3 - dev: true - - /ora/6.1.0: - resolution: {integrity: sha512-CxEP6845hLK+NHFWZ+LplGO4zfw4QSfxTlqMfvlJ988GoiUeZDMzCvqsZkFHv69sPICmJH1MDxZoQFOKXerAVw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - bl: 5.0.0 - chalk: 5.0.1 - cli-cursor: 4.0.0 - cli-spinners: 2.6.1 - is-interactive: 2.0.0 - is-unicode-supported: 1.2.0 - log-symbols: 5.1.0 - strip-ansi: 7.0.1 - wcwidth: 1.0.1 - dev: false - - /p-limit/1.3.0: - resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} - engines: {node: '>=4'} - dependencies: - p-try: 1.0.0 - dev: true - - /p-limit/2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} - dependencies: - p-try: 2.2.0 - dev: true - - /p-locate/2.0.0: - resolution: {integrity: sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=} - engines: {node: '>=4'} - dependencies: - p-limit: 1.3.0 - dev: true - - /p-locate/4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} - dependencies: - p-limit: 2.3.0 - dev: true - - /p-try/1.0.0: - resolution: {integrity: sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=} - engines: {node: '>=4'} - dev: true - - /p-try/2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - dev: true - - /parent-module/1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - dependencies: - callsites: 3.1.0 - dev: true - - /parse-json/4.0.0: - resolution: {integrity: sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=} - engines: {node: '>=4'} - dependencies: - error-ex: 1.3.2 - json-parse-better-errors: 1.0.2 - dev: true - - /parse-json/5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - dependencies: - '@babel/code-frame': 7.16.7 - error-ex: 1.3.2 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - dev: true - - /path-browserify/1.0.1: - resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} - dev: true - - /path-exists/3.0.0: - resolution: {integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=} - engines: {node: '>=4'} - dev: true - - /path-exists/4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - dev: true - - /path-is-absolute/1.0.1: - resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} - engines: {node: '>=0.10.0'} - dev: true - - /path-key/3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - dev: true - - /path-parse/1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true - - /path-type/3.0.0: - resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} - engines: {node: '>=4'} - dependencies: - pify: 3.0.0 - dev: true - - /path-type/4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - dev: true - - /picomatch/2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - dev: true - - /pify/2.3.0: - resolution: {integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw=} - engines: {node: '>=0.10.0'} - dev: true - - /pify/3.0.0: - resolution: {integrity: sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=} - engines: {node: '>=4'} - dev: true - - /prelude-ls/1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - dev: true - - /process-nextick-args/2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - dev: true - - /prompts/2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - dev: false - - /punycode/2.1.1: - resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} - engines: {node: '>=6'} - dev: true - - /q/1.5.1: - resolution: {integrity: sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=} - engines: {node: '>=0.6.0', teleport: '>=0.2.0'} - dev: true - - /queue-microtask/1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - dev: true - - /quick-lru/4.0.1: - resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} - engines: {node: '>=8'} - dev: true - - /rc/1.2.8: - resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} - hasBin: true - dependencies: - deep-extend: 0.6.0 - ini: 1.3.8 - minimist: 1.2.6 - strip-json-comments: 2.0.1 - dev: false - - /read-pkg-up/3.0.0: - resolution: {integrity: sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=} - engines: {node: '>=4'} - dependencies: - find-up: 2.1.0 - read-pkg: 3.0.0 - dev: true - - /read-pkg-up/7.0.1: - resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} - engines: {node: '>=8'} - dependencies: - find-up: 4.1.0 - read-pkg: 5.2.0 - type-fest: 0.8.1 - dev: true - - /read-pkg/3.0.0: - resolution: {integrity: sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=} - engines: {node: '>=4'} - dependencies: - load-json-file: 4.0.0 - normalize-package-data: 2.5.0 - path-type: 3.0.0 - dev: true - - /read-pkg/5.2.0: - resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} - engines: {node: '>=8'} - dependencies: - '@types/normalize-package-data': 2.4.1 - normalize-package-data: 2.5.0 - parse-json: 5.2.0 - type-fest: 0.6.0 - dev: true - - /readable-stream/2.3.7: - resolution: {integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==} - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - dev: true - - /readable-stream/3.6.0: - resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} - engines: {node: '>= 6'} - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - - /redent/3.0.0: - resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} - engines: {node: '>=8'} - dependencies: - indent-string: 4.0.0 - strip-indent: 3.0.0 - dev: true - - /regenerator-runtime/0.13.9: - resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==} - dev: true - - /regexpp/3.2.0: - resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} - engines: {node: '>=8'} - dev: true - - /registry-auth-token/3.3.2: - resolution: {integrity: sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==} - dependencies: - rc: 1.2.8 - safe-buffer: 5.2.1 - dev: false - - /registry-url/3.1.0: - resolution: {integrity: sha1-PU74cPc93h138M+aOBQyRE4XSUI=} - engines: {node: '>=0.10.0'} - dependencies: - rc: 1.2.8 - dev: false - - /require-directory/2.1.1: - resolution: {integrity: sha1-jGStX9MNqxyXbiNE/+f3kqam30I=} - engines: {node: '>=0.10.0'} - dev: true - - /resolve-from/4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - dev: true - - /resolve/1.22.0: - resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==} - hasBin: true - dependencies: - is-core-module: 2.9.0 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - - /restore-cursor/4.0.0: - resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - onetime: 5.1.2 - signal-exit: 3.0.7 - dev: false - - /reusify/1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - dev: true - - /rimraf/3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - dependencies: - glob: 7.2.0 - dev: true - - /run-parallel/1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - dependencies: - queue-microtask: 1.2.3 - dev: true - - /safe-buffer/5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: true - - /safe-buffer/5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - - /semver/5.7.1: - resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} - hasBin: true - dev: true - - /semver/6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - dev: true - - /semver/7.3.7: - resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - dev: true - - /shebang-command/2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - dependencies: - shebang-regex: 3.0.0 - dev: true - - /shebang-regex/3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - dev: true - - /signal-exit/3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - dev: false - - /sisteransi/1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - dev: false - - /slash/3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - dev: true - - /source-map/0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: true - - /spdx-correct/3.1.1: - resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} - dependencies: - spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.11 - dev: true - - /spdx-exceptions/2.3.0: - resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} - dev: true - - /spdx-expression-parse/3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - dependencies: - spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.11 - dev: true - - /spdx-license-ids/3.0.11: - resolution: {integrity: sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==} - dev: true - - /split/1.0.1: - resolution: {integrity: sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==} - dependencies: - through: 2.3.8 - dev: true - - /split2/3.2.2: - resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} - dependencies: - readable-stream: 3.6.0 - dev: true - - /string-width/4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - /string-width/5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.0.1 - dev: false - - /string_decoder/1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - dependencies: - safe-buffer: 5.1.2 - dev: true - - /string_decoder/1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - dependencies: - safe-buffer: 5.2.1 - - /strip-ansi/6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.1 - - /strip-ansi/7.0.1: - resolution: {integrity: sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==} - engines: {node: '>=12'} - dependencies: - ansi-regex: 6.0.1 - dev: false - - /strip-bom/3.0.0: - resolution: {integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=} - engines: {node: '>=4'} - dev: true - - /strip-indent/3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} - dependencies: - min-indent: 1.0.1 - dev: true - - /strip-json-comments/2.0.1: - resolution: {integrity: sha1-PFMZQukIwml8DsNEhYwobHygpgo=} - engines: {node: '>=0.10.0'} - dev: false - - /strip-json-comments/3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - dev: true - - /supports-color/5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - dependencies: - has-flag: 3.0.0 - dev: true - - /supports-color/7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - - /supports-preserve-symlinks-flag/1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - dev: true - - /tar/6.1.11: - resolution: {integrity: sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==} - engines: {node: '>= 10'} - dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 3.1.6 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - dev: false - - /temp-dir/2.0.0: - resolution: {integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==} - engines: {node: '>=8'} - dev: true - - /tempfile/3.0.0: - resolution: {integrity: sha512-uNFCg478XovRi85iD42egu+eSFUmmka750Jy7L5tfHI5hQKKtbPnxaSaXAbBqCDYrw3wx4tXjKwci4/QmsZJxw==} - engines: {node: '>=8'} - dependencies: - temp-dir: 2.0.0 - uuid: 3.4.0 - dev: true - - /text-extensions/1.9.0: - resolution: {integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==} - engines: {node: '>=0.10'} - dev: true - - /text-table/0.2.0: - resolution: {integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=} - dev: true - - /through/2.3.8: - resolution: {integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=} - dev: true - - /through2/2.0.5: - resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} - dependencies: - readable-stream: 2.3.7 - xtend: 4.0.2 - dev: true - - /through2/4.0.2: - resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} - dependencies: - readable-stream: 3.6.0 - dev: true - - /to-regex-range/5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - dev: true - - /trim-newlines/3.0.1: - resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} - engines: {node: '>=8'} - dev: true - - /ts-morph/14.0.0: - resolution: {integrity: sha512-tO8YQ1dP41fw8GVmeQAdNsD8roZi1JMqB7YwZrqU856DvmG5/710e41q2XauzTYrygH9XmMryaFeLo+kdCziyA==} - dependencies: - '@ts-morph/common': 0.13.0 - code-block-writer: 11.0.0 - dev: true - - /tslib/1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - dev: true - - /tslib/2.3.1: - resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} - dev: true - - /tsutils/3.21.0_typescript@4.6.4: - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 4.6.4 - dev: true - - /type-check/0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.2.1 - dev: true - - /type-fest/0.18.1: - resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} - engines: {node: '>=10'} - dev: true - - /type-fest/0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - dev: true - - /type-fest/0.6.0: - resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} - engines: {node: '>=8'} - dev: true - - /type-fest/0.8.1: - resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} - engines: {node: '>=8'} - dev: true - - /type-fest/2.12.2: - resolution: {integrity: sha512-qt6ylCGpLjZ7AaODxbpyBZSs9fCI9SkL3Z9q2oxMBQhs/uyY+VD8jHA8ULCGmWQJlBgqvO3EJeAngOHD8zQCrQ==} - engines: {node: '>=12.20'} - dev: false - - /typescript/4.6.4: - resolution: {integrity: sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: false - - /uglify-js/3.15.4: - resolution: {integrity: sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA==} - engines: {node: '>=0.8.0'} - hasBin: true - requiresBuild: true - dev: true - optional: true - - /update-check/1.5.4: - resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==} - dependencies: - registry-auth-token: 3.3.2 - registry-url: 3.1.0 - dev: false - - /uri-js/4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - dependencies: - punycode: 2.1.1 - dev: true - - /util-deprecate/1.0.2: - resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} - - /uuid/3.4.0: - resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} - deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. - hasBin: true - dev: true - - /v8-compile-cache/2.3.0: - resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} - dev: true - - /validate-npm-package-license/3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - dependencies: - spdx-correct: 3.1.1 - spdx-expression-parse: 3.0.1 - dev: true - - /wcwidth/1.0.1: - resolution: {integrity: sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=} - dependencies: - defaults: 1.0.3 - dev: false - - /web-streams-polyfill/3.2.1: - resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} - engines: {node: '>= 8'} - dev: false - - /which/2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - dependencies: - isexe: 2.0.0 - dev: true - - /widest-line/4.0.1: - resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==} - engines: {node: '>=12'} - dependencies: - string-width: 5.1.2 - dev: false - - /word-wrap/1.2.3: - resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} - engines: {node: '>=0.10.0'} - dev: true - - /wordwrap/1.0.0: - resolution: {integrity: sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=} - dev: true - - /wrap-ansi/7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - dev: true - - /wrap-ansi/8.0.1: - resolution: {integrity: sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==} - engines: {node: '>=12'} - dependencies: - ansi-styles: 6.1.0 - string-width: 5.1.2 - strip-ansi: 7.0.1 - dev: false - - /wrappy/1.0.2: - resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} - dev: true - - /xregexp/5.1.0: - resolution: {integrity: sha512-PynwUWtXnSZr8tpQlDPMZfPTyv78EYuA4oI959ukxcQ0a9O/lvndLVKy5wpImzzA26eMxpZmnAXJYiQA13AtWA==} - dependencies: - '@babel/runtime-corejs3': 7.17.9 - dev: true - - /xtend/4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - dev: true - - /y18n/5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - dev: true - - /yallist/4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - - /yargs-parser/20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - dev: true - - /yargs/16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 - dev: true - - /zod/3.14.4: - resolution: {integrity: sha512-U9BFLb2GO34Sfo9IUYp0w3wJLlmcyGoMd75qU9yf+DrdGA4kEx6e+l9KOkAlyUO0PSQzZCa3TR4qVlcmwqSDuw==} - dev: true diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 5b5e368..0000000 --- a/renovate.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "pinVersions": false, - "semanticCommits": true, - "semanticPrefix": "chore(dependency)", - "separateMajorMinor": false, - "prHourlyLimit": 100, - "labels": ["dependencies"], - "timezone": "Europe/Moscow", - "lockFileMaintenance": { - "enabled": true - }, - "baseBranches": ["main"], - "packageFiles": [ - "package.json", - "templates/node/**/package.json", - "templates/other/**/package.json", - "configs/docker/**", - ".github/workflows/**/*.yml" - ] -} \ No newline at end of file diff --git a/src/deps.deno.ts b/src/deps.deno.ts deleted file mode 100644 index ec90894..0000000 --- a/src/deps.deno.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { Input, Select } from 'https://deno.land/x/cliffy@v0.23.0/prompt/mod.ts'; -import { PromtOptions } from './types.ts'; -import * as path from 'https://deno.land/std@0.136.0/node/path/mod.ts'; -import chalk from 'https://deno.land/x/chalkin@v0.1.3/mod.ts'; -import { TerminalSpinner } from 'https://deno.land/x/spinners@v1.1.2/mod.ts'; -import * as fs from 'https://deno.land/std@0.136.0/node/fs.ts'; -import * as os from 'https://deno.land/std@0.136.0/node/os.ts'; -import * as process from 'https://deno.land/std@0.136.0/node/process.ts'; -import * as stream from 'https://deno.land/std@0.136.0/node/stream.ts'; -import * as util from 'https://deno.land/std@0.136.0/node/util.ts'; -import { Untar } from 'https://deno.land/std@0.136.0/archive/tar.ts'; -import { readerFromStreamReader } from 'https://deno.land/std@0.136.0/streams/conversion.ts'; -import { ensureFile } from 'https://deno.land/std@0.136.0/fs/ensure_file.ts'; -import { ensureDir } from 'https://deno.land/std@0.136.0/fs/ensure_dir.ts'; -import { copy } from 'https://deno.land/std@0.136.0/streams/conversion.ts'; - -export const exec = async (opts: { cmd: string, cwd?: string }) => { - const runner = Deno.run({ - stderr: 'null', - cmd: opts.cmd.split(' '), - cwd: opts.cwd, - stdout: 'null', - }); - - await runner.status(); - runner.close(); -}; - -export const spinner = (text: string) => { - const instance = new TerminalSpinner(text); - - return { - start: instance.start.bind(instance), - fail: instance.fail.bind(instance), - succeed: instance.succeed.bind(instance), - }; -}; - -export async function promt(opts: PromtOptions) { - if (opts.type === 'select' && opts.choices) { - const options = opts.choices.map(c => c.title); - const result = await Select.prompt({ - options, - message: opts.message, - keys: { - next: ['down'], - previous: ['up'], - }, - indent: '', - }); - - return opts.choices.find(c => c.title === result)?.value; - } else if (opts.type === 'text') { - const result = await Input.prompt({ - default: opts.initial, - message: opts.message, - validate: opts.validate, - indent: '', - }); - - return result; - } else throw new Error(`Unknown type ${opts.type}`); -} - -const Fetch = fetch; - -export const untar = async (root: string, body: ReadableStream, ) => { - const streamReader = body - .pipeThrough(new DecompressionStream('gzip')) - .getReader(); - - const denoReader = readerFromStreamReader(streamReader); - const instance = new Untar(denoReader); - - let directory: string = ''; - - for await (const entry of instance) { - if (!directory && entry.type === 'directory') { - directory = entry.fileName; - continue; - } - - const entryPath = path.resolve(root, entry.fileName.replace(directory, '')); - if (entry.type === 'directory') { - await ensureDir(entryPath); - continue; - } - - await ensureFile(entryPath); - - const file = await Deno.open(entryPath, { write: true }); - await copy(entry, file); - } -}; - -export { path, chalk, fs, os, process, stream, util, Fetch as fetch }; diff --git a/src/deps.node.ts b/src/deps.node.ts deleted file mode 100644 index 86a6b3f..0000000 --- a/src/deps.node.ts +++ /dev/null @@ -1,66 +0,0 @@ -import prompts from 'prompts'; - -import chalk from 'chalk'; -import { exec as Exec } from 'child_process'; -import path from 'node:path'; -import ora from 'ora'; -import os from 'node:os'; -import fs from 'node:fs'; -import stream from 'node:stream'; -import util from 'util'; -import Fetch from 'node-fetch'; -import tar from 'tar'; -import { PromtOptions } from './types'; - -export const exec = async (opts: { cmd: string, cwd?: string }) => { - const promise = util.promisify(Exec); - - await promise(opts.cmd, { - cwd: opts.cwd, - }); -}; - -export const spinner = (text: string) => { - const instance = ora({ text }); - - return { - start: instance.start.bind(instance), - fail: instance.fail.bind(instance), - succeed: instance.succeed.bind(instance), - }; -}; - -export async function promt(opts: PromtOptions) { - const name = Math.floor(Math.random() * (10 - 1 + 1) + 1).toString(); - - const res = await prompts( - { - initial: opts.initial, - choices: opts.choices, - message: opts.message, - name, - type: opts.type, - validate: opts.validate, - }, - { - onCancel: opts.onCancel || function () { - process.exit(0); - }, - } - ); - - return res[name]; -} - -export const untar = async (root: string, body: NodeJS.ReadableStream) => { - const stream = tar.extract({ cwd: root, strip: 1 }); - - for await (const chunk of body) { - stream.write(chunk); - } -}; - -const proc = process; -export const fetch = Fetch; - -export { path, os, chalk, fs, proc as process, stream, util }; \ No newline at end of file diff --git a/src/helper/dir.ts b/src/helper/dir.ts deleted file mode 100644 index 3ac8aff..0000000 --- a/src/helper/dir.ts +++ /dev/null @@ -1,72 +0,0 @@ -import * as deps from '../deps.deno.ts'; - -/** - * Make project directory - * - * @param root project path - * @param options options - * @returns - */ -export function MakeDir( - root: string, - options = { recursive: true } -): Promise { - return deps.fs.promises.mkdir(root, options); -} - -/** - * Verify that the project directory is empty and conflict-free - * - * @param root project path - * @param name project name - * @returns - */ -export function IsFolderEmpty(root: string, name: string): boolean { - const validFiles = [ - '.DS_Store', - '.git', - '.gitattributes', - '.gitignore', - '.gitlab-ci.yml', - '.idea', - '.npmignore', - 'LICENSE', - 'npm-debug.log', - 'yarn-debug.log', - 'yarn-error.log', - ]; - - const conflicts = deps.fs - .readdirSync(root) - .filter((file) => !validFiles.includes(file)) - .filter((file) => !/\.iml$/.test(file)); - - if (conflicts.length > 0) { - console.log( - `The directory ${deps.chalk.green(name)} contains files that could conflict:` - ); - console.log(); - - for (const file of conflicts) { - try { - const stats = deps.fs.lstatSync(deps.path.join(root, file)); - if (stats.isDirectory()) { - console.log(` ${deps.chalk.blue(file)}/`); - } else { - console.log(` ${file}`); - } - } catch { - console.log(` ${file}`); - } - } - - console.log(); - console.log( - 'Either try using a new directory name, or remove the files listed above.' - ); - console.log(); - return false; - } - - return true; -} \ No newline at end of file diff --git a/src/helper/docker.ts b/src/helper/docker.ts deleted file mode 100644 index df4bcb7..0000000 --- a/src/helper/docker.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as deps from '../deps.deno.ts'; -import { Platform } from './platform.ts'; -import { repoName } from './reponame.ts'; - -export async function DownloadAndExtractDockerFiles( - root: string, - platform: Platform -): Promise { - const filesRequest = await deps.fetch(`https://api.github.com/repos/${repoName}/contents/configs/docker/${platform}`); - const filesArray = await filesRequest.json() as Array<{ name: string, download_url: string, type: 'file' | 'dir' }>; - - for (const file of filesArray.filter(file => file.type === 'file')) { - const pipeline = deps.util.promisify(deps.stream.pipeline); - - const pipe = await deps.fetch(file.download_url); - const readableWebStream = pipe.body as any; - - await pipeline( - deps.stream.Readable.from(readableWebStream), - deps.fs.createWriteStream(deps.path.resolve(root, file.name), {}) - ); - } -} \ No newline at end of file diff --git a/src/helper/git.ts b/src/helper/git.ts deleted file mode 100644 index 8a368c0..0000000 --- a/src/helper/git.ts +++ /dev/null @@ -1,52 +0,0 @@ -import * as deps from '../deps.deno.ts'; - -async function IsInGitRepository(root: string) { - try { - await deps.exec({ - cmd: 'git rev-parse --is-inside-work-tree', - cwd: root, - }); - return true; - // eslint-disable-next-line no-empty - } catch (_) {} - return false; -} - -async function IsInMercurialRepository(root: string) { - try { - deps.exec({ cwd: root, cmd: 'hg --cwd . root' }); - return true; - // eslint-disable-next-line no-empty - } catch (_) {} - return false; -} - -export async function TryGitInit(root: string) { - let didInit = false; - try { - await deps.exec({ cwd: root, cmd: 'git --version' }); - - if (await IsInGitRepository(root) || await IsInMercurialRepository(root)) { - return false; - } - - await deps.exec({ cwd: root, cmd: 'git init' }); - didInit = true; - - await deps.exec({ cwd: root, cmd: 'git checkout -b main' }); - await deps.exec({ cwd: root, cmd: 'git add -A' }); - - return true; - } catch (e) { - - if (didInit) { - try { - deps.fs.rmSync(deps.path.join(root, '.git')); - } catch (_) { - // empty statement - } - } - - return false; - } -} \ No newline at end of file diff --git a/src/helper/package-manager.ts b/src/helper/package-manager.ts deleted file mode 100644 index de55171..0000000 --- a/src/helper/package-manager.ts +++ /dev/null @@ -1,111 +0,0 @@ -import * as deps from '../deps.deno.ts'; -import { Platform } from './platform.ts'; - -export enum PackageManager { - npm = 'npm', - yarn = 'yarn', - pnpm = 'pnpm', - none = 'none', -} - -export async function GetPackageManager(): Promise { - const selected = await deps.promt( - { - choices: [ - { - title: 'npm', - value: PackageManager.npm.toString(), - }, - { - title: 'yarn', - value: PackageManager.yarn.toString(), - }, - { - title: 'pnpm', - value: PackageManager.pnpm.toString(), - }, - { - title: 'none', - value: PackageManager.none.toString(), - }, - ], - message: 'Pick package manager', - type: 'select', - } - ); - - const manager = selected as PackageManager; - - try { - switch (manager) { - case PackageManager.none: - break; - - case PackageManager.npm: - deps.exec({ cmd: 'npm --version' }); - break; - - case PackageManager.yarn: - deps.exec({ cmd: 'yarn --version' }); - break; - - case PackageManager.pnpm: - deps.exec({ cmd: 'pnpm --version' }); - break; - } - } catch (err) { - console.log( - deps.chalk.red('×'), - `Could not found ${deps.chalk.greenBright( - PackageManager[manager] - )} package manager, Please install it from:`, - PackageManager.pnpm === manager - ? 'https://pnpm.io' - : PackageManager.yarn === manager - ? 'https://yarnpkg.com' - : 'https://nodejs.org/en/download' - ); - } - - return manager; -} - -export async function InstallPackage( - root: string, - platform: Platform | null | undefined, - manager: PackageManager | null | undefined -): Promise { - if (PackageManager.none === manager && platform === 'node') { - console.log( - deps.chalk.blueBright('?'), - deps.chalk.bold('skipped package installation...') - ); - return; - } - - const spinner = deps.spinner(deps.chalk.bold('Installing packages...')).start(); - - try { - if (platform === 'deno') { - deps.exec({ cmd: 'deno cache src/mod.ts', cwd: root }); - } else { - switch (manager) { - case PackageManager.npm: - deps.exec({ cwd: root, cmd: 'npm install' }); - break; - case PackageManager.yarn: - deps.exec({ cwd: root, cmd: 'yarn install' }); - break; - - case PackageManager.pnpm: - deps.exec({ cmd: 'pnpm install', cwd: root }); - break; - } - } - - spinner.succeed(deps.chalk.bold(`Installed packages via`, deps.chalk.gray('»'), deps.chalk.greenBright(platform === 'deno' ? 'deno cache' : manager))); - } catch (err) { - console.error(err); - spinner.fail(deps.chalk.bold('Failed to install packages. That\'s more likely something wrong with template. If you are sure it\'s a grammY cli problem - please let us know via github issue or contact us in chat.')); - } -} \ No newline at end of file diff --git a/src/helper/platform.ts b/src/helper/platform.ts deleted file mode 100644 index 4d5af46..0000000 --- a/src/helper/platform.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { promt } from '../deps.deno.ts'; - -export type Platform = 'deno' | 'node' | 'other' - -export async function GetPlatform(): Promise { - const selected = await promt( - { - choices: [ - { - title: 'Deno', - value: 'deno', - }, - { - title: 'Node', - value: 'node', - }, - { - title: 'Other', - value: 'other', - }, - ], - message: 'Pick platform', - type: 'select', - } - ); - - return selected; -} diff --git a/src/helper/reponame.ts b/src/helper/reponame.ts deleted file mode 100644 index fd987d9..0000000 --- a/src/helper/reponame.ts +++ /dev/null @@ -1 +0,0 @@ -export const repoName = 'grammyjs/create-grammy'; diff --git a/src/helper/template.ts b/src/helper/template.ts deleted file mode 100644 index 139a26c..0000000 --- a/src/helper/template.ts +++ /dev/null @@ -1,38 +0,0 @@ -import * as deps from '../deps.deno.ts'; -import { Platform } from './platform.ts'; -import { repoName } from './reponame.ts'; - -/** - * Get templates list - * - * @returns - */ -export async function GetTemplates(platform: Platform) { - const r = await deps.fetch(`https://api.github.com/repos/${repoName}/contents/templates/${platform}`); - const response = await r.json() as Array<{ name: string, git_url: string, type: string }>; - - return response - .filter(row => !row.name.startsWith('.')) - .map((row) => ({ title: row.name, value: row.git_url })); -} - -export async function DownloadAndExtractTemplate( - root: string, - treeUrl: string -): Promise { - // "https://api.github.com/repos/grammyjs/create-grammy/git/trees/eb63b5810b3c5afb6ef32aaa039d4e89bd26829f", - // "https://api.github.com/repos/bot-base/telegram-bot-template/git/trees/f214deaac92c4c75ad3ae092495563d2f0333e84", - treeUrl = treeUrl.replace('https://api.github.com/repos/', ''); - // bot-base/telegram-bot-template/git/trees/f214deaac92c4c75ad3ae092495563d2f0333e84 - const splitedTree = treeUrl.split('/'); - const repoPath = splitedTree.slice(0, 2); - const tree = splitedTree.pop(); - - const pipe = await deps.fetch(`https://codeload.github.com/${repoPath.join('/')}/tar.gz/${tree}`); - - if (!pipe.body) { - throw new Error('Something bad happend. Please, create bug report at https://github.com/grammyjs/create-grammy'); - } - - await deps.untar(root, pipe.body); -} diff --git a/src/helper/tsconfig.ts b/src/helper/tsconfig.ts deleted file mode 100644 index 8f0d7d5..0000000 --- a/src/helper/tsconfig.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as deps from '../deps.deno.ts'; -import { repoName } from './reponame.ts'; - -export async function DownloadAndExtractTSConfig( - root: string, -): Promise { - const pipeline = deps.util.promisify(deps.stream.pipeline); - const pipe = await deps.fetch(`https://raw.githubusercontent.com/${repoName}/main/configs/tsconfig.json`); - const readableWebStream = pipe.body as any; - - await pipeline( - deps.stream.Readable.from(readableWebStream), - deps.fs.createWriteStream(deps.path.resolve(root, 'tsconfig.json'), {}) - ); -} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 0b898a0..0000000 --- a/src/index.ts +++ /dev/null @@ -1,194 +0,0 @@ -#!/usr/bin/env node - -import * as deps from './deps.deno.ts'; - -import { IsFolderEmpty, MakeDir } from './helper/dir.ts'; -import { TryGitInit } from './helper/git.ts'; -import { - GetPackageManager, - InstallPackage, - PackageManager, -} from './helper/package-manager.ts'; -import { GetPlatform } from './helper/platform.ts'; -import { DownloadAndExtractTemplate, GetTemplates } from './helper/template.ts'; - -if (!('Deno' in globalThis)) { - await import('./node/updater.js' as any); -} - -import { DownloadAndExtractTSConfig } from './helper/tsconfig.ts'; -import { DownloadAndExtractDockerFiles } from './helper/docker.ts'; -import { repoName } from './helper/reponame.ts'; - -/** - * Get project path and name - */ - -let projectPath = './'; - -const res = await deps.promt( - { - initial: 'my-app', - message: 'What is your project named?', - type: 'text', - } -); - -if (typeof res === 'string') { - projectPath = res.trim(); -} - -const resolvedProjectPath = deps.path.resolve(projectPath); -const projectName = deps.path.basename(resolvedProjectPath); - -/** - * Select platform - */ - -const platform = await GetPlatform(); - - -/** - * Select template prompt - */ - -const templateList = await GetTemplates(platform); - -if (!templateList.length) { - console.log(deps.chalk.red('> Unable to load templates :(')); - deps.process.exit(); -} - -const template = await deps.promt( - { - choices: templateList, - message: 'Pick template', - type: 'select', - } -); - -const isCustomTemplate = !template.toLowerCase().includes(repoName); - -if (!template || typeof template !== 'string') { - console.log(deps.chalk.red('> Please select a template :(')); - deps.process.exit(); -} - -/** - * Make project directory - */ - -try { - await MakeDir(resolvedProjectPath); -} catch (err) { - console.log(deps.chalk.red('> Failed to create specified directory :(')); - deps.process.exit(); -} - -/** - * Make sure directory is clean - */ - -if (!IsFolderEmpty(resolvedProjectPath, projectName)) { - deps.process.exit(); -} - -/** - * Download and extract template - */ - -const spinner = deps.spinner(deps.chalk.bold('Downloading template...')).start(); - -try { - await DownloadAndExtractTemplate(resolvedProjectPath, template); - spinner.succeed(deps.chalk.bold('Downloaded template')); -} catch (err) { - console.error(err); - spinner.fail(deps.chalk.bold('Failed to download selected template :(')); - deps.process.exit(); -} - -if (platform === 'node') { - try { - await deps.fs.promises.access(deps.path.resolve(resolvedProjectPath, 'tsconfig.json')); - } catch (error) { - await DownloadAndExtractTSConfig(resolvedProjectPath); - } -} - -/** - * Update project name - */ - -if (platform === 'node') { - try { - await deps.exec( - { - cmd: `npx -y json -I -f package.json -e "this.name=\\"${projectName}\\""`, - cwd: resolvedProjectPath, - } - ); - } catch (err) { - console.log(deps.chalk.red('> Failed to update project name :(')); - } -} - - -/** - * Init git - */ - -const gitInit = await TryGitInit(resolvedProjectPath); -if (gitInit && platform === 'node' && !isCustomTemplate) { - await deps.fs.promises.writeFile( - deps.path.resolve(resolvedProjectPath, '.gitignore'), - `dist${deps.os.EOL}node_modules${deps.os.EOL}` - ); -} - -/** - * Install packages - */ - -if (!isCustomTemplate && platform !== 'other') { - let packageManager: PackageManager | null = null; - - if (platform === 'node') { - packageManager = await GetPackageManager(); - } - - await InstallPackage(resolvedProjectPath, platform, packageManager); -} - -if (!deps.fs.existsSync(deps.path.resolve(resolvedProjectPath, 'Dockerfile')) && platform !== 'other') { - const addDocker = await deps.promt( - { - choices: [{ title: 'Yes', value: true }, { title: 'No', value: false }], - message: 'Add docker related files', - type: 'select', - } - ); - - if (addDocker) { - await DownloadAndExtractDockerFiles(resolvedProjectPath, platform); - } -} - -console.log( - deps.chalk.greenBright('√'), - deps.chalk.bold('Created grammY project'), - deps.chalk.gray('»'), - deps.chalk.greenBright(projectName) -); - -console.log(); -console.log(deps.chalk.blueBright('?'), deps.chalk.bold('Support')); -console.log(' Telegram channel: https://t.me/grammyjs'); -console.log(' Documentation: https://grammy.dev'); -console.log(' GitHub: https://github.com/grammyjs'); -console.log(); -console.log( - deps.chalk.greenBright('√'), - deps.chalk.bold('Thank you for using grammY'), - deps.chalk.red('❤️') -); \ No newline at end of file diff --git a/src/node/updater.ts b/src/node/updater.ts deleted file mode 100644 index 82feb9e..0000000 --- a/src/node/updater.ts +++ /dev/null @@ -1,56 +0,0 @@ -import boxen from 'boxen'; -import chalk from 'chalk'; -import isInstalledGlobally from 'is-installed-globally'; -import checkForUpdate from 'update-check'; -import fs from 'node:fs/promises'; - -const packageJson = JSON.parse( - await fs.readFile(new URL('../../package.json', import.meta.url), 'utf-8') -); - -/** - * Check for update - */ - -let update = null; - -try { - update = await checkForUpdate(packageJson); -} catch (err) { - console.log( - boxen('Failed to check for updates', { - align: 'center', - borderColor: 'red', - borderStyle: 'round', - margin: 1, - padding: 1, - }) - ); -} - -if (update) { - const updateCmd = isInstalledGlobally - ? 'npm i -g @grammyjs/create-grammy@latest' - : 'npm i @grammyjs/create-grammy@latest'; - - const template = - 'Update available ' + - chalk.dim(`${packageJson.version}`) + - chalk.reset(' → ') + - chalk.green(`${update.latest}`) + - ' \nRun ' + - chalk.cyan(updateCmd) + - ' to update'; - - console.log( - boxen(template, { - align: 'center', - borderColor: 'yellow', - borderStyle: 'round', - margin: 1, - padding: 1, - }) - ); -} - -export default packageJson.version; \ No newline at end of file diff --git a/src/types.ts b/src/types.ts deleted file mode 100644 index 8a51a61..0000000 --- a/src/types.ts +++ /dev/null @@ -1,8 +0,0 @@ -export type PromtOptions = { - initial?: string, - choices?: Array<{ title: string, value: any }> - message: string, - validate?: (params: any) => boolean, - onCancel?: () => void, - type: 'text' | 'select' -} \ No newline at end of file diff --git a/templates/deno/.gitkeep b/templates/deno/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/templates/deno/base-runner/README.md b/templates/deno/base-runner/README.md deleted file mode 100644 index 8512369..0000000 --- a/templates/deno/base-runner/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Introduction - -This is base deno example of grammY runner. \ No newline at end of file diff --git a/templates/deno/base-runner/src/mod.ts b/templates/deno/base-runner/src/mod.ts deleted file mode 100644 index 2d4099f..0000000 --- a/templates/deno/base-runner/src/mod.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Bot, Context, session, SessionFlavor } from "https://deno.land/x/grammy/mod.ts"; -import { run, sequentialize } from "https://deno.land/x/grammy_runner/mod.ts"; - -interface SessionData { - pizzaCount: number; -} - -// Flavor the context type to include sessions. -type MyContext = Context & SessionFlavor; - - -// Create a bot. -const bot = new Bot(""); - -// Build a unique identifier for the `Context` object. -function getSessionKey(ctx: Context) { - return ctx.chat?.id.toString(); -} - -function initial(): SessionData { - return { pizzaCount: 0 }; -} - -// Sequentialize before accessing session data! -bot.use(sequentialize(getSessionKey)); -bot.use(session({ getSessionKey, initial })); - -// Add the usual middleware, now with safe session support. -bot.on("message", (ctx) => ctx.reply("Got your message.")); - -// Still run it concurrently! -run(bot); \ No newline at end of file diff --git a/templates/node/.gitkeep b/templates/node/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/templates/node/base-runner/README.md b/templates/node/base-runner/README.md deleted file mode 100644 index 5519ae3..0000000 --- a/templates/node/base-runner/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Introduction - -This is base node example of grammY runner. \ No newline at end of file diff --git a/templates/node/base-runner/package.json b/templates/node/base-runner/package.json deleted file mode 100644 index 596d02c..0000000 --- a/templates/node/base-runner/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "scripts": { - "start": "node dist/index.js", - "build": "tsc" - }, - "dependencies": { - "@grammyjs/runner": "^1.0.3", - "grammy": "^1.8.0" - }, - "devDependencies": { - "@types/node": "^17.0.25", - "typescript": "^4.6.3" - } -} \ No newline at end of file diff --git a/templates/node/base-runner/src/index.ts b/templates/node/base-runner/src/index.ts deleted file mode 100644 index 3715e2b..0000000 --- a/templates/node/base-runner/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Bot, Context, session, SessionFlavor } from "grammy"; -import { run, sequentialize } from "@grammyjs/runner"; - -interface SessionData { - pizzaCount: number; -} - -// Flavor the context type to include sessions. -type MyContext = Context & SessionFlavor; - - -// Create a bot. -const bot = new Bot(""); - -// Build a unique identifier for the `Context` object. -function getSessionKey(ctx: Context) { - return ctx.chat?.id.toString(); -} - -function initial(): SessionData { - return { pizzaCount: 0 }; -} - -// Sequentialize before accessing session data! -bot.use(sequentialize(getSessionKey)); -bot.use(session({ getSessionKey, initial })); - -// Add the usual middleware, now with safe session support. -bot.on("message", (ctx) => ctx.reply("Got your message.")); - -// Still run it concurrently! -run(bot); \ No newline at end of file diff --git a/templates/node/bot-base-template b/templates/node/bot-base-template deleted file mode 160000 index 429e8ac..0000000 --- a/templates/node/bot-base-template +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 429e8aced6754862cce30859b57f088bc42d7546 diff --git a/templates/other/.gitkeep b/templates/other/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/templates/other/vercel-base-bot/.example.env b/templates/other/vercel-base-bot/.example.env deleted file mode 100644 index 9d6f142..0000000 --- a/templates/other/vercel-base-bot/.example.env +++ /dev/null @@ -1,4 +0,0 @@ -# You should configure these in the environment variable configuration of the vercel project. - -BOT_TOKEN=fill in your telegram bot token -WEBHOOK=fill in your vercel domain \ No newline at end of file diff --git a/templates/other/vercel-base-bot/README.md b/templates/other/vercel-base-bot/README.md deleted file mode 100644 index d5fcd48..0000000 --- a/templates/other/vercel-base-bot/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## vercel_grammy_bot - -You can deploy your bot to Vercel as a serverless function. Here is a bot running there: - -https://t.me/vercel_grammy_bot - -Please run the `index.js` file in Vercel's package command to set your webhook address. diff --git a/templates/other/vercel-base-bot/api/index.ts b/templates/other/vercel-base-bot/api/index.ts deleted file mode 100644 index dcd7e85..0000000 --- a/templates/other/vercel-base-bot/api/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Bot, webhookCallback } from 'grammy' - - -const bot = new Bot(process.env['BOT_TOKEN']) - -// attach all middleware -bot.on("message", async (ctx) => { - await ctx.reply("Hi there!") -}) - -// The free version of vercel has restrictions on quotas, which we need to enable in the configuration file vercel.json -// webhookCallback will make sure that the correct middleware(listener) function is called -export default webhookCallback(bot, 'express') \ No newline at end of file diff --git a/templates/other/vercel-base-bot/index.ts b/templates/other/vercel-base-bot/index.ts deleted file mode 100644 index 6c415fa..0000000 --- a/templates/other/vercel-base-bot/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Bot } from 'grammy' - -const bot = new Bot(process.env['BOT_TOKEN']) // <-- Set your token in the vercel environment variable - -bot.api.setWebhook(process.env['WEBHOOK']) \ No newline at end of file diff --git a/templates/other/vercel-base-bot/vercel.json b/templates/other/vercel-base-bot/vercel.json deleted file mode 100644 index cf172eb..0000000 --- a/templates/other/vercel-base-bot/vercel.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "functions": { - "api/index.js": { - "memory": 1024, - "maxDuration": 10 - } - } -} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index fc18c8b..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "outDir": "build", - "module": "ESNext", - "target": "ESNext", - "noImplicitAny": true, - "strict": true, - "strictNullChecks": true, - "noUncheckedIndexedAccess": true, - "resolveJsonModule": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "Node", - "esModuleInterop": true - }, - "exclude": ["build", "templates", "my-app"], - "include": ["src"] -} \ No newline at end of file From 965ed6053dfee7395048e764afd54acccca9eb58 Mon Sep 17 00:00:00 2001 From: dcdunkan <70066170+dcdunkan@users.noreply.github.com> Date: Sun, 2 Oct 2022 23:47:06 +0530 Subject: [PATCH 2/8] Re-write to Go --- LICENSE | 21 ++ cmd/root.go | 275 +++++++++++++++++++ configs/tsconfig.json | 17 ++ go.mod | 32 +++ go.sum | 90 ++++++ internal/files/dependencies.go | 19 ++ internal/files/dockerfiles.go | 55 ++++ internal/files/exists.go | 14 + internal/files/package_name.go | 43 +++ internal/files/untar.go | 52 ++++ internal/templates/templates.go | 78 ++++++ internal/utils/fetch_json.go | 18 ++ internal/utils/git.go | 26 ++ internal/utils/is_installed.go | 11 + main.go | 7 + templates.json | 45 +++ templates/README | 1 + templates/deno/base-runner/src/mod.ts | 32 +++ templates/node/base-runner/package.json | 14 + templates/node/base-runner/src/index.ts | 32 +++ templates/other/vercel-base-bot/.example.env | 4 + templates/other/vercel-base-bot/api/index.ts | 13 + templates/other/vercel-base-bot/index.ts | 5 + templates/other/vercel-base-bot/vercel.json | 8 + 24 files changed, 912 insertions(+) create mode 100644 LICENSE create mode 100644 cmd/root.go create mode 100644 configs/tsconfig.json create mode 100644 go.mod create mode 100644 go.sum create mode 100644 internal/files/dependencies.go create mode 100644 internal/files/dockerfiles.go create mode 100644 internal/files/exists.go create mode 100644 internal/files/package_name.go create mode 100644 internal/files/untar.go create mode 100644 internal/templates/templates.go create mode 100644 internal/utils/fetch_json.go create mode 100644 internal/utils/git.go create mode 100644 internal/utils/is_installed.go create mode 100644 main.go create mode 100644 templates.json create mode 100644 templates/README create mode 100644 templates/deno/base-runner/src/mod.ts create mode 100644 templates/node/base-runner/package.json create mode 100644 templates/node/base-runner/src/index.ts create mode 100644 templates/other/vercel-base-bot/.example.env create mode 100644 templates/other/vercel-base-bot/api/index.ts create mode 100644 templates/other/vercel-base-bot/index.ts create mode 100644 templates/other/vercel-base-bot/vercel.json diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..47576e6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Dunkan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/cmd/root.go b/cmd/root.go new file mode 100644 index 0000000..d933b08 --- /dev/null +++ b/cmd/root.go @@ -0,0 +1,275 @@ +package cmd + +import ( + "errors" + "fmt" + "os" + "strings" + + "github.com/grammyjs/gmy/internal/files" + t "github.com/grammyjs/gmy/internal/templates" + "github.com/grammyjs/gmy/internal/utils" + + "github.com/cavaliergopher/grab/v3" + "github.com/erikgeiser/promptkit/confirmation" + "github.com/erikgeiser/promptkit/selection" + "github.com/erikgeiser/promptkit/textinput" + "github.com/spf13/cobra" +) + +const footer = ` + + Project '%s' created successfully! + + Thank you for using grammY <3 + . Documentation https://grammy.dev + . GitHub https://github.com/grammyjs/grammY + . Community https://telegram.me/grammyjs +` + +// rootCmd represents the base command when called without any subcommands +var rootCmd = &cobra.Command{ + Use: "gmy [project name]", + Short: "Create grammY projects from the command line!", + Long: `grammY is a framework for creating Telegram bots. It can be used from +TypeScript and JavaScript and runs on Node.js, Deno, and in the browser. +This application is a tool to generate the needed files to quickly +create a Telegram bot from several templates powered by grammY. + +Feel free to add more templates to our template registry: +https://github.com/grammyjs/gmy#templates + +https://grammy.dev`, + Args: cobra.ArbitraryArgs, + Run: func(cmd *cobra.Command, args []string) { + var projectName string + + if len(args) > 0 { + err := ValidateProjectName(args[0]) + if err == nil { + projectName = args[0] + } + } + + if projectName == "" { + prompt := textinput.New(" > Enter a name for your project:") + prompt.Placeholder = "Project name cannot be empty" + prompt.Validate = ValidateProjectName + input, err := prompt.RunPrompt() + if err != nil { + os.Exit(1) + } + projectName = input + } + + platformPrompt := selection.New( + " > Choose a platform:", + selection.Choices([]string{"Deno", "Node", "Other"}), + ) + platformPrompt.FilterPrompt = " Platforms" + platformPrompt.FilterPlaceholder = "Find" + platformPrompt.PageSize = 5 + choice, err := platformPrompt.RunPrompt() + if err != nil { + os.Exit(1) + } + + platform := choice.String + fmt.Printf(" : Getting templates for %s...\n", platform) + templates, err := t.GetTemplates(platform) + if err != nil { + fmt.Println(" ! Failed to fetch templates :(") + os.Exit(1) + } + + var templateChoices []string + for i := 0; i < len(templates); i++ { + templateChoices = append(templateChoices, templates[i].Name) + } + + templatePrompt := selection.New(" > Choose a template:", selection.Choices(templateChoices)) + templatePrompt.FilterPrompt = " Templates for " + platform + templatePrompt.FilterPlaceholder = "Find" + templatePrompt.PageSize = 5 + choice, err = templatePrompt.RunPrompt() + if err != nil { + os.Exit(1) + } + + var selectedTemplate t.Template + for _, template := range templates { + if template.Name == choice.String { + selectedTemplate = template + break + } + } + + fmt.Printf( + " : Downloading template assets from %s/%s...\n", + selectedTemplate.Owner, selectedTemplate.Repository, + ) + + tempDir, err := os.MkdirTemp("", "gmy-template-") + defer os.RemoveAll(tempDir) + if err != nil { + fmt.Println(" ! Failed to create temporary folder :(") + os.Exit(1) + } + + downloadUrl, err := t.GetDownloadUrl(selectedTemplate) + if err != nil { + fmt.Println(" ! Failed to fetch template details :(") + os.Exit(1) + } + + resp, err := grab.Get(tempDir, downloadUrl) + if err != nil { + fmt.Printf(" ! Failed to download assets from %s\n", downloadUrl) + os.Exit(1) + } + err = resp.Err() + if err != nil { + fmt.Printf(" ! Failed to download assets from %s\n", downloadUrl) + os.Exit(1) + } + + fmt.Println(" + Assets downloaded") + fmt.Println(" : Setting up project folder...") + + file, err := os.Open(resp.Filename) + if err != nil { + fmt.Println(" ! Failed to extract downloaded assets: ", err) + os.Exit(1) + } + + err = files.Untar(projectName, file) + if err != nil { + fmt.Println(" ! Failed to extract downloaded assets: ", err) + os.Exit(1) + } + + fmt.Printf(` + + Project folder set up successfully! + Additional configuration options for you: + +`) + + gitPrompt := confirmation.New(" ? Initialize Git repository", confirmation.Yes) + initGit, _ := gitPrompt.RunPrompt() + if initGit { + err := utils.InitGit(projectName) + if err != nil { + fmt.Println(" - Failed to initialize Git repository.") + } else { + fmt.Println(" + Git repository initialized.") + } + } + + if selectedTemplate.TSConfig_prompt { + tscPrompt := confirmation.New(" ? Would you like to add TypeScript configuration file", confirmation.No) + tsc, err := tscPrompt.RunPrompt() + if err != nil && tsc { + _, err := grab.Get(projectName, "https://raw.githubusercontent.com/grammyjs/cli/main/configs/tsconfig.json") + if err != nil { + fmt.Println(" - Skipping... Failed to add a tsconfig.json.") + } + } + } + + if selectedTemplate.Docker_prompt { + dockerPrompt := confirmation.New(" ? Add Docker related files", confirmation.No) + docker, err := dockerPrompt.RunPrompt() + if err == nil && docker { + err := files.AddDockerFiles(platform, projectName) + if err != nil { + fmt.Println(" - Failed to add Docker files.") + } + } + } + + var action string + + switch platform { + case "Deno": + action = "Cache" + case "Node": + action = "Install" + case "Other": + fmt.Printf(footer, projectName) + return + } + + pkgInstallPrompt := confirmation.New(fmt.Sprintf(" ? %s dependencies", action), confirmation.Yes) + installPkgs, err := pkgInstallPrompt.RunPrompt() + + if err != nil { + os.Exit(1) + } + + if installPkgs { + if platform == "Deno" { + fmt.Println(" : Caching dependencies...") + err := files.CacheDenoDeps(projectName, selectedTemplate.Cache_file) + if err != nil { + fmt.Println(" ! Failed to cache dependencies.") + } else { + fmt.Println(" + Cached dependencies successfully.") + } + } + + if platform == "Node" { + prompt := selection.New( + " > Choose a package manager of your choice:", + selection.Choices([]string{"npm", "yarn", "pnpm", "None"}), + ) + prompt.FilterPrompt = " Package Managers" + prompt.FilterPlaceholder = "Find" + prompt.PageSize = 5 + choice, err := prompt.RunPrompt() + if err == nil && choice.String != "None" { + packageManager := choice.String + fmt.Println(" : Checking for package manager...") + err := utils.IsInstalled(packageManager) + + if err != nil { + fmt.Println(" ! Seems like the specified package manager is not installed.") + } else { + fmt.Println(" : Installing dependencies...") + err := files.InstallNodeDeps(packageManager, projectName) + if err != nil { + fmt.Println(" ! Failed to install dependencies.") + } else { + fmt.Println(" + Installed dependencies successfully.") + } + } + } + fmt.Printf(" : Updating package name...\n") + files.UpdatePackageName(projectName) + } + } + fmt.Printf(footer, projectName) + }, +} + +func ValidateProjectName(name string) error { + if strings.TrimSpace(name) == "" { + return errors.New("empty name") + } + if files.Exists(name) { + folder, err := os.ReadDir(name) + if err != nil { + return err + } + if len(folder) == 0 { + return nil + } + return errors.New("directory already exists") + } + return nil +} + +func Execute() { + err := rootCmd.Execute() + if err != nil { + os.Exit(1) + } +} diff --git a/configs/tsconfig.json b/configs/tsconfig.json new file mode 100644 index 0000000..7997170 --- /dev/null +++ b/configs/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "moduleResolution": "node", + "target": "ES2019", + "lib": ["ES2019"], + "declaration": false, + "strict": false, + "esModuleInterop": true, + "inlineSourceMap": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "skipLibCheck": true, + "outDir": "./dist" + }, + "include": ["src"], + "exclude": ["node_modules"] +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e8024cc --- /dev/null +++ b/go.mod @@ -0,0 +1,32 @@ +module github.com/grammyjs/gmy + +go 1.19 + +require ( + github.com/cavaliergopher/grab/v3 v3.0.1 + github.com/erikgeiser/promptkit v0.7.0 + github.com/spf13/cobra v1.5.0 +) + +require ( + github.com/atotto/clipboard v0.1.4 // indirect + github.com/aymanbagabas/go-osc52 v1.0.3 // indirect + github.com/charmbracelet/bubbles v0.14.0 // indirect + github.com/charmbracelet/bubbletea v0.22.1 // indirect + github.com/charmbracelet/lipgloss v0.6.0 // indirect + github.com/containerd/console v1.0.3 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-localereader v0.0.1 // indirect + github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70 // indirect + github.com/muesli/cancelreader v0.2.2 // indirect + github.com/muesli/reflow v0.3.0 // indirect + github.com/muesli/termenv v0.13.0 // indirect + github.com/rivo/uniseg v0.4.2 // indirect + github.com/spf13/pflag v1.0.5 // indirect + golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect + golang.org/x/term v0.0.0-20220919170432-7a66f970e087 // indirect + golang.org/x/text v0.3.7 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..35f8d99 --- /dev/null +++ b/go.sum @@ -0,0 +1,90 @@ +github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= +github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= +github.com/aymanbagabas/go-osc52 v1.0.3 h1:DTwqENW7X9arYimJrPeGZcV0ln14sGMt3pHZspWD+Mg= +github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= +github.com/cavaliergopher/grab/v3 v3.0.1 h1:4z7TkBfmPjmLAAmkkAZNX/6QJ1nNFdv3SdIHXju0Fr4= +github.com/cavaliergopher/grab/v3 v3.0.1/go.mod h1:1U/KNnD+Ft6JJiYoYBAimKH2XrYptb8Kl3DFGmsjpq4= +github.com/charmbracelet/bubbles v0.11.0 h1:fBLyY0PvJnd56Vlu5L84JJH6f4axhgIJ9P3NET78f0Q= +github.com/charmbracelet/bubbles v0.11.0/go.mod h1:bbeTiXwPww4M031aGi8UK2HT9RDWoiNibae+1yCMtcc= +github.com/charmbracelet/bubbles v0.14.0 h1:DJfCwnARfWjZLvMglhSQzo76UZ2gucuHPy9jLWX45Og= +github.com/charmbracelet/bubbles v0.14.0/go.mod h1:bbeTiXwPww4M031aGi8UK2HT9RDWoiNibae+1yCMtcc= +github.com/charmbracelet/bubbletea v0.21.0 h1:f3y+kanzgev5PA916qxmDybSHU3N804uOnKnhRPXTcI= +github.com/charmbracelet/bubbletea v0.21.0/go.mod h1:GgmJMec61d08zXsOhqRC/AiOx4K4pmz+VIcRIm1FKr4= +github.com/charmbracelet/bubbletea v0.22.1 h1:z66q0LWdJNOWEH9zadiAIXp2GN1AWrwNXU8obVY9X24= +github.com/charmbracelet/bubbletea v0.22.1/go.mod h1:8/7hVvbPN6ZZPkczLiB8YpLkLJ0n7DMho5Wvfd2X1C0= +github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= +github.com/charmbracelet/lipgloss v0.5.0 h1:lulQHuVeodSgDez+3rGiuxlPVXSnhth442DATR2/8t8= +github.com/charmbracelet/lipgloss v0.5.0/go.mod h1:EZLha/HbzEt7cYqdFPovlqy5FZPj0xFhg5SaqxScmgs= +github.com/charmbracelet/lipgloss v0.6.0 h1:1StyZB9vBSOyuZxQUcUwGr17JmojPNm87inij9N3wJY= +github.com/charmbracelet/lipgloss v0.6.0/go.mod h1:tHh2wr34xcHjC2HCXIlGSG1jaDF0S0atAUvBMP6Ppuk= +github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= +github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/erikgeiser/promptkit v0.7.0 h1:Yi28iN6JRs8/0x+wjQRPfWb+vWz1pFmZ5fu2uoFipD8= +github.com/erikgeiser/promptkit v0.7.0/go.mod h1:Jj9bhN+N8RbMjB1jthkr9A4ydmczZ1WZJ8xTXnP12dg= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= +github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= +github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= +github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= +github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70 h1:kMlmsLSbjkikxQJ1IPwaM+7LJ9ltFu/fi8CRzvSnQmA= +github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= +github.com/muesli/cancelreader v0.2.0 h1:SOpr+CfyVNce341kKqvbhhzQhBPyJRXQaCtn03Pae1Q= +github.com/muesli/cancelreader v0.2.0/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= +github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= +github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= +github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68/go.mod h1:Xk+z4oIWdQqJzsxyjgl3P22oYZnHdZ8FFTHAQQt5BMQ= +github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= +github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= +github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= +github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= +github.com/muesli/termenv v0.12.0 h1:KuQRUE3PgxRFWhq4gHvZtPSLCGDqM5q/cYr1pZ39ytc= +github.com/muesli/termenv v0.12.0/go.mod h1:WCCv32tusQ/EEZ5S8oUIIrC/nIuBcxCVqlN4Xfkv+7A= +github.com/muesli/termenv v0.13.0 h1:wK20DRpJdDX8b7Ek2QfhvqhRQFZ237RGRO0RQ/Iqdy0= +github.com/muesli/termenv v0.13.0/go.mod h1:sP1+uffeLaEYpyOTb8pLCUctGcGLnoFjSn4YJK5e2bc= +github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= +github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI= +golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220919170432-7a66f970e087 h1:tPwmk4vmvVCMdr98VgL4JH+qZxPL8fqlUOHnyOM8N3w= +golang.org/x/term v0.0.0-20220919170432-7a66f970e087/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/internal/files/dependencies.go b/internal/files/dependencies.go new file mode 100644 index 0000000..5aaf1c1 --- /dev/null +++ b/internal/files/dependencies.go @@ -0,0 +1,19 @@ +package files + +import ( + "os/exec" +) + +func CacheDenoDeps(dir, file string) error { + cmd := exec.Command("deno", "cache", file) + cmd.Dir = dir + err := cmd.Run() + return err +} + +func InstallNodeDeps(packageManager, dir string) error { + cmd := exec.Command(packageManager, "install") + cmd.Dir = dir + err := cmd.Run() + return err +} diff --git a/internal/files/dockerfiles.go b/internal/files/dockerfiles.go new file mode 100644 index 0000000..0f370ee --- /dev/null +++ b/internal/files/dockerfiles.go @@ -0,0 +1,55 @@ +package files + +import ( + "errors" + "os" + "path/filepath" +) + +var ( + Deno_Dockerfile = []byte(`FROM denoland/deno + +RUN mkdir -p /app +WORKDIR /app + +USER deno +COPY . /app + +RUN deno cache src/mod.ts + +CMD ["run", "--unstable", "--allow-all", "src/mod.ts"]`) + Node_Dockerfile = []byte(`FROM node:lts-alpine + +RUN mkdir -p /app +WORKDIR /app + +COPY package.json /app/ +RUN npm install + +COPY . /app + +RUN npm run build + +CMD ["node", "dist/index.js"]`) + Node_DockerIgnore = []byte(`node_modules +build +dist +dest`) +) + +func AddDockerFiles(platform, dir string) error { + switch platform { + case "Node": + err1 := os.WriteFile(filepath.Join(dir, "Dockerfile"), Node_Dockerfile, 0777) + err2 := os.WriteFile(filepath.Join(dir, ".dockerignore"), Node_DockerIgnore, 0777) + if err1 != nil || err2 != nil { + return errors.New("failed to write Node files") + } + case "Deno": + err := os.WriteFile(filepath.Join(dir, "Dockerfile"), Deno_Dockerfile, 0777) + if err != nil { + return errors.New("failed to write Node files") + } + } + return nil +} diff --git a/internal/files/exists.go b/internal/files/exists.go new file mode 100644 index 0000000..0d7ab00 --- /dev/null +++ b/internal/files/exists.go @@ -0,0 +1,14 @@ +package files + +import "os" + +func Exists(path string) bool { + _, err := os.Stat(path) + if err == nil { + return true + } + if os.IsNotExist(err) { + return false + } + return false +} diff --git a/internal/files/package_name.go b/internal/files/package_name.go new file mode 100644 index 0000000..d4ca202 --- /dev/null +++ b/internal/files/package_name.go @@ -0,0 +1,43 @@ +package files + +import ( + "encoding/json" + "errors" + "os" + "path/filepath" +) + +func UpdatePackageName(dir string) error { + files, err := os.ReadDir(dir) + if err != nil { + return errors.New("failed to read project folder") + } + + for _, file := range files { + if file.Name() == "package.json" { + path := filepath.Join(dir, "package.json") + bytes, err := os.ReadFile(path) + if err != nil { + return errors.New("failed to write package.json") + } + + var packageJson map[string]interface{} + err = json.Unmarshal(bytes, &packageJson) + if err != nil { + return errors.New("failed to write package.json") + } + + packageJson["name"] = dir + data, err := json.Marshal(packageJson) + if err != nil { + return errors.New("failed to write package.json") + } + err = os.WriteFile(path, data, 0777) + if err != nil { + return errors.New("failed to write package.json") + } + } + } + + return nil +} diff --git a/internal/files/untar.go b/internal/files/untar.go new file mode 100644 index 0000000..de93320 --- /dev/null +++ b/internal/files/untar.go @@ -0,0 +1,52 @@ +package files + +import ( + "archive/tar" + "compress/gzip" + "io" + "os" + "path/filepath" + "strings" +) + +func Untar(dst string, r io.Reader) error { + gzr, err := gzip.NewReader(r) + if err != nil { + return err + } + defer gzr.Close() + tr := tar.NewReader(gzr) + + for { + header, err := tr.Next() + switch { + case err == io.EOF: + return nil + case err != nil: + return err + case header == nil: + continue + } + split := strings.Split(header.Name, "/") + target := filepath.Join(dst, strings.Join(split[1:], "/")) + + switch header.Typeflag { + case tar.TypeDir: + if _, err := os.Stat(target); err != nil { + if err := os.MkdirAll(target, 0755); err != nil { + return err + } + } + + case tar.TypeReg: + f, err := os.OpenFile(target, os.O_CREATE|os.O_RDWR, os.FileMode(header.Mode)) + if err != nil { + return err + } + if _, err := io.Copy(f, tr); err != nil { + return err + } + f.Close() + } + } +} diff --git a/internal/templates/templates.go b/internal/templates/templates.go new file mode 100644 index 0000000..49ff084 --- /dev/null +++ b/internal/templates/templates.go @@ -0,0 +1,78 @@ +package templates + +import ( + "errors" + "fmt" + "strings" + + "github.com/grammyjs/gmy/internal/utils" +) + +type Template struct { + Name string + Type string + Owner string + Repository string + + Branch string + Path string + + Docker_prompt bool + TSConfig_prompt bool + + Cache_file string +} + +func GetTemplates(platform string) ([]Template, error) { + var results map[string][]Template + url := "https://raw.githubusercontent.com/grammyjs/cli/main/templates.json" + err := utils.FetchJson(url, &results) + if err != nil { + return nil, errors.New("failed to fetch templates") + } + return results[strings.ToLower(platform)], nil +} + +type content struct { + Name, Sha string +} + +func GetDownloadUrl(template Template) (string, error) { + var downloadUrl string + + switch template.Type { + case "repository": + downloadUrl = fmt.Sprintf( + "https://codeload.github.com/%s/%s/tar.gz/%s", + template.Owner, template.Repository, template.Branch, + ) + + case "subfolder": + pathSplits := strings.Split(template.Path, "/") + templateParentFolderPath := strings.Join(pathSplits[0:len(pathSplits)-1], "/") + templateFolderName := pathSplits[len(pathSplits)-1] + apiUrl := fmt.Sprintf( + "https://api.github.com/repos/%s/%s/contents/%s", + template.Owner, template.Repository, templateParentFolderPath, + ) + var contents []content + err := utils.FetchJson(apiUrl, &contents) + if err != nil { + return "", errors.New("failed to fetch template") + } + + var sha string + for _, content := range contents { + if templateFolderName == content.Name { + sha = content.Sha + break + } + } + downloadUrl = fmt.Sprintf( + "https://codeload.github.com/%s/%s/tar.gz/%s", + template.Owner, template.Repository, sha, + ) + } + + return downloadUrl, nil +} diff --git a/internal/utils/fetch_json.go b/internal/utils/fetch_json.go new file mode 100644 index 0000000..8984135 --- /dev/null +++ b/internal/utils/fetch_json.go @@ -0,0 +1,18 @@ +package utils + +import ( + "encoding/json" + "net/http" + "time" +) + +var httpClient = &http.Client{Timeout: 10 * time.Second} + +func FetchJson(url string, target interface{}) error { + r, err := httpClient.Get(url) + if err != nil { + return err + } + defer r.Body.Close() + return json.NewDecoder(r.Body).Decode(target) +} diff --git a/internal/utils/git.go b/internal/utils/git.go new file mode 100644 index 0000000..ecc035f --- /dev/null +++ b/internal/utils/git.go @@ -0,0 +1,26 @@ +package utils + +import ( + "errors" + "os/exec" +) + +func InitGit(dir string) error { + err := IsInstalled("git") + if err != nil { + return errors.New("git is not installed") + } + initCmd := exec.Command("git", "init") + initCmd.Dir = dir + err = initCmd.Run() + if err != nil { + return errors.New("failed to initialize a Git repository") + } + addCmd := exec.Command("git", "add", "-A") + addCmd.Dir = dir + err = addCmd.Run() + if err != nil { + return errors.New("initialized repository successfully, but failed to add contents to the index") + } + return nil +} diff --git a/internal/utils/is_installed.go b/internal/utils/is_installed.go new file mode 100644 index 0000000..01ba309 --- /dev/null +++ b/internal/utils/is_installed.go @@ -0,0 +1,11 @@ +package utils + +import ( + "os/exec" +) + +func IsInstalled(executable string) error { + cmd := exec.Command(executable, "--version") + err := cmd.Run() + return err +} diff --git a/main.go b/main.go new file mode 100644 index 0000000..113af28 --- /dev/null +++ b/main.go @@ -0,0 +1,7 @@ +package main + +import "github.com/grammyjs/gmy/cmd" + +func main() { + cmd.Execute() +} diff --git a/templates.json b/templates.json new file mode 100644 index 0000000..a608411 --- /dev/null +++ b/templates.json @@ -0,0 +1,45 @@ +{ + "node": [ + { + "name": "bot-base/telergam-bot-template", + "type": "repository", + "owner": "bot-base", + "repository": "telegram-bot-template", + "branch": "main", + "docker_prompt": false, + "tsconfig_prompt": false + }, + { + "name": "base-runner", + "type": "subfolder", + "owner": "grammyjs", + "repository": "gmy", + "path": "templates/node/base-runner", + "docker_prompt": true, + "tsconfig_prompt": true + } + ], + "deno": [ + { + "name": "base-runner", + "type": "subfolder", + "owner": "grammyjs", + "repository": "gmy", + "path": "templates/deno/base-runner", + "cache_file": "src/mod.ts", + "docker_prompt": true, + "tsconfig_prompt": false + } + ], + "other": [ + { + "name": "vercel-base-bot", + "type": "subfolder", + "owner": "grammyjs", + "repository": "gmy", + "path": "templates/other/vercel-base-bot", + "docker_prompt": true, + "tsconfig_prompt": true + } + ] +} diff --git a/templates/README b/templates/README new file mode 100644 index 0000000..e69db55 --- /dev/null +++ b/templates/README @@ -0,0 +1 @@ +CLI templates maintained by core members \ No newline at end of file diff --git a/templates/deno/base-runner/src/mod.ts b/templates/deno/base-runner/src/mod.ts new file mode 100644 index 0000000..2d4099f --- /dev/null +++ b/templates/deno/base-runner/src/mod.ts @@ -0,0 +1,32 @@ +import { Bot, Context, session, SessionFlavor } from "https://deno.land/x/grammy/mod.ts"; +import { run, sequentialize } from "https://deno.land/x/grammy_runner/mod.ts"; + +interface SessionData { + pizzaCount: number; +} + +// Flavor the context type to include sessions. +type MyContext = Context & SessionFlavor; + + +// Create a bot. +const bot = new Bot(""); + +// Build a unique identifier for the `Context` object. +function getSessionKey(ctx: Context) { + return ctx.chat?.id.toString(); +} + +function initial(): SessionData { + return { pizzaCount: 0 }; +} + +// Sequentialize before accessing session data! +bot.use(sequentialize(getSessionKey)); +bot.use(session({ getSessionKey, initial })); + +// Add the usual middleware, now with safe session support. +bot.on("message", (ctx) => ctx.reply("Got your message.")); + +// Still run it concurrently! +run(bot); \ No newline at end of file diff --git a/templates/node/base-runner/package.json b/templates/node/base-runner/package.json new file mode 100644 index 0000000..596d02c --- /dev/null +++ b/templates/node/base-runner/package.json @@ -0,0 +1,14 @@ +{ + "scripts": { + "start": "node dist/index.js", + "build": "tsc" + }, + "dependencies": { + "@grammyjs/runner": "^1.0.3", + "grammy": "^1.8.0" + }, + "devDependencies": { + "@types/node": "^17.0.25", + "typescript": "^4.6.3" + } +} \ No newline at end of file diff --git a/templates/node/base-runner/src/index.ts b/templates/node/base-runner/src/index.ts new file mode 100644 index 0000000..3715e2b --- /dev/null +++ b/templates/node/base-runner/src/index.ts @@ -0,0 +1,32 @@ +import { Bot, Context, session, SessionFlavor } from "grammy"; +import { run, sequentialize } from "@grammyjs/runner"; + +interface SessionData { + pizzaCount: number; +} + +// Flavor the context type to include sessions. +type MyContext = Context & SessionFlavor; + + +// Create a bot. +const bot = new Bot(""); + +// Build a unique identifier for the `Context` object. +function getSessionKey(ctx: Context) { + return ctx.chat?.id.toString(); +} + +function initial(): SessionData { + return { pizzaCount: 0 }; +} + +// Sequentialize before accessing session data! +bot.use(sequentialize(getSessionKey)); +bot.use(session({ getSessionKey, initial })); + +// Add the usual middleware, now with safe session support. +bot.on("message", (ctx) => ctx.reply("Got your message.")); + +// Still run it concurrently! +run(bot); \ No newline at end of file diff --git a/templates/other/vercel-base-bot/.example.env b/templates/other/vercel-base-bot/.example.env new file mode 100644 index 0000000..9d6f142 --- /dev/null +++ b/templates/other/vercel-base-bot/.example.env @@ -0,0 +1,4 @@ +# You should configure these in the environment variable configuration of the vercel project. + +BOT_TOKEN=fill in your telegram bot token +WEBHOOK=fill in your vercel domain \ No newline at end of file diff --git a/templates/other/vercel-base-bot/api/index.ts b/templates/other/vercel-base-bot/api/index.ts new file mode 100644 index 0000000..dcd7e85 --- /dev/null +++ b/templates/other/vercel-base-bot/api/index.ts @@ -0,0 +1,13 @@ +import { Bot, webhookCallback } from 'grammy' + + +const bot = new Bot(process.env['BOT_TOKEN']) + +// attach all middleware +bot.on("message", async (ctx) => { + await ctx.reply("Hi there!") +}) + +// The free version of vercel has restrictions on quotas, which we need to enable in the configuration file vercel.json +// webhookCallback will make sure that the correct middleware(listener) function is called +export default webhookCallback(bot, 'express') \ No newline at end of file diff --git a/templates/other/vercel-base-bot/index.ts b/templates/other/vercel-base-bot/index.ts new file mode 100644 index 0000000..6c415fa --- /dev/null +++ b/templates/other/vercel-base-bot/index.ts @@ -0,0 +1,5 @@ +import { Bot } from 'grammy' + +const bot = new Bot(process.env['BOT_TOKEN']) // <-- Set your token in the vercel environment variable + +bot.api.setWebhook(process.env['WEBHOOK']) \ No newline at end of file diff --git a/templates/other/vercel-base-bot/vercel.json b/templates/other/vercel-base-bot/vercel.json new file mode 100644 index 0000000..cf172eb --- /dev/null +++ b/templates/other/vercel-base-bot/vercel.json @@ -0,0 +1,8 @@ +{ + "functions": { + "api/index.js": { + "memory": 1024, + "maxDuration": 10 + } + } +} \ No newline at end of file From b479b7482f215875168f3f6219108d3251545ca7 Mon Sep 17 00:00:00 2001 From: dcdunkan <70066170+dcdunkan@users.noreply.github.com> Date: Sun, 2 Oct 2022 23:47:53 +0530 Subject: [PATCH 3/8] add README --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..afb6db1 --- /dev/null +++ b/README.md @@ -0,0 +1,64 @@ +# gmy + +Fast and simple command line tool to setup the needed files to quickly create +Telegram bots powered by the [grammY bot framework](https://grammy.dev). This +tool allows you to create projects from several [templates](./templates.json), +maintained by both official team and third-party users. + + + + + + + +Here is a preview of the tool: https://asciinema.org/a/504541 + +## Install + +TODO: Release executables + +Install using [Go](https://go.dev). + +```shell +go install github.com/grammyjs/gmy@latest +``` + +After installation, run **gmy** command to use the tool. You can provide a +project name as the first argument. + +## Templates + +Open a pull request by adding your own templates to the +[templates.json](./templates.json) file. There are currently three platforms +that you can add templates to: Deno, Node.js, and other templates. + +Each template should contain the following fields: + +- `name` — Name to be shown in the templates list in CLI. Recommended to use + "owner/repository" as the name if it's a repository. +- `type` — **repository** or **subfolder**. If your template is an entire + repository, use `repository` as type, or if it is a subfolder in a repository + use `subfolder` as the type. +- `owner` — GitHub repository owner. +- `repository` — GitHub repository name. +- `docker_prompt` — Should the CLI prompt the user to add + [default docker files](./internal/files/dockerfiles.go). +- `tsconfig_prompt` — Should the CLI prompt the user to add the default + [tsconfig.json](./configs/tsconfig.json) file. + +You also need to add the following fields according to your template: + +#### "repository" type + +- `branch` — Primary repository branch name. Try your best to keep that branch + up-to-date. + +#### "subfolder" type + +- `path` — Path to the subfolder where the template is located at. + +#### For Deno templates + +- `cache_file` — When the user chose to cache dependencies, `deno cache` command + will get executed for the specified file. Point to deps.ts, or the entry point + of the template. From 596846189c0ee7aa509fb7a0afacd47d19db831d Mon Sep 17 00:00:00 2001 From: dcdunkan <70066170+dcdunkan@users.noreply.github.com> Date: Wed, 5 Oct 2022 01:26:55 +0530 Subject: [PATCH 4/8] move prompts into individual files --- cmd/root.go | 265 +++------------------- internal/files/setup_files.go | 55 +++++ internal/prompts/additional/additional.go | 109 +++++++++ internal/prompts/name/name.go | 41 ++++ internal/prompts/platform/platform.go | 22 ++ internal/prompts/template/template.go | 41 ++++ internal/templates/templates.go | 2 +- 7 files changed, 301 insertions(+), 234 deletions(-) create mode 100644 internal/files/setup_files.go create mode 100644 internal/prompts/additional/additional.go create mode 100644 internal/prompts/name/name.go create mode 100644 internal/prompts/platform/platform.go create mode 100644 internal/prompts/template/template.go diff --git a/cmd/root.go b/cmd/root.go index d933b08..1ffb5b1 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,19 +1,15 @@ package cmd import ( - "errors" "fmt" "os" - "strings" "github.com/grammyjs/gmy/internal/files" - t "github.com/grammyjs/gmy/internal/templates" - "github.com/grammyjs/gmy/internal/utils" + "github.com/grammyjs/gmy/internal/prompts/additional" + "github.com/grammyjs/gmy/internal/prompts/name" + "github.com/grammyjs/gmy/internal/prompts/platform" + template_ "github.com/grammyjs/gmy/internal/prompts/template" - "github.com/cavaliergopher/grab/v3" - "github.com/erikgeiser/promptkit/confirmation" - "github.com/erikgeiser/promptkit/selection" - "github.com/erikgeiser/promptkit/textinput" "github.com/spf13/cobra" ) @@ -26,6 +22,33 @@ const footer = ` . Community https://telegram.me/grammyjs ` +func Run(cmd *cobra.Command, args []string) { + var projectName string + if len(args) > 0 { + err := name.ValidateProjectName(args[0]) + if err == nil { + projectName = args[0] + } + } + if projectName == "" { + projectName = name.Prompt() + } + + platform := platform.Prompt() + template := template_.Prompt(platform) + + // Download, extract files from template source + files.SetupFiles(projectName, template) + + fmt.Println(` + + Project folder set up successfully! + Additional configuration options for you:\n`) + + // Additional prompts and configuration + additional.Prompt(projectName, platform, template) + fmt.Printf(footer, projectName) +} + // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ Use: "gmy [project name]", @@ -40,231 +63,7 @@ https://github.com/grammyjs/gmy#templates https://grammy.dev`, Args: cobra.ArbitraryArgs, - Run: func(cmd *cobra.Command, args []string) { - var projectName string - - if len(args) > 0 { - err := ValidateProjectName(args[0]) - if err == nil { - projectName = args[0] - } - } - - if projectName == "" { - prompt := textinput.New(" > Enter a name for your project:") - prompt.Placeholder = "Project name cannot be empty" - prompt.Validate = ValidateProjectName - input, err := prompt.RunPrompt() - if err != nil { - os.Exit(1) - } - projectName = input - } - - platformPrompt := selection.New( - " > Choose a platform:", - selection.Choices([]string{"Deno", "Node", "Other"}), - ) - platformPrompt.FilterPrompt = " Platforms" - platformPrompt.FilterPlaceholder = "Find" - platformPrompt.PageSize = 5 - choice, err := platformPrompt.RunPrompt() - if err != nil { - os.Exit(1) - } - - platform := choice.String - fmt.Printf(" : Getting templates for %s...\n", platform) - templates, err := t.GetTemplates(platform) - if err != nil { - fmt.Println(" ! Failed to fetch templates :(") - os.Exit(1) - } - - var templateChoices []string - for i := 0; i < len(templates); i++ { - templateChoices = append(templateChoices, templates[i].Name) - } - - templatePrompt := selection.New(" > Choose a template:", selection.Choices(templateChoices)) - templatePrompt.FilterPrompt = " Templates for " + platform - templatePrompt.FilterPlaceholder = "Find" - templatePrompt.PageSize = 5 - choice, err = templatePrompt.RunPrompt() - if err != nil { - os.Exit(1) - } - - var selectedTemplate t.Template - for _, template := range templates { - if template.Name == choice.String { - selectedTemplate = template - break - } - } - - fmt.Printf( - " : Downloading template assets from %s/%s...\n", - selectedTemplate.Owner, selectedTemplate.Repository, - ) - - tempDir, err := os.MkdirTemp("", "gmy-template-") - defer os.RemoveAll(tempDir) - if err != nil { - fmt.Println(" ! Failed to create temporary folder :(") - os.Exit(1) - } - - downloadUrl, err := t.GetDownloadUrl(selectedTemplate) - if err != nil { - fmt.Println(" ! Failed to fetch template details :(") - os.Exit(1) - } - - resp, err := grab.Get(tempDir, downloadUrl) - if err != nil { - fmt.Printf(" ! Failed to download assets from %s\n", downloadUrl) - os.Exit(1) - } - err = resp.Err() - if err != nil { - fmt.Printf(" ! Failed to download assets from %s\n", downloadUrl) - os.Exit(1) - } - - fmt.Println(" + Assets downloaded") - fmt.Println(" : Setting up project folder...") - - file, err := os.Open(resp.Filename) - if err != nil { - fmt.Println(" ! Failed to extract downloaded assets: ", err) - os.Exit(1) - } - - err = files.Untar(projectName, file) - if err != nil { - fmt.Println(" ! Failed to extract downloaded assets: ", err) - os.Exit(1) - } - - fmt.Printf(` - + Project folder set up successfully! - Additional configuration options for you: - -`) - - gitPrompt := confirmation.New(" ? Initialize Git repository", confirmation.Yes) - initGit, _ := gitPrompt.RunPrompt() - if initGit { - err := utils.InitGit(projectName) - if err != nil { - fmt.Println(" - Failed to initialize Git repository.") - } else { - fmt.Println(" + Git repository initialized.") - } - } - - if selectedTemplate.TSConfig_prompt { - tscPrompt := confirmation.New(" ? Would you like to add TypeScript configuration file", confirmation.No) - tsc, err := tscPrompt.RunPrompt() - if err != nil && tsc { - _, err := grab.Get(projectName, "https://raw.githubusercontent.com/grammyjs/cli/main/configs/tsconfig.json") - if err != nil { - fmt.Println(" - Skipping... Failed to add a tsconfig.json.") - } - } - } - - if selectedTemplate.Docker_prompt { - dockerPrompt := confirmation.New(" ? Add Docker related files", confirmation.No) - docker, err := dockerPrompt.RunPrompt() - if err == nil && docker { - err := files.AddDockerFiles(platform, projectName) - if err != nil { - fmt.Println(" - Failed to add Docker files.") - } - } - } - - var action string - - switch platform { - case "Deno": - action = "Cache" - case "Node": - action = "Install" - case "Other": - fmt.Printf(footer, projectName) - return - } - - pkgInstallPrompt := confirmation.New(fmt.Sprintf(" ? %s dependencies", action), confirmation.Yes) - installPkgs, err := pkgInstallPrompt.RunPrompt() - - if err != nil { - os.Exit(1) - } - - if installPkgs { - if platform == "Deno" { - fmt.Println(" : Caching dependencies...") - err := files.CacheDenoDeps(projectName, selectedTemplate.Cache_file) - if err != nil { - fmt.Println(" ! Failed to cache dependencies.") - } else { - fmt.Println(" + Cached dependencies successfully.") - } - } - - if platform == "Node" { - prompt := selection.New( - " > Choose a package manager of your choice:", - selection.Choices([]string{"npm", "yarn", "pnpm", "None"}), - ) - prompt.FilterPrompt = " Package Managers" - prompt.FilterPlaceholder = "Find" - prompt.PageSize = 5 - choice, err := prompt.RunPrompt() - if err == nil && choice.String != "None" { - packageManager := choice.String - fmt.Println(" : Checking for package manager...") - err := utils.IsInstalled(packageManager) - - if err != nil { - fmt.Println(" ! Seems like the specified package manager is not installed.") - } else { - fmt.Println(" : Installing dependencies...") - err := files.InstallNodeDeps(packageManager, projectName) - if err != nil { - fmt.Println(" ! Failed to install dependencies.") - } else { - fmt.Println(" + Installed dependencies successfully.") - } - } - } - fmt.Printf(" : Updating package name...\n") - files.UpdatePackageName(projectName) - } - } - fmt.Printf(footer, projectName) - }, -} - -func ValidateProjectName(name string) error { - if strings.TrimSpace(name) == "" { - return errors.New("empty name") - } - if files.Exists(name) { - folder, err := os.ReadDir(name) - if err != nil { - return err - } - if len(folder) == 0 { - return nil - } - return errors.New("directory already exists") - } - return nil + Run: Run, } func Execute() { diff --git a/internal/files/setup_files.go b/internal/files/setup_files.go new file mode 100644 index 0000000..2c4e533 --- /dev/null +++ b/internal/files/setup_files.go @@ -0,0 +1,55 @@ +package files + +import ( + "fmt" + "os" + + "github.com/cavaliergopher/grab/v3" + t "github.com/grammyjs/gmy/internal/templates" +) + +func SetupFiles(projectName string, template t.Template) { + fmt.Printf( + " : Downloading template assets from %s/%s...\n", + template.Owner, template.Repository, + ) + + tempDir, err := os.MkdirTemp("", "gmy-template-") + defer os.RemoveAll(tempDir) + if err != nil { + fmt.Println(" ! Failed to create temporary folder :(") + os.Exit(1) + } + + downloadUrl, err := t.GetDownloadUrl(template) + if err != nil { + fmt.Println(" ! Failed to fetch template details :(") + os.Exit(1) + } + + resp, err := grab.Get(tempDir, downloadUrl) + if err != nil { + fmt.Printf(" ! Failed to download assets from %s\n", downloadUrl) + os.Exit(1) + } + err = resp.Err() + if err != nil { + fmt.Printf(" ! Failed to download assets from %s\n", downloadUrl) + os.Exit(1) + } + + fmt.Println(" + Assets downloaded") + fmt.Println(" : Setting up project folder...") + + file, err := os.Open(resp.Filename) + if err != nil { + fmt.Println(" ! Failed to extract downloaded assets: ", err) + os.Exit(1) + } + + err = Untar(projectName, file) + if err != nil { + fmt.Println(" ! Failed to extract downloaded assets: ", err) + os.Exit(1) + } +} diff --git a/internal/prompts/additional/additional.go b/internal/prompts/additional/additional.go new file mode 100644 index 0000000..ca9fec4 --- /dev/null +++ b/internal/prompts/additional/additional.go @@ -0,0 +1,109 @@ +package additional + +import ( + "fmt" + "os" + + "github.com/cavaliergopher/grab/v3" + "github.com/erikgeiser/promptkit/confirmation" + "github.com/erikgeiser/promptkit/selection" + "github.com/grammyjs/gmy/internal/files" + "github.com/grammyjs/gmy/internal/utils" + + t "github.com/grammyjs/gmy/internal/templates" +) + +func Prompt(name string, platform string, template t.Template) { + gitPrompt := confirmation.New(" ? Initialize Git repository", confirmation.Yes) + initGit, _ := gitPrompt.RunPrompt() + if initGit { + err := utils.InitGit(name) + if err != nil { + fmt.Println(" - Failed to initialize Git repository.") + } else { + fmt.Println(" + Git repository initialized.") + } + } + + if template.TSConfig_prompt { + tscPrompt := confirmation.New(" ? Would you like to add TypeScript configuration file", confirmation.No) + tsc, err := tscPrompt.RunPrompt() + if err != nil && tsc { + _, err := grab.Get(name, "https://raw.githubusercontent.com/grammyjs/cli/main/configs/tsconfig.json") + if err != nil { + fmt.Println(" - Skipping... Failed to add a tsconfig.json.") + } + } + } + + if template.Docker_prompt { + dockerPrompt := confirmation.New(" ? Add Docker related files", confirmation.No) + docker, err := dockerPrompt.RunPrompt() + if err == nil && docker { + err := files.AddDockerFiles(platform, name) + if err != nil { + fmt.Println(" - Failed to add Docker files.") + } + } + } + + var action string + + switch platform { + case "Deno": + action = "Cache" + case "Node": + action = "Install" + case "Other": + return + } + + pkgInstallPrompt := confirmation.New(fmt.Sprintf(" ? %s dependencies", action), confirmation.Yes) + installPkgs, err := pkgInstallPrompt.RunPrompt() + + if err != nil { + os.Exit(1) + } + + if installPkgs { + if platform == "Deno" { + fmt.Println(" : Caching dependencies...") + err := files.CacheDenoDeps(name, template.Cache_file) + if err != nil { + fmt.Println(" ! Failed to cache dependencies.") + } else { + fmt.Println(" + Cached dependencies successfully.") + } + } + + if platform == "Node" { + prompt := selection.New( + " > Choose a package manager of your choice:", + selection.Choices([]string{"npm", "yarn", "pnpm", "None"}), + ) + prompt.FilterPrompt = " Package Managers" + prompt.FilterPlaceholder = "Find" + prompt.PageSize = 5 + choice, err := prompt.RunPrompt() + if err == nil && choice.String != "None" { + packageManager := choice.String + fmt.Println(" : Checking for package manager...") + err := utils.IsInstalled(packageManager) + + if err != nil { + fmt.Println(" ! Seems like the specified package manager is not installed.") + } else { + fmt.Println(" : Installing dependencies...") + err := files.InstallNodeDeps(packageManager, name) + if err != nil { + fmt.Println(" ! Failed to install dependencies.") + } else { + fmt.Println(" + Installed dependencies successfully.") + } + } + } + fmt.Printf(" : Updating package name...\n") + files.UpdatePackageName(name) + } + } +} diff --git a/internal/prompts/name/name.go b/internal/prompts/name/name.go new file mode 100644 index 0000000..68c639a --- /dev/null +++ b/internal/prompts/name/name.go @@ -0,0 +1,41 @@ +package name + +import ( + "errors" + "fmt" + "os" + "strings" + + "github.com/erikgeiser/promptkit/textinput" + "github.com/grammyjs/gmy/internal/files" +) + +func Prompt() string { + prompt := textinput.New(" > Enter a name for your project:") + prompt.Placeholder = "Project name cannot be empty" + prompt.Validate = ValidateProjectName + prompt.InitialValue = "my-bot" + input, err := prompt.RunPrompt() + if err != nil { + fmt.Println("There's something wrong with the input") + os.Exit(1) + } + return input +} + +func ValidateProjectName(name string) error { + if strings.TrimSpace(name) == "" { + return errors.New("empty name") + } + if files.Exists(name) { + folder, err := os.ReadDir(name) + if err != nil { + return err + } + if len(folder) == 0 { + return nil + } + return errors.New("directory already exists") + } + return nil +} diff --git a/internal/prompts/platform/platform.go b/internal/prompts/platform/platform.go new file mode 100644 index 0000000..bcc7be6 --- /dev/null +++ b/internal/prompts/platform/platform.go @@ -0,0 +1,22 @@ +package platform + +import ( + "os" + + "github.com/erikgeiser/promptkit/selection" +) + +func Prompt() string { + platformPrompt := selection.New( + " > Choose a platform:", + selection.Choices([]string{"Deno", "Node", "Other"}), + ) + platformPrompt.FilterPrompt = " Platforms" + platformPrompt.FilterPlaceholder = "Find" + platformPrompt.PageSize = 5 + choice, err := platformPrompt.RunPrompt() + if err != nil { + os.Exit(1) + } + return choice.String +} diff --git a/internal/prompts/template/template.go b/internal/prompts/template/template.go new file mode 100644 index 0000000..6005dc5 --- /dev/null +++ b/internal/prompts/template/template.go @@ -0,0 +1,41 @@ +package template + +import ( + "fmt" + "os" + + "github.com/erikgeiser/promptkit/selection" + t "github.com/grammyjs/gmy/internal/templates" +) + +func Prompt(platform string) t.Template { + fmt.Printf(" : Getting templates for %s...\n", platform) + templates, err := t.GetTemplates(platform) + if err != nil { + fmt.Println(" ! Failed to fetch templates :(") + os.Exit(1) + } + + var templateChoices []string + for i := 0; i < len(templates); i++ { + templateChoices = append(templateChoices, templates[i].Name) + } + + templatePrompt := selection.New(" > Choose a template:", selection.Choices(templateChoices)) + templatePrompt.FilterPrompt = " Templates for " + platform + templatePrompt.FilterPlaceholder = "Find" + templatePrompt.PageSize = 5 + choice, err := templatePrompt.RunPrompt() + if err != nil { + os.Exit(1) + } + + var selectedTemplate t.Template + for _, template := range templates { + if template.Name == choice.String { + selectedTemplate = template + break + } + } + return selectedTemplate +} diff --git a/internal/templates/templates.go b/internal/templates/templates.go index 49ff084..d17c6aa 100644 --- a/internal/templates/templates.go +++ b/internal/templates/templates.go @@ -25,7 +25,7 @@ type Template struct { func GetTemplates(platform string) ([]Template, error) { var results map[string][]Template - url := "https://raw.githubusercontent.com/grammyjs/cli/main/templates.json" + url := "https://raw.githubusercontent.com/dcdunkan/gmy/main/templates.json" err := utils.FetchJson(url, &results) if err != nil { return nil, errors.New("failed to fetch templates") From c5bc33facc90b7e9cee3674fb2614feca51da0af Mon Sep 17 00:00:00 2001 From: dcdunkan <70066170+dcdunkan@users.noreply.github.com> Date: Wed, 5 Oct 2022 01:28:12 +0530 Subject: [PATCH 5/8] readable loop code --- internal/prompts/template/template.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/prompts/template/template.go b/internal/prompts/template/template.go index 6005dc5..d791bb8 100644 --- a/internal/prompts/template/template.go +++ b/internal/prompts/template/template.go @@ -17,8 +17,8 @@ func Prompt(platform string) t.Template { } var templateChoices []string - for i := 0; i < len(templates); i++ { - templateChoices = append(templateChoices, templates[i].Name) + for _, template := range templates { + templateChoices = append(templateChoices, template.Name) } templatePrompt := selection.New(" > Choose a template:", selection.Choices(templateChoices)) From 42b88ec48b8a15b523f74e7dd48acf6dce19afa8 Mon Sep 17 00:00:00 2001 From: dcdunkan <70066170+dcdunkan@users.noreply.github.com> Date: Wed, 5 Oct 2022 01:35:20 +0530 Subject: [PATCH 6/8] make error message constant --- internal/files/package_name.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/files/package_name.go b/internal/files/package_name.go index d4ca202..48151cb 100644 --- a/internal/files/package_name.go +++ b/internal/files/package_name.go @@ -13,28 +13,30 @@ func UpdatePackageName(dir string) error { return errors.New("failed to read project folder") } + writeError := errors.New("failed to write package.json") + for _, file := range files { if file.Name() == "package.json" { path := filepath.Join(dir, "package.json") bytes, err := os.ReadFile(path) if err != nil { - return errors.New("failed to write package.json") + return writeError } var packageJson map[string]interface{} err = json.Unmarshal(bytes, &packageJson) if err != nil { - return errors.New("failed to write package.json") + return writeError } packageJson["name"] = dir data, err := json.Marshal(packageJson) if err != nil { - return errors.New("failed to write package.json") + return writeError } err = os.WriteFile(path, data, 0777) if err != nil { - return errors.New("failed to write package.json") + return writeError } } } From fd5fbc182ff45fa86779c16665ffa139db1393ed Mon Sep 17 00:00:00 2001 From: dcdunkan <70066170+dcdunkan@users.noreply.github.com> Date: Wed, 5 Oct 2022 01:35:47 +0530 Subject: [PATCH 7/8] move main to cmd & restructure --- cmd/{root.go => main.go} | 8 ++++---- main.go | 7 ------- 2 files changed, 4 insertions(+), 11 deletions(-) rename cmd/{root.go => main.go} (95%) delete mode 100644 main.go diff --git a/cmd/root.go b/cmd/main.go similarity index 95% rename from cmd/root.go rename to cmd/main.go index 1ffb5b1..1203b69 100644 --- a/cmd/root.go +++ b/cmd/main.go @@ -1,4 +1,4 @@ -package cmd +package main import ( "fmt" @@ -22,7 +22,7 @@ const footer = ` . Community https://telegram.me/grammyjs ` -func Run(cmd *cobra.Command, args []string) { +func run(cmd *cobra.Command, args []string) { var projectName string if len(args) > 0 { err := name.ValidateProjectName(args[0]) @@ -63,10 +63,10 @@ https://github.com/grammyjs/gmy#templates https://grammy.dev`, Args: cobra.ArbitraryArgs, - Run: Run, + Run: run, } -func Execute() { +func main() { err := rootCmd.Execute() if err != nil { os.Exit(1) diff --git a/main.go b/main.go deleted file mode 100644 index 113af28..0000000 --- a/main.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "github.com/grammyjs/gmy/cmd" - -func main() { - cmd.Execute() -} From c8236b4fb1bb7df98423c5d620639427fb58dff4 Mon Sep 17 00:00:00 2001 From: dcdunkan <70066170+dcdunkan@users.noreply.github.com> Date: Wed, 5 Oct 2022 01:41:56 +0530 Subject: [PATCH 8/8] Rename go module --- README.md | 2 +- cmd/main.go | 12 ++++++------ go.mod | 2 +- internal/files/setup_files.go | 2 +- internal/prompts/additional/additional.go | 8 ++++---- internal/prompts/name/name.go | 2 +- internal/prompts/template/template.go | 2 +- internal/templates/templates.go | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index afb6db1..8852072 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ TODO: Release executables Install using [Go](https://go.dev). ```shell -go install github.com/grammyjs/gmy@latest +go install github.com/grammyjs/create-grammy@latest ``` After installation, run **gmy** command to use the tool. You can provide a diff --git a/cmd/main.go b/cmd/main.go index 1203b69..d83678c 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -4,11 +4,11 @@ import ( "fmt" "os" - "github.com/grammyjs/gmy/internal/files" - "github.com/grammyjs/gmy/internal/prompts/additional" - "github.com/grammyjs/gmy/internal/prompts/name" - "github.com/grammyjs/gmy/internal/prompts/platform" - template_ "github.com/grammyjs/gmy/internal/prompts/template" + "github.com/grammyjs/create-grammy/internal/files" + "github.com/grammyjs/create-grammy/internal/prompts/additional" + "github.com/grammyjs/create-grammy/internal/prompts/name" + "github.com/grammyjs/create-grammy/internal/prompts/platform" + template_ "github.com/grammyjs/create-grammy/internal/prompts/template" "github.com/spf13/cobra" ) @@ -59,7 +59,7 @@ This application is a tool to generate the needed files to quickly create a Telegram bot from several templates powered by grammY. Feel free to add more templates to our template registry: -https://github.com/grammyjs/gmy#templates +https://github.com/grammyjs/create-grammy#templates https://grammy.dev`, Args: cobra.ArbitraryArgs, diff --git a/go.mod b/go.mod index e8024cc..6f6bbfd 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/grammyjs/gmy +module github.com/grammyjs/create-grammy go 1.19 diff --git a/internal/files/setup_files.go b/internal/files/setup_files.go index 2c4e533..f2fdb29 100644 --- a/internal/files/setup_files.go +++ b/internal/files/setup_files.go @@ -5,7 +5,7 @@ import ( "os" "github.com/cavaliergopher/grab/v3" - t "github.com/grammyjs/gmy/internal/templates" + t "github.com/grammyjs/create-grammy/internal/templates" ) func SetupFiles(projectName string, template t.Template) { diff --git a/internal/prompts/additional/additional.go b/internal/prompts/additional/additional.go index ca9fec4..291f95e 100644 --- a/internal/prompts/additional/additional.go +++ b/internal/prompts/additional/additional.go @@ -7,10 +7,10 @@ import ( "github.com/cavaliergopher/grab/v3" "github.com/erikgeiser/promptkit/confirmation" "github.com/erikgeiser/promptkit/selection" - "github.com/grammyjs/gmy/internal/files" - "github.com/grammyjs/gmy/internal/utils" + "github.com/grammyjs/create-grammy/internal/files" + "github.com/grammyjs/create-grammy/internal/utils" - t "github.com/grammyjs/gmy/internal/templates" + t "github.com/grammyjs/create-grammy/internal/templates" ) func Prompt(name string, platform string, template t.Template) { @@ -29,7 +29,7 @@ func Prompt(name string, platform string, template t.Template) { tscPrompt := confirmation.New(" ? Would you like to add TypeScript configuration file", confirmation.No) tsc, err := tscPrompt.RunPrompt() if err != nil && tsc { - _, err := grab.Get(name, "https://raw.githubusercontent.com/grammyjs/cli/main/configs/tsconfig.json") + _, err := grab.Get(name, "https://raw.githubusercontent.com/grammyjs/create-grammy/main/configs/tsconfig.json") if err != nil { fmt.Println(" - Skipping... Failed to add a tsconfig.json.") } diff --git a/internal/prompts/name/name.go b/internal/prompts/name/name.go index 68c639a..d177824 100644 --- a/internal/prompts/name/name.go +++ b/internal/prompts/name/name.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/erikgeiser/promptkit/textinput" - "github.com/grammyjs/gmy/internal/files" + "github.com/grammyjs/create-grammy/internal/files" ) func Prompt() string { diff --git a/internal/prompts/template/template.go b/internal/prompts/template/template.go index d791bb8..ca79df8 100644 --- a/internal/prompts/template/template.go +++ b/internal/prompts/template/template.go @@ -5,7 +5,7 @@ import ( "os" "github.com/erikgeiser/promptkit/selection" - t "github.com/grammyjs/gmy/internal/templates" + t "github.com/grammyjs/create-grammy/internal/templates" ) func Prompt(platform string) t.Template { diff --git a/internal/templates/templates.go b/internal/templates/templates.go index d17c6aa..81916c8 100644 --- a/internal/templates/templates.go +++ b/internal/templates/templates.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/grammyjs/gmy/internal/utils" + "github.com/grammyjs/create-grammy/internal/utils" ) type Template struct { @@ -25,7 +25,7 @@ type Template struct { func GetTemplates(platform string) ([]Template, error) { var results map[string][]Template - url := "https://raw.githubusercontent.com/dcdunkan/gmy/main/templates.json" + url := "https://raw.githubusercontent.com/grammyjs/create-grammy/main/templates.json" err := utils.FetchJson(url, &results) if err != nil { return nil, errors.New("failed to fetch templates")