Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 2.10.3 #84

Merged
merged 6 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 68 additions & 66 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,31 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Yarn
run: corepack enable

# Yarn dependencies cannot be cached until yarn is installed
# WORKAROUND: https://github.com/actions/setup-node/issues/531
- name: Extract cached dependencies
uses: actions/setup-node@v4
with:
cache: yarn

- name: Write npm credentials
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> .npmrc
npm whoami
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache
env:
cache-name: subsquid-cli
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-${{ env.cache-name }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-yarn-

- name: Install
run: yarn install
run: yarn install --immutable

- name: Build
run: yarn build
Expand All @@ -64,55 +66,55 @@ jobs:
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Build packages
run: |
yarn pkg:build
yarn pkg:compress

- name: Get version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
- name: Tag release
uses: tvdias/[email protected]
with:
repo-token: ${{ github.token }}
tag: v${{ steps.package-version.outputs.current-version }}

- name: Create release page
uses: softprops/action-gh-release@v1
with:
files: 'package/*'
tag_name: v${{ steps.package-version.outputs.current-version }}

- name: Checkout subsquid/homebrew-cli
uses: actions/checkout@v3
with:
repository: subsquid/homebrew-cli
path: homebrew-cli
token: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}

- name: Gen Formula
run: |
echo pkg_macos_shasum=$(shasum -a256 ./package/subsquid-cli-$npm_package_version-macos-x64.tar.gz | cut -f 1 -d " ") >> $GITHUB_ENV
echo pkg_linux_shasum=$(shasum -a256 ./package/subsquid-cli-$npm_package_version-linux-x64.tar.gz | cut -f 1 -d " ") >> $GITHUB_ENV
source ./homebrew-cli/gen-formula.sh
cp sqd@$npm_package_version.rb ./homebrew-cli/Formula
cp sqd@$version_tag.rb ./homebrew-cli/Formula
if [ "$version_tag" = "latest" ]; then cp sqd.rb ./homebrew-cli/Formula; fi
env:
npm_package_version: ${{ steps.package-version.outputs.current-version }}
version_tag: ${{ github.event.inputs.tag }}

- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
with:
source-directory: 'homebrew-cli'
destination-github-username: 'subsquid'
destination-repository-name: 'homebrew-cli'
user-name: 'github-actions'
user-email: '[email protected]'
target-branch: master
commit-message: 'release: v${{ steps.package-version.outputs.current-version }}'
# - name: Build packages
# run: |
# yarn pkg:build
# yarn pkg:compress
#
# - name: Get version
# id: package-version
# uses: martinbeentjes/npm-get-version-action@main
#
# - name: Tag release
# uses: tvdias/[email protected]
# with:
# repo-token: ${{ github.token }}
# tag: v${{ steps.package-version.outputs.current-version }}
#
# - name: Create release page
# uses: softprops/action-gh-release@v1
# with:
# files: 'package/*'
# tag_name: v${{ steps.package-version.outputs.current-version }}
#
# - name: Checkout subsquid/homebrew-cli
# uses: actions/checkout@v3
# with:
# repository: subsquid/homebrew-cli
# path: homebrew-cli
# token: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
#
# - name: Gen Formula
# run: |
# echo pkg_macos_shasum=$(shasum -a256 ./package/subsquid-cli-$npm_package_version-macos-x64.tar.gz | cut -f 1 -d " ") >> $GITHUB_ENV
# echo pkg_linux_shasum=$(shasum -a256 ./package/subsquid-cli-$npm_package_version-linux-x64.tar.gz | cut -f 1 -d " ") >> $GITHUB_ENV
# source ./homebrew-cli/gen-formula.sh
# cp sqd@$npm_package_version.rb ./homebrew-cli/Formula
# cp sqd@$version_tag.rb ./homebrew-cli/Formula
# if [ "$version_tag" = "latest" ]; then cp sqd.rb ./homebrew-cli/Formula; fi
# env:
# npm_package_version: ${{ steps.package-version.outputs.current-version }}
# version_tag: ${{ github.event.inputs.tag }}
#
# - name: Pushes to another repository
# uses: cpina/github-action-push-to-another-repository@main
# env:
# API_TOKEN_GITHUB: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
# with:
# source-directory: 'homebrew-cli'
# destination-github-username: 'subsquid'
# destination-repository-name: 'homebrew-cli'
# user-name: 'github-actions'
# user-email: '[email protected]'
# target-branch: master
# commit-message: 'release: v${{ steps.package-version.outputs.current-version }}'
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ dist/
# Oclif
oclif.manifest.json

bin/dev.*
13 changes: 0 additions & 13 deletions bin/dev

This file was deleted.

6 changes: 6 additions & 0 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env node_modules/.bin/ts-node
// eslint-disable-next-line node/shebang, unicorn/prefer-top-level-await
;(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({development: true, dir: __dirname})
})()
3 changes: 3 additions & 0 deletions bin/run.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\run" %*
10 changes: 5 additions & 5 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

const oclif = require('@oclif/core')

