-
Notifications
You must be signed in to change notification settings - Fork 169
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
1 parent
9c5a2f8
commit bdbc09a
Showing
10 changed files
with
296 additions
and
5 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,5 @@ | ||
--- | ||
"create-lz-oapp": patch | ||
--- | ||
|
||
Add --version flag |
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ docker-*.yaml | |
.gitignore | ||
|
||
# CI/CD files | ||
.changeset | ||
.changeset/*.md | ||
.github | ||
.husky | ||
.turbo | ||
|
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
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
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,84 @@ | ||
# .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.- | ||
# / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ | ||
# `-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' | ||
# | ||
# Docker compose for exposed test networks | ||
# | ||
# .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.- | ||
# / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ | ||
# `-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' | ||
version: "3.9" | ||
|
||
services: | ||
# ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~ | ||
# | ||
# Provides a local NPM registry | ||
# | ||
# .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo. | ||
npm-registry: | ||
image: verdaccio/verdaccio | ||
ports: | ||
- "4873:4873" | ||
# This works in conjunction with the auth setting in uplinks section of verdaccio config | ||
# | ||
# We need this to support download of any provate packages we might need | ||
environment: | ||
- NPM_TOKEN=${NPM_TOKEN} | ||
healthcheck: | ||
interval: 2s | ||
retries: 10 | ||
test: ["CMD", "wget", "--output-document", "--tries=1", "--no-verbose", "--spider", "http://0.0.0.0:4873/-/ping"] | ||
stop_grace_period: 120s | ||
volumes: | ||
- ./verdaccio.yaml:/verdaccio/conf/config.yaml | ||
|
||
# ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~ | ||
# | ||
# Publishes all packages to the local repository | ||
# | ||
# .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo. | ||
publish: | ||
extends: | ||
file: docker-compose.templates.yaml | ||
service: project | ||
depends_on: | ||
- npm-registry | ||
# Here we build and publish all the packages locally, | ||
# including any pending changesets. | ||
# | ||
# Even though we enabled anonymous publishing in verdaccio, | ||
# we need to specify some sort of an auth token | ||
# since we are trying to publish scoped packages. This can be anything, | ||
# any non-empty string will do | ||
command: | ||
- /bin/bash | ||
- -c | ||
- | | ||
pnpm config set registry http://npm-registry:4873/ | ||
pnpm config set //npm-registry:4873/:_authToken MOCK_TOKEN | ||
pnpm build | ||
pnpm release:version | ||
pnpm release:publish | ||
# ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~ | ||
# | ||
# Runs user tests | ||
# | ||
# .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo. | ||
tests: | ||
build: | ||
context: . | ||
target: base | ||
depends_on: | ||
publish: | ||
condition: service_completed_successfully | ||
command: | ||
- /bin/bash | ||
- -c | ||
- | | ||
pnpm config set registry http://npm-registry:4873/ | ||
./tests-user/create-lz-oapp.sh | ||
volumes: | ||
- ./tests-user:/tests-user | ||
|
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
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
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
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 @@ | ||
#!/bin/bash | ||
|
||
# This is a PoC test for create-lz-oapp | ||
echo "Checking version of create-lz-oapp" | ||
npx --yes create-lz-oapp --version |
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,92 @@ | ||
# .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.- | ||
# / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ | ||
# `-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' | ||
# | ||
# Configuration of a local NPM registry for testing | ||
# | ||
# .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.- | ||
# / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ | ||
# `-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' | ||
|
||
storage: /verdaccio/storage/data | ||
plugins: /verdaccio/plugins | ||
|
||
# https://verdaccio.org/docs/webui | ||
web: | ||
title: LayerZero.NPM | ||
darkMode: true | ||
showFooter: false | ||
showSettings: false | ||
showThemeSwitch: false | ||
favicon: https://layerzero.network/favicon-32x32.png | ||
primary_color: "#a77dff" | ||
logo: https://avatars.githubusercontent.com/u/90789833?s=200&v=4 | ||
|
||
# https://verdaccio.org/docs/configuration#authentication | ||
auth: | ||
htpasswd: | ||
file: /verdaccio/storage/htpasswd | ||
algorithm: bcrypt | ||
max_users: 1000 | ||
|
||
# https://verdaccio.org/docs/configuration#uplinks | ||
uplinks: | ||
npmjs: | ||
url: https://registry.npmjs.org/ | ||
# We pass the NPM_TOKEN to the upstream repository in case we want to access any private packages | ||
# | ||
# TODO As soon as all the packages are public, we can remove this | ||
auth: | ||
type: bearer | ||
token_env: true | ||
|
||
# https://verdaccio.org/docs/protect-your-dependencies/ | ||
# https://verdaccio.org/docs/configuration#packages | ||
packages: | ||
# | ||
# We will not proxy the packages from this repo | ||
# | ||
# Since we want to proxy some of the NPM packages, | ||
# we cannot just use a pattern like "@layerzerolabs/*" | ||
# | ||
|
||
# We will not proxy any *devtools* packages | ||
"@layerzerolabs/**devtools**": &local-package-rules | ||
access: $all | ||
|
||
# allow all known users to publish/publish packages | ||
# | ||
# this does not mean that anyone can publish to NPM | ||
# (in fact verdaccio will not publish to NPM ever), | ||
# this just means we don't need to be authenticated to the local registry | ||
# in order to publish packages | ||
publish: $all | ||
unpublish: $all | ||
|
||
# We will not proxy any toolbox* packages | ||
"@layerzerolabs/toolbox-**": *local-package-rules | ||
|
||
# And we will not proxy create-lz-oapp | ||
"create-lz-oapp": *local-package-rules | ||
|
||
# The rest of the packages we'll proxy to the public NPM repo | ||
"**": | ||
<<: *local-package-rules | ||
|
||
# if package is not available locally, proxy requests to 'npmjs' registry | ||
proxy: npmjs | ||
|
||
# https://verdaccio.org/docs/configuration#server | ||
server: | ||
keepAliveTimeout: 60 | ||
|
||
# https://verdaccio.org/docs/configuration#offline-publish | ||
publish: | ||
allow_offline: true | ||
|
||
middlewares: | ||
audit: | ||
enabled: true | ||
|
||
# https://verdaccio.org/docs/logger | ||
log: { type: stdout, format: pretty, level: http } |