Skip to content

Commit

Permalink
Merge branch 'master' into Protobuff
Browse files Browse the repository at this point in the history
  • Loading branch information
rileystephens28 committed Mar 11, 2024
2 parents ba06524 + 2912691 commit 8744106
Show file tree
Hide file tree
Showing 11 changed files with 246 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate Documentation
## name: Generate Documentation

on:
push:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions .github/workflows/branch-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Auto Version Branch Workflow
on:
pull_request:
types: [closed]
branches:
- 'v?[0-9]+.[0-9]+'
jobs:
call-common-workflow:
uses: dominant-strategies/quai-cicd/.github/workflows/deploy-sandbox-common.yml@main
with:
needs_build: true
install_command: "npm ci"
build_command": "npm run build-clean"
cloud_deploy: false
skip_deploy: true
update_version: false
needs_docker: false
include_chart: false
secrets:
GH_PAT: ${{ secrets.GH_PAT }}
BUILD_ARGS: ''
26 changes: 26 additions & 0 deletions .github/workflows/cut-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Cut Release
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to use'
required: true
default: 'master'
jobs:
call-common-workflow:
uses: dominant-strategies/quai-cicd/.github/workflows/cut-release-common.yml@main
with:
branch: ${{ github.event.inputs.branch }}
needs_build: true
needs_docker: false
install_command: "npm ci"
build_command: "npm run build-clean"
cloud_deploy: false
skip_deploy: true
update_version: true
include_chart: false
secrets:
GH_PAT: ${{ secrets.GH_PAT }}
BUILD_ARGS: ''
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY2 }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
20 changes: 20 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Auto Dev Workflow
on:
pull_request:
types: [closed]
branches: [ "master" ]
jobs:
call-common-workflow:
uses: dominant-strategies/quai-cicd/.github/workflows/deploy-dev-common.yml@main
with:
needs_build: true
install_command: "npm ci"
build_command: "npm run build-clean"
cloud_deploy: false
skip_deploy: true
update_version: false
needs_docker: false
include_chart: false
secrets:
GH_PAT: ${{ secrets.GH_PAT }}
BUILD_ARGS: ''
20 changes: 20 additions & 0 deletions .github/workflows/patch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy to Garden
on: workflow_dispatch
jobs:
call-common-workflow:
uses: dominant-strategies/quai-cicd/.github/workflows/deploy-sandbox-common.yml@main
with:
needs_build: true
needs_docker: false
install_command: "npm ci"
build_command: "npm run build-clean"
cloud_deploy: false
skip_deploy: true
update_version: true
include_chart: false
secrets:
GH_PAT: ${{ secrets.GH_PAT }}
BUILD_ARGS: ''
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY2 }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GH_GCP_TOKEN: ${{ secrets.GH_GCP_TOKEN }}
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,65 @@ The bundled library is available in the `./dist/` folder in this repo.
</script>
```

### Using Local Version as Dependency in Other Projects

For developers looking to contribute to quais or integrate it into their projects with local modifications, setting up a local development environment is essential. This section guides you through the process of building quais and linking it to another project on your machine using npm link.

**Prepare quais for Symbolic Linking**

1. Clone the quais repository and navigate into it.

```bash
git clone https://github.com/dominant-strategies/quais-6.js.git
cd quais-6.js
```

2. Install dependencies.

``` bash
npm install
```

3. Create a global symbolic link for quais. This makes the quais package available to link in any other project. Whenever a local change is made to quais that you want to test in another project, you must run this command again to update the symbolic link.

```bash
npm run update-symlink
```

_Caution - The `update-symlink` command updates the globally available symbolic link to the build of the current branch you are on when the command is run. This can potentially lead to incompatible version usage if quais is linked to multiple projects locally._

**Linking quais to Another Project**

After setting up quais for local development, you can link it to another project to test changes or develop features that depend on quais.

1. Navigate to your project.
```bash
cd path/to/your/project
```
2. Link the globally linked quais package to your project. This replaces the npm-installed quais package with the symlinked version.
```bash
npm link quais
```
3. Build your project: Depending on your project's setup, you may need to rebuild it to ensure that the linked quais library is correctly integrated.
npm run build
**Testing Changes**
With quais linked to your project, any changes made to the quais library can be immediately tested within the context of your project. Remember to rebuild quais (`npm run update-symlink`) after making changes to ensure they are reflected in your project.
**Reverting to the Published Package**
If you need to revert back to the official quais package published on npm, you can unlink quais and reinstall the package.
1. Unlink quais by removing the symlink.
```bash
npm unlink quais
```
2. Reinstall quais: Install the quais package from npm to use the published version.
```bash
npm install quais
```
## Documentation
Browse the [documentation](https://docs.quais.org) online:
Expand Down
95 changes: 93 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@noble/hashes": "1.3.2",
"@types/node": "18.15.13",
"aes-js": "4.0.0-beta.5",
"axios": "^1.6.7",
"dotenv": "^16.4.1",
"google-protobuf": "^3.21.2",
"tslib": "2.4.0",
Expand Down Expand Up @@ -85,7 +86,7 @@
"default": "./lib.commonjs/wordlists/index.js"
}
},
"gitHead": "f3e4f59d2e076da4483e1c45a54d728972b59066",
"gitHead": "3bd0bf5b077f4aa5fab480474e3982e50e1af506",
"homepage": "https://qu.ai",
"keywords": [
"quainetwork",
Expand All @@ -110,10 +111,11 @@
"auto-build": "npm run build -- -w",
"build": "tsc --project tsconfig.esm.json",
"build-all": "npm run build && npm run build-commonjs",
"build-clean": "npm run clean && npm run build && node lib.esm/_admin/update-version.js && node lib.esm/_admin/update-changelog.js && npm run build-all && npm run _build-dist && npm run _dist-stats",
"build-clean": "npm run clean && npm run build && npm run build-all && npm run _build-dist && npm run _dist-stats",
"build-commonjs": "tsc --project tsconfig.commonjs.json",
"build-dist": "npm run build && npm run _build-dist && npm run _dist-stats",
"clean": "rm -rf dist lib.esm lib.commonjs && cp -r misc/basedirs/* .",
"update-symlink": "npm run clean && npm run build-all && npm rm -g quais-6 -g && npm link",
"postpublish": "node lib.esm/_admin/create-release.js",
"stats": "echo 'Dependencies' && npm ls --all --omit=dev",
"test": "npm run test-esm",
Expand All @@ -123,5 +125,5 @@
"test-esm": "mocha --trace-warnings --reporter ./reporter.cjs ./lib.esm/_tests/test-*.js"
},
"sideEffects": false,
"version": "0.0.1"
}
"version": "v0.1.0-pre"
}

0 comments on commit 8744106

Please sign in to comment.