oclif.run()
.then(require('@oclif/core/flush'))
.catch(require('@oclif/core/handle'))
// eslint-disable-next-line unicorn/prefer-top-level-await
(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({development: false, dir: __dirname})
})()
58 changes: 31 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@subsquid/cli",
"description": "squid cli tool",
"version": "2.10.0",
"version": "2.10.3",
"license": "GPL-3.0-or-later",
"repository": "[email protected]:subsquid/squid-cli.git",
"publishConfig": {
Expand All @@ -19,8 +19,10 @@
"assets": "./node_modules/**/*"
},
"oclif": {
"commands": "./lib/commands",
"default": "default",
"commands": {
"strategy": "pattern",
"target": "./lib/commands"
},
"helpClass": "./lib/help",
"bin": "sqd",
"repositoryPrefix": "<%- repo %>/tree/master/<%- commandPath %>",
Expand All @@ -29,11 +31,11 @@
"@oclif/plugin-autocomplete"
],
"topics": {
"squid": {
"description": "Manage squid deployments to the Subsquid Cloud service."
"gateways": {
"description": "Explore data sources for a squid"
},
"secrets": {
"description": "Manage account secrets. The secrets are exposed as environment variables, and are accessible to all the squids deployed by the current Cloud account."
"description": "Manage organization secrets"
}
},
"hooks": {
Expand All @@ -43,7 +45,7 @@
"homepage": "https://www.subsquid.io/",
"scripts": {
"build": "rm -rf lib && tsc",
"dev": "./bin/dev",
"dev": "./bin/dev.js",
"sqd": "./bin/run.js",
"bl": "node ./lib/blessed.js",
"lint": "eslint --fix src/**/*",
Expand All @@ -66,60 +68,61 @@
"testEnvironment": "node"
},
"dependencies": {
"@oclif/core": "3.19.1",
"@oclif/plugin-autocomplete": "3.0.8",
"@oclif/core": "3.26.0",
"@oclif/plugin-autocomplete": "3.0.13",
"@subsquid/commands": "^2.3.1",
"@subsquid/manifest": "^0.0.1-beta.17",
"@subsquid/manifest-expr": "^0.0.1",
"@types/fast-levenshtein": "^0.0.4",
"@types/lodash": "^4.14.202",
"@types/lodash": "^4.17.0",
"@types/targz": "^1.0.4",
"async-retry": "^1.3.3",
"axios": "^1.6.7",
"axios-retry": "^4.0.0",
"axios": "^1.6.8",
"axios-retry": "^4.1.0",
"blessed-contrib": "^4.11.0",
"chalk": "^4.1.2",
"cli-select": "^1.1.2",
"cross-spawn": "^7.0.3",
"date-fns": "^3.3.1",
"dotenv": "^16.4.2",
"date-fns": "^3.6.0",
"dotenv": "^16.4.5",
"fast-levenshtein": "^3.0.0",
"figlet": "^1.7.0",
"form-data": "^4.0.0",
"glob": "^10.3.10",
"glob": "^10.3.12",
"ignore": "^5.3.1",
"inquirer": "^8.2.5",
"inquirer": "^8.2.6",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"ms": "^2.1.3",
"neo-blessed": "^0.2.0",
"open": "^8.1.0",
"pretty-bytes": "^5.6.0",
"qs": "^6.11.2",
"qs": "^6.12.0",
"reblessed": "^0.2.1",
"simple-git": "^3.22.0",
"simple-git": "^3.24.0",
"split2": "^4.2.0",
"targz": "^1.0.1",
"tree-kill": "^1.2.2",
"unique-names-generator": "^4.7.1"
},
"devDependencies": {
"@oclif/dev-cli": "^1.26.10",
"@oclif/help": "^1.0.4",
"@oclif/help": "^1.0.15",
"@types/async-retry": "^1.4.8",
"@types/blessed": "^0.1.25",
"@types/cross-spawn": "^6.0.6",
"@types/figlet": "^1.5.8",
"@types/inquirer": "^8.2.3",
"@types/inquirer": "^8.2.10",
"@types/jest": "^29.5.12",
"@types/js-yaml": "^4.0.9",
"@types/ms": "^0.7.34",
"@types/node": "^20.11.17",
"@types/qs": "^6.9.11",
"@types/node": "^20.12.3",
"@types/qs": "^6.9.14",
"@types/split2": "^3.2.1",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/eslint-plugin-tslint": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "8.56.0",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/eslint-plugin-tslint": "^7.0.2",
"@typescript-eslint/parser": "^7.5.0",
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
Expand All @@ -131,7 +134,8 @@
"pkg": "^5.8.1",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"typescript": "~5.3.3"
"ts-node": "^10.9.2",
"typescript": "~5.4.3"
},
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion src/api/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function profile({
}

export async function listOrganizations() {
const { organizations, ...rest } = await profile();
const { organizations } = await profile();

return organizations || [];
}
Expand Down
47 changes: 0 additions & 47 deletions src/commands/default.ts

This file was deleted.

Loading
Loading