Skip to content

Commit 8930d3a

Browse files
committed
Initial Commit
0 parents  commit 8930d3a

23 files changed

+4400
-0
lines changed

.changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.env.example

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
WALLET=''
2+
PL_REPO_ID=''
3+
FORCE_PUSH=''
4+
GH_REPO_NAME=""

.github/workflows/main.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: pnpm/action-setup@v2
13+
with:
14+
version: 7
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: 18.x
18+
cache: 'pnpm'
19+
20+
- run: pnpm install --no-frozen-lockfile
21+
- run: pnpm lint && pnpm run build

.github/workflows/publish.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish
2+
on:
3+
workflow_run:
4+
workflows: ['CI']
5+
types:
6+
- completed
7+
branches:
8+
- main
9+
10+
concurrency: ${{ github.workflow }}-${{ github.ref }}
11+
12+
jobs:
13+
publish:
14+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: pnpm/action-setup@v2
19+
with:
20+
version: 7
21+
- uses: actions/setup-node@v3
22+
with:
23+
node-version: 18.x
24+
cache: 'pnpm'
25+
26+
- run: pnpm install --no-frozen-lockfile
27+
- name: Create Release Pull Request or Publish
28+
id: changesets
29+
uses: changesets/action@v1
30+
with:
31+
publish: pnpm run release
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
bin
4+
.env

.prettierrc.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"tabWidth": 4,
3+
"useTabs": false,
4+
"singleQuote": true,
5+
"printWidth": 80,
6+
"trailingComma": "es5"
7+
}

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# protocol-land-sync-github

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Pawan Paudel
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Protocol Land Git Remote Helper
2+
3+
The Protocol Land Git Remote Helper is a git-remote-helper designed to facilitate communication and synchronization with [Protocol Land](https://protocol.land/) repositories.
4+
5+
## Requirements
6+
7+
Ensure the following dependencies are installed on your system:
8+
9+
- `git`
10+
- `node`
11+
- Choose one of the following package managers: `npm`, `yarn`, or `pnpm`
12+
13+
To manage your Node.js installation, we recommend using `nvm`, a robust node version manager.
14+
15+
## Installation
16+
17+
### Using `npm`
18+
19+
```bash
20+
npm install --global @protocol.land/git-remote-helper
21+
```
22+
23+
### Using `yarn`
24+
25+
```bash
26+
yarn global add @protocol.land/git-remote-helper
27+
```
28+
29+
### Using `pnpm`
30+
31+
```bash
32+
pnpm add --global @protocol.land/git-remote-helper
33+
```
34+
35+
## Setup Arweave Wallet Keyfile
36+
37+
To enable `git push` or gain write access to repositories, you'll need an Arweave wallet keyfile. Assuming your Arweave wallet keyfile is stored at `~/private_folder/jwk_keyfile.json`, configure the keyfile path using `git config`:
38+
39+
```bash
40+
git config --global --add protocol.land.keyfile ~/private_folder/jwk_keyfile.json
41+
```
42+
43+
> **Note:** This globally adds the keyfile path for all repositories. If you prefer to use them selectively per repository, omit the `--global` modifier in the `git config` command.
44+
45+
## Usage
46+
47+
Once the package is installed, you'll have access to the `git-remote-proland` command in your `PATH` from any working directory.
48+
49+
This command enables `git` to synchronize with [Protocol Land](https://protocol.land) repositories.
50+
51+
### Clone Repositories
52+
53+
Clone a repository using the following command:
54+
55+
```bash
56+
git clone proland://YOUR_PROTOCOL_LAND_REPO_ID repo-name
57+
```
58+
59+
For example, to clone [Protocol Land's repository](https://protocol.land/#/repository/6ace6247-d267-463d-b5bd-7e50d98c3693), run:
60+
61+
```bash
62+
git clone proland://6ace6247-d267-463d-b5bd-7e50d98c3693 protocol-land
63+
```
64+
65+
### Adding a Protocol Land Repository as a Remote
66+
67+
To link any of Protocol Land's repositories as a remote in your Git project, use the following command:
68+
69+
```bash
70+
git remote add origin proland://YOUR_PROTOCOL_LAND_REPO_ID
71+
```
72+
73+
Replace `YOUR_PROTOCOL_LAND_REPO_ID` with the specific ID of the Protocol Land repository you wish to associate with your project. This establishes a connection to the remote repository, allowing you to fetch, pull, and push changes seamlessly.

package.json

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "protocol-land-sync-github",
3+
"version": "0.0.1",
4+
"description": "Protocol Land sync github",
5+
"type": "module",
6+
"main": "dist/index.js",
7+
"types": "dist/index.d.ts",
8+
"bin": {
9+
"proland-sync-github": "dist/index.js"
10+
},
11+
"scripts": {
12+
"lint": "tsc",
13+
"build": "tsup src/index.ts --format esm",
14+
"release": "pnpm run build && changeset publish"
15+
},
16+
"keywords": [
17+
"protocol-land-sync-github",
18+
"git"
19+
],
20+
"author": "@pawanpaudel93",
21+
"license": "MIT",
22+
"publishConfig": {
23+
"access": "public"
24+
},
25+
"files": [
26+
"dist/",
27+
"package.json",
28+
"LICENSE",
29+
"README.md"
30+
],
31+
"homepage": "https://github.com/pawanpaudel93/protocol-land-sync-github#readme",
32+
"repository": {
33+
"type": "git",
34+
"url": "https://github.com/pawanpaudel93/protocol-land-sync-github.git"
35+
},
36+
"devDependencies": {
37+
"@changesets/cli": "^2.27.1",
38+
"@types/node": "^20.11.17",
39+
"tsup": "^8.0.2",
40+
"typescript": "^5.3.3"
41+
},
42+
"dependencies": {
43+
"@amplitude/analytics-node": "^1.3.5",
44+
"arweave": "^1.14.4",
45+
"dotenv": "^16.4.2",
46+
"jszip": "^3.10.1",
47+
"node-machine-id": "^1.1.12",
48+
"warp-contracts": "^1.4.34"
49+
}
50+
}

0 commit comments

Comments
 (0)