Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
feat: Revert migration (#556)
Browse files Browse the repository at this point in the history
* Revert "feat: WNS migration (#546)"

17a5b88

* Update SDK - with reverted migration
  • Loading branch information
rzadp authored Feb 3, 2021
1 parent c104054 commit 0f1d6f2
Show file tree
Hide file tree
Showing 17 changed files with 96 additions and 96 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/beta-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Build and Registry publish
- name: Build and WNS publish
run: |
git config --global user.email "[email protected]"
git config --global user.name "DXOS"
Expand All @@ -38,13 +38,13 @@ jobs:
git push --tags -f
yarn lerna publish from-package --force-publish -y
# Publish to Registry
yarn dx profile init --name $DX_PROFILE --template-url "$DX_PROFILE_URL"
# Publish to WNS
yarn wire profile init --name $WIRE_PROFILE --template-url "$WIRE_PROFILE_URL"
export PKG_CHANNEL="@beta"
scripts/deploy_apps_to_registry.sh
scripts/deploy_apps_to_wns.sh
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
DX_REGISTRY_USER_KEY: ${{secrets.registry_user_key}}
DX_REGISTRY_BOND_ID: ${{secrets.registry_bond_id}}
DX_PROFILE_URL: ${{secrets.dx_profile_url}}
DX_PROFILE: ci
WIRE_WNS_USER_KEY: ${{secrets.wns_user_key}}
WIRE_WNS_BOND_ID: ${{secrets.wns_bond_id}}
WIRE_PROFILE_URL: ${{secrets.wire_profile_url}}
WIRE_PROFILE: ci
16 changes: 8 additions & 8 deletions .github/workflows/main-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Build and REGISTRY publish
- name: Build and WNS publish
run: |
git config --global user.email "[email protected]"
git config --global user.name "DXOS"
Expand All @@ -33,13 +33,13 @@ jobs:
npm whoami
yarn lerna publish -y prerelease --dist-tag="alpha" --force-publish
# Publish to REGISTRY
yarn dx profile init --name $DX_PROFILE --template-url "$DX_PROFILE_URL"
# Publish to WNS
yarn wire profile init --name $WIRE_PROFILE --template-url "$WIRE_PROFILE_URL"
export PKG_CHANNEL="@alpha"
scripts/deploy_apps_to_registry.sh
scripts/deploy_apps_to_wns.sh
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
DX_REGISTRY_USER_KEY: ${{secrets.registry_user_key}}
DX_REGISTRY_BOND_ID: ${{secrets.registry_bond_id}}
DX_PROFILE_URL: ${{secrets.dx_profile_url}}
DX_PROFILE: ci
WIRE_WNS_USER_KEY: ${{secrets.wns_user_key}}
WIRE_WNS_BOND_ID: ${{secrets.wns_bond_id}}
WIRE_PROFILE_URL: ${{secrets.wire_profile_url}}
WIRE_PROFILE: ci
16 changes: 8 additions & 8 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Build and REGISTRY publish
- name: Build and WNS publish
run: |
git config --global user.email "[email protected]"
git config --global user.name "DXOS"
Expand All @@ -39,12 +39,12 @@ jobs:
git push --tags -f
yarn lerna publish from-package --force-publish -y
# Publish to REGISTRY
yarn dx profile init --name $DX_PROFILE --template-url "$DX_PROFILE_URL"
scripts/deploy_apps_to_registry.sh
# Publish to WNS
yarn wire profile init --name $WIRE_PROFILE --template-url "$WIRE_PROFILE_URL"
scripts/deploy_apps_to_wns.sh
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
DX_REGISTRY_USER_KEY: ${{secrets.registry_user_key}}
DX_REGISTRY_BOND_ID: ${{secrets.registry_bond_id}}
DX_PROFILE_URL: ${{secrets.dx_profile_url}}
DX_PROFILE: ci
WIRE_WNS_USER_KEY: ${{secrets.wns_user_key}}
WIRE_WNS_BOND_ID: ${{secrets.wns_bond_id}}
WIRE_PROFILE_URL: ${{secrets.wire_profile_url}}
WIRE_PROFILE: ci
10 changes: 5 additions & 5 deletions apps/teamwork-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ Each build will be targeted for a specific public url or deploy path. The env va
PUBLIC_URL=/teamwork yarn webpack -p
```

Then we can publish the dist folder using the `dx app` cli.
Then we can publish the dist folder using the `wire app` cli.

```
yarn dx app publish
yarn wire app publish
```

Register the version on the Registry
Register the version on the WNS

```
yarn dx register
yarn wire register
```

And finally test locally:

```
yarn dx app serve --app dxn:app:dxos.org/teamwork --path /teamwork
yarn wire app serve --app wrn:app:DXOS.io/teamwork --path /teamwork
```
4 changes: 2 additions & 2 deletions apps/teamwork-app/config/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#
# This config file is loadded **ONLY** in local development.
# It will be replaced by a config/config.json request when served with dx app serve.
# It will be replaced by a config/config.json request when served with wire app serve.
#

app:
name: Teamwork
storage:
persistent: true
path: dxos/teamwork-local
registry:
wns:
server: "https://apollo1.kube.moon.dxos.network/dxos/wns/api"
chainId: "devnet-2"
sentry:
Expand Down
2 changes: 1 addition & 1 deletion apps/teamwork-app/config/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ swarm:
- urls: "turn:apollo2.kube.moon.dxos.network:3478"
username: "dxos"
credential: "dxos"
registry:
wns:
server: "https://apollo1.kube.moon.dxos.network/dxos/wns/api"
chainId: "devnet-2"
ipfs:
Expand Down
10 changes: 5 additions & 5 deletions apps/teamwork-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"@date-io/moment": "^1.3.11",
"@dxos/async": "~1.0.0-beta.10",
"@dxos/botkit-client": "~2.8.0",
"@dxos/botkit-client": "~2.9.0",
"@dxos/canvas-pad": "^1.2.0-alpha.67",
"@dxos/config": "~1.0.0-beta.74",
"@dxos/credentials": "~2.1.16-alpha.0",
Expand All @@ -41,10 +41,10 @@
"@dxos/messenger-pad": "^1.2.0-alpha.67",
"@dxos/planner-pad": "^1.2.0-alpha.67",
"@dxos/random-access-multi-storage": "~1.1.0-beta.8",
"@dxos/react-appkit": "~2.8.0",
"@dxos/react-client": "~2.8.0",
"@dxos/react-router": "~2.8.0",
"@dxos/react-ux": "~2.8.0",
"@dxos/react-appkit": "~2.9.0",
"@dxos/react-client": "~2.9.0",
"@dxos/react-router": "~2.9.0",
"@dxos/react-ux": "~2.9.0",
"@dxos/registry-client": "~1.1.1",
"@dxos/table-pad": "^1.2.0-alpha.67",
"@dxos/tasks-pad": "^1.2.0-alpha.67",
Expand Down
12 changes: 6 additions & 6 deletions apps/teamwork-app/scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/sh

# Ensure ~/.dxos/config.yml is set-up correctly.
# Ensure ~/.wireline/config.yml is set-up correctly.

set -x

yarn dx app build
yarn dx app publish
yarn dx app register
yarn wire app build
yarn wire app publish
yarn wire app register

yarn dx app query --name DXOS.io/teamwork
yarn wire app query --name DXOS.io/teamwork

yarn run dx app serve --app dxn:app:dxos.org/teamwork --path /teamwork --port 8080
yarn run wire app serve --app wrn:app:DXOS.io/teamwork --path /teamwork --port 8080
2 changes: 1 addition & 1 deletion models/messenger-model/src/messenger-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Message, schema } from './proto';

export class MessengerModel extends Model<Message> {
static meta: ModelMeta = {
type: 'dxn://protocol.dxos.org/teamwork/messenger',
type: 'wrn://protocol.dxos.org/teamwork/messenger',
mutation: schema.getCodecForType('dxos.teamwork.messenger.Message')
};

Expand Down
2 changes: 1 addition & 1 deletion pads/canvas-pad/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@dxos/async": "~1.0.0-beta.10",
"@dxos/debug": "~1.0.0-beta.75",
"@dxos/gem-canvas": "~1.0.0-beta.26",
"@dxos/react-ux": "~2.8.0",
"@dxos/react-ux": "~2.9.0",
"clsx": "^1.1.0",
"debug": "^4.2.0",
"react": "^16.13.1",
Expand Down
4 changes: 2 additions & 2 deletions pads/messenger-pad/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"@dxos/editor": "~1.0.0-beta.34",
"@dxos/messenger-model": "^1.2.0-alpha.67",
"@dxos/model-adapter": "~2.6.11-alpha.0",
"@dxos/react-router": "~2.8.0",
"@dxos/react-ux": "~2.8.0",
"@dxos/react-router": "~2.9.0",
"@dxos/react-ux": "~2.9.0",
"@geut/discovery-swarm-webrtc": "^4.0.2",
"@material-ui/lab": "^4.0.0-alpha.55",
"@material-ui/pickers": "^3.2.10",
Expand Down
4 changes: 2 additions & 2 deletions pads/planner-pad/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"@date-io/moment": "^1.3.11",
"@dxos/async": "~1.0.0-beta.10",
"@dxos/debug": "~1.0.0-beta.75",
"@dxos/react-router": "~2.8.0",
"@dxos/react-ux": "~2.8.0",
"@dxos/react-router": "~2.9.0",
"@dxos/react-ux": "~2.9.0",
"@material-ui/lab": "^4.0.0-alpha.55",
"@material-ui/pickers": "^3.2.10",
"@material-ui/styles": "^4.9.0",
Expand Down
4 changes: 2 additions & 2 deletions pads/table-pad/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"@dxos/debug": "~1.0.0-beta.75",
"@dxos/gem-spore": "~1.0.0-beta.26",
"@dxos/object-model": "~2.6.22",
"@dxos/react-router": "~2.8.0",
"@dxos/react-ux": "~2.8.0",
"@dxos/react-router": "~2.9.0",
"@dxos/react-ux": "~2.9.0",
"@material-ui/data-grid": "~4.0.0-alpha.14",
"@material-ui/lab": "^4.0.0-alpha.55",
"@material-ui/pickers": "^3.2.10",
Expand Down
4 changes: 2 additions & 2 deletions pads/tasks-pad/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"@dxos/async": "~1.0.0-beta.10",
"@dxos/debug": "~1.0.0-beta.75",
"@dxos/object-model": "~2.6.22",
"@dxos/react-router": "~2.8.0",
"@dxos/react-ux": "~2.8.0",
"@dxos/react-router": "~2.9.0",
"@dxos/react-ux": "~2.9.0",
"@material-ui/lab": "^4.0.0-alpha.55",
"@material-ui/pickers": "^3.2.10",
"@material-ui/styles": "^4.9.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ set -euo pipefail
for appdir in `find ./apps -name '*-app' -type d | grep -v node_modules`; do
pushd $appdir

REGISTRY_ORG="${REGISTRY_ORG:-dxos}"
WNS_ORG="${WNS_ORG:-dxos}"
PKG_CHANNEL="${PKG_CHANNEL:-}"
PKG_NAME=`cat package.json | jq -r '.name' | cut -d'/' -f2- | sed 's/-app$//'`
REGISTRY_NAME="$REGISTRY_ORG/$PKG_NAME"
WNS_NAME="$WNS_ORG/$PKG_NAME"

cat <<EOF > app.yml
name: $PKG_NAME
build: yarn dist
EOF

cat app.yml
echo "dxn://${REGISTRY_ORG}/application/${PKG_NAME}${PKG_CHANNEL}"
echo "wrn://${WNS_ORG}/application/${PKG_NAME}${PKG_CHANNEL}"

yarn -s dx app deploy --name "dxn://${REGISTRY_ORG}/application/${PKG_NAME}${PKG_CHANNEL}"
yarn -s wire app deploy --name "wrn://${WNS_ORG}/application/${PKG_NAME}${PKG_CHANNEL}"

popd
done
8 changes: 4 additions & 4 deletions storybooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"@dxos/crypto": "~1.0.7",
"@dxos/echo-db": "~2.6.22",
"@dxos/eslint-plugin": "~1.0.10",
"@dxos/react-appkit": "~2.8.0",
"@dxos/react-client": "~2.8.0",
"@dxos/react-router": "~2.8.0",
"@dxos/react-ux": "~2.8.0",
"@dxos/react-appkit": "~2.9.0",
"@dxos/react-client": "~2.9.0",
"@dxos/react-router": "~2.9.0",
"@dxos/react-ux": "~2.9.0",
"@storybook/addon-knobs": "^6.1.14",
"@storybook/react": "^6.1.14",
"faker": "^4.1.0"
Expand Down
Loading

0 comments on commit 0f1d6f2

Please sign in to comment.