-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 584ff65
Showing
24 changed files
with
7,383 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["oclif", "oclif-typescript", "prettier"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# test | ||
name: version, tag and github release | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: Check if version already exists | ||
id: version-check | ||
run: | | ||
package_version=$(node -p "require('./package.json').version") | ||
exists=$(gh api repos/${{ github.repository }}/releases/tags/v$package_version >/dev/null 2>&1 && echo "true" || echo "") | ||
if [ -n "$exists" ]; | ||
then | ||
echo "Version v$package_version already exists" | ||
echo "::warning file=package.json,line=1::Version v$package_version already exists - no release will be created. If you want to create a new release, please update the version in package.json and push again." | ||
echo "skipped=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "Version v$package_version does not exist. Creating release..." | ||
echo "skipped=false" >> $GITHUB_OUTPUT | ||
echo "tag=v$package_version" >> $GITHUB_OUTPUT | ||
fi | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
- name: Setup git | ||
if: ${{ steps.version-check.outputs.skipped == 'false' }} | ||
run: | | ||
git config --global user.email ${{ secrets.GH_EMAIL }} | ||
git config --global user.name ${{ secrets.GH_USERNAME }} | ||
- name: Generate oclif README | ||
if: ${{ steps.version-check.outputs.skipped == 'false' }} | ||
id: oclif-readme | ||
run: | | ||
pnpm install | ||
pnpm exec oclif readme | ||
if [ -n "$(git status --porcelain)" ]; then | ||
git add . | ||
git commit -am "chore: update README.md" | ||
git push -u origin ${{ github.ref_name }} | ||
fi | ||
- name: Create Github Release | ||
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 | ||
if: ${{ steps.version-check.outputs.skipped == 'false' }} | ||
with: | ||
name: ${{ steps.version-check.outputs.tag }} | ||
tag: ${{ steps.version-check.outputs.tag }} | ||
commit: ${{ github.ref_name }} | ||
token: ${{ secrets.GH_TOKEN }} | ||
skipIfReleaseExists: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: publish | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: latest | ||
- run: pnpm install | ||
- uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: tests | ||
on: | ||
push: | ||
branches-ignore: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
unit-tests: | ||
strategy: | ||
matrix: | ||
os: ['ubuntu-latest', 'windows-latest'] | ||
node_version: [lts/-1, lts/*, latest] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
cache: pnpm | ||
- run: pnpm install | ||
- run: pnpm run build | ||
- run: pnpm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
*-debug.log | ||
*-error.log | ||
**/.DS_Store | ||
/.idea | ||
/dist | ||
/tmp | ||
/node_modules | ||
oclif.manifest.json | ||
|
||
|
||
yarn.lock | ||
package-lock.json | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"require": [ | ||
"ts-node/register" | ||
], | ||
"watch-extensions": [ | ||
"ts" | ||
], | ||
"recursive": true, | ||
"reporter": "spec", | ||
"timeout": 60000, | ||
"node-option": [ | ||
"loader=ts-node/esm", | ||
"experimental-specifier-resolution=node" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"@oclif/prettier-config" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "attach", | ||
"name": "Attach", | ||
"port": 9229, | ||
"skipFiles": ["<node_internals>/**"] | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Execute Command", | ||
"skipFiles": ["<node_internals>/**"], | ||
"runtimeExecutable": "node", | ||
"runtimeArgs": ["--loader", "ts-node/esm", "--no-warnings=ExperimentalWarning"], | ||
"program": "${workspaceFolder}/bin/dev.js", | ||
"args": ["hello", "world"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
bluebird | ||
================= | ||
|
||
send bluesky firehose to tinybird | ||
|
||
|
||
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) | ||
[![Version](https://img.shields.io/npm/v/bluebird.svg)](https://npmjs.org/package/bluebird) | ||
[![Downloads/week](https://img.shields.io/npm/dw/bluebird.svg)](https://npmjs.org/package/bluebird) | ||
|
||
|
||
<!-- toc --> | ||
- [bluebird](#bluebird) | ||
- [Usage](#usage) | ||
- [Commands](#commands) | ||
- [`bluebird start`](#bluebird-start) | ||
<!-- tocstop --> | ||
# Usage | ||
<!-- usage --> | ||
```sh-session | ||
$ npm install -g bluebird | ||
$ bluebird COMMAND | ||
running command... | ||
$ bluebird (--version) | ||
bluebird/0.0.0 darwin-arm64 node-v20.17.0 | ||
$ bluebird --help [COMMAND] | ||
USAGE | ||
$ bluebird COMMAND | ||
... | ||
``` | ||
<!-- usagestop --> | ||
# Commands | ||
<!-- commands --> | ||
- [bluebird](#bluebird) | ||
- [Usage](#usage) | ||
- [Commands](#commands) | ||
- [`bluebird start`](#bluebird-start) | ||
|
||
## `bluebird start` | ||
|
||
start the firehose | ||
|
||
``` | ||
USAGE | ||
$ bluebird start | ||
FLAGS | ||
--tinybird_token=<value> (required) Tinybird token | ||
--tinybird_endpoint=<value> (required) Tinybird endpoint | ||
--tinybird_datasource=<value> (required) Tinybird datasource | ||
DESCRIPTION | ||
start the firehose | ||
EXAMPLES | ||
$ bluebird start --tinybird_token=... --tinybird_endpoint=... --tinybird_datasource=... | ||
``` | ||
|
||
_See code: [src/commands/start/index.ts](https://github.com/bsky_to_tinybird/bluebird/blob/v0.0.0/src/commands/start/index.ts)_ | ||
<!-- commandsstop --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
|
||
node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env -S node --loader ts-node/esm --disable-warning=ExperimentalWarning | ||
|
||
// eslint-disable-next-line n/shebang | ||
import {execute} from '@oclif/core' | ||
|
||
await execute({development: true, dir: import.meta.url}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
|
||
node "%~dp0\run" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env node | ||
|
||
import {execute} from '@oclif/core' | ||
|
||
await execute({dir: import.meta.url}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"name": "bluebird", | ||
"description": "send bluesky firehose to tinybird", | ||
"version": "0.0.0", | ||
"author": "al", | ||
"bin": { | ||
"bluebird": "./bin/run.js" | ||
}, | ||
"bugs": "https://github.com/bsky_to_tinybird/bluebird/issues", | ||
"dependencies": { | ||
"@oclif/core": "^4", | ||
"@oclif/plugin-help": "^6", | ||
"@oclif/plugin-plugins": "^5", | ||
"@atproto/api": "^0.13.4", | ||
"@atproto/common": "^0.4.1", | ||
"@atproto/identity": "^0.4.0", | ||
"@atproto/lexicon": "^0.4.2", | ||
"@atproto/oauth-client-node": "^0.1.0", | ||
"@atproto/sync": "^0.1.4", | ||
"@atproto/syntax": "^0.3.0", | ||
"@atproto/xrpc-server": "^0.6.3" | ||
}, | ||
"devDependencies": { | ||
"@oclif/prettier-config": "^0.2.1", | ||
"@oclif/test": "^4", | ||
"@types/chai": "^4", | ||
"@types/mocha": "^10", | ||
"@types/node": "^18", | ||
"chai": "^4", | ||
"eslint": "^8", | ||
"eslint-config-oclif": "^5", | ||
"eslint-config-oclif-typescript": "^3", | ||
"eslint-config-prettier": "^9", | ||
"mocha": "^10", | ||
"oclif": "^4", | ||
"shx": "^0.3.3", | ||
"ts-node": "^10", | ||
"typescript": "^5" | ||
}, | ||
"engines": { | ||
"node": ">=18.0.0" | ||
}, | ||
"files": [ | ||
"/bin", | ||
"/dist", | ||
"/oclif.manifest.json" | ||
], | ||
"homepage": "https://github.com/bsky_to_tinybird/bluebird", | ||
"keywords": [ | ||
"oclif" | ||
], | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"type": "module", | ||
"oclif": { | ||
"bin": "bluebird", | ||
"dirname": "bluebird", | ||
"commands": "./dist/commands", | ||
"plugins": [ | ||
"@oclif/plugin-help", | ||
"@oclif/plugin-plugins" | ||
], | ||
"topicSeparator": " ", | ||
"topics": { | ||
"hello": { | ||
"description": "Say hello to the world and others" | ||
} | ||
} | ||
}, | ||
"repository": "bsky_to_tinybird/bluebird", | ||
"scripts": { | ||
"build": "shx rm -rf dist && tsc -b", | ||
"lint": "eslint . --ext .ts", | ||
"postpack": "shx rm -f oclif.manifest.json", | ||
"posttest": "pnpm run lint", | ||
"prepack": "oclif manifest && oclif readme", | ||
"test": "mocha --forbid-only \"test/**/*.test.ts\"", | ||
"version": "oclif readme && git add README.md" | ||
}, | ||
"types": "dist/index.d.ts" | ||
} |
Oops, something went wrong.