diff --git a/.gitea.env.example b/.gitea.env.example index ad48a67..ab74007 100644 --- a/.gitea.env.example +++ b/.gitea.env.example @@ -1,2 +1,17 @@ #!/bin/bash -export GITEA_AUTH_TOKEN= \ No newline at end of file + +REGISTRY_1_USER="user" +REGISTRY_1_DOMAIN="domain.com" +REGISTRY_1_GITEA_AUTH="0000000000000000000000000000000000000000" + +REGISTRY_2_USER= +REGISTRY_2_DOMAIN= +REGISTRY_2_GITEA_AUTH= + +# And so on... + +# And then you set it, example: + +export TARGET_REGISTRY_USER=$REGISTRY_1_USER +export TARGET_REGISTRY_DOMAIN=$REGISTRY_1_DOMAIN +export GITEA_AUTH_TOKEN=$REGISTRY_1_GITEA_AUTH \ No newline at end of file diff --git a/README.md b/README.md index dd73292..e0b0c26 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,14 @@ The guide to installing and configuring NPM and Yarn V3 follows. ## Short `npm` solution ```bash -# Replace T-Hax with tornadocash if the packages (in future) are under the org -# This should be updated manually though -# For any package add into your .npmrc +# Add into your .npmrc +@tornado:registry=https://git.tornado.ws/api/packages/tornado-packages/npm/ +``` + +or + +```bash +# Add into your .npmrc @tornado:registry=https://development.tornadocash.community/api/packages/T-Hax/npm/ ``` diff --git a/TLDR.md b/TLDR.md index 129457f..6273b3f 100644 --- a/TLDR.md +++ b/TLDR.md @@ -1,9 +1,14 @@ repeating the short npm solution -```yaml -# For any package add into your .npmrc -# Replace T-Hax with tornadocash if the packages (in future) are under the org -# This should be updated manually though +```bash +# Add into your .npmrc +@tornado:registry=https://git.tornado.ws/api/packages/tornado-packages/npm/ +``` + +or + +```bash +# Add into your .npmrc @tornado:registry=https://development.tornadocash.community/api/packages/T-Hax/npm/ ``` diff --git a/yarnrc.yml b/yarnrc.yml index 8b17868..e7fabf8 100644 --- a/yarnrc.yml +++ b/yarnrc.yml @@ -1,21 +1,18 @@ # So basically, we want to selectively download packages from the Gitea repository but still allow the # main repositories, so we are going to have to scope our packages properly. npmScopes: + # @tornado, the scope by which the following registries are selected tornado: - # The @tornado scope can just be set to the right registry by editing the "T-Hax" here. - # I could even make it an env var but it seems too much, env is better for secrets. - npmPublishRegistry: "https://development.tornadocash.community/api/packages/T-Hax/npm/" - npmRegistryServer: "https://development.tornadocash.community/api/packages/T-Hax/npm/" + # Since our repos are across multiple registries we select them via the .env we `source`. + # Check .env.example + npmRegistryServer: https://${TARGET_REGISTRY_DOMAIN}/api/packages/${TARGET_REGISTRY_USER}/npm/ + npmPublishRegistry: https://${TARGET_REGISTRY_DOMAIN}/api/packages/${TARGET_REGISTRY_USER}/npm/ + npmAuthToken: ${GITEA_AUTH_TOKEN} - # The below can be EXPORTED via some env file which actually exports the variables though - # Check the env.example, you will notice it's not a regular env - # So split your env files up, since this is only for manual actions - # npmAuthToken: ${GITEA_AUTH_TOKEN} - -# If the following isn't set you won't have a node_modules folder -# You might be used to a node_modules folder instead of a pnp or other folder type +# If the following isn't set you won't have a node_modules folder, and will be using pnp instead +# You might be used to a node_modules folder instead of a pnp or other linker type # If you want to use the new linkers uncomment or change the following nodeLinker: "node-modules" -# We disable telemetry for obvious reasons. +# We disable telemetry for obvious reasons. enableTelemetry: false enableTelemetry: false \ No newline at end of file