Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update JS Implementation & Aggregator to Wrapscan.io URIs #27

Merged
merged 2 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/aggregator-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
- name: Deploy
run: yarn deploy
working-directory: ./aggregator
env:
POLYWRAP_WRAPSCAN_AUTH_HEADER_PROD: ${{secrets.POLYWRAP_WRAPSCAN_AUTH_HEADER_PROD}}

- name: PR New URI
uses: peter-evans/create-pull-request@v3
Expand Down
2 changes: 1 addition & 1 deletion aggregator/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v17.9.1
v18.15
5 changes: 5 additions & 0 deletions aggregator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# The Logging Wrap
The logging wrap is a simple dispatcher of messages, with pre-defined level of importance (debug, info, warn, error). Messages are forwarded to all implementations of the [`wrapscan.io/polywrap/[email protected]`](../logger/interface/) interface. If no implementations are found, messages will simply not be forwarded.

## Support
For any questions or problems related to the Logging wrap or POlywrap at large, please visit our [Discord](https://discord.polywrap.io/).
8 changes: 4 additions & 4 deletions aggregator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"test": "jest --passWithNoTests --runInBand --verbose"
},
"devDependencies": {
"@polywrap/client-js": "0.10.0",
"@polywrap/plugin-js": "0.10.0",
"@polywrap/wasm-as": "0.10.2",
"@polywrap/client-js": "~0.12.0-pre.0",
"@polywrap/plugin-js": "~0.12.0-pre.0",
"@polywrap/wasm-as": "~0.11.0-pre.0",
"@types/jest": "26.0.8",
"polywrap": "0.10.2",
"polywrap": "~0.11.0-pre.0",
"assemblyscript": "0.19.23",
"jest": "26.6.3",
"ts-jest": "26.5.4",
Expand Down
11 changes: 10 additions & 1 deletion aggregator/polywrap.deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
format: 0.2.0
format: 0.4.0
primaryJobName: ipfs_deploy
jobs:
ipfs_deploy:
steps:
Expand All @@ -7,3 +8,11 @@ jobs:
uri: fs/./build
config:
gatewayUri: https://ipfs.wrappers.io
- name: http_deploy
package: http
uri: $$ipfs_deploy
config:
postUrl: https://wraps.wrapscan.io/r/polywrap/[email protected]
headers:
- name: Authorization
value: $POLYWRAP_WRAPSCAN_AUTH_HEADER_PROD
5 changes: 5 additions & 0 deletions aggregator/polywrap.docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
format: 0.1.0
description: A simple dispatcher of messages, with pre-defined level of importance (debug, info, warn, error).
website: https://polywrap.io
repository: https://github.com/polywrap/logging
readme: ./README.md
2 changes: 1 addition & 1 deletion aggregator/polywrap.graphql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import * into Logger from "wrap://ens/wraps.eth:logger@1.0.0"
#import * into Logger from "wrapscan.io/polywrap/[email protected]"
#use { getImplementations } for Logger

type Module {
Expand Down
9 changes: 5 additions & 4 deletions aggregator/polywrap.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
format: 0.3.0
format: 0.5.0
project:
name: logging-wrapper
name: logging
type: wasm/assemblyscript
source:
schema: ./polywrap.graphql
module: ./src/index.ts
import_abis:
- uri: wrap://ens/wraps.eth:logger@1.0.0
- uri: wrapscan.io/polywrap/[email protected]
abi: ../logger/interface/polywrap.graphql
resources: ./resources
extensions:
docs: ./polywrap.docs.yaml
51 changes: 0 additions & 51 deletions aggregator/resources/README.md

This file was deleted.

12 changes: 6 additions & 6 deletions aggregator/src/__tests__/e2e.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PolywrapClient } from "@polywrap/client-js";
import { PluginPackage } from "@polywrap/plugin-js";
import { WasmPackage } from "@polywrap/wasm-js";
import { ClientConfigBuilder } from "@polywrap/client-config-builder-js";
import { PolywrapClientConfigBuilder } from "@polywrap/client-config-builder-js";
import path from "path";
import fs from "fs";

Expand All @@ -15,7 +15,7 @@ describe("logging wrapper", () => {
const wrapperUri = "test/wrapper";
const pluginUri1 = "wrap://plugin/logger-1";
const pluginUri2 = "wrap://plugin/logger-2";
const interfaceUri = "ens/wraps.eth:logger@1.0.0";
const interfaceUri = "wrapscan.io/polywrap/[email protected]";

function createClient(logs: any[]): PolywrapClient {
const loggerPlugin = PluginPackage.from(() => ({
Expand All @@ -25,8 +25,8 @@ describe("logging wrapper", () => {
},
}));

const config = new ClientConfigBuilder()
.addPackages({
const config = new PolywrapClientConfigBuilder()
.setPackages({
[wrapperUri]: wrapper,
[pluginUri1]: loggerPlugin,
[pluginUri2]: loggerPlugin
Expand Down Expand Up @@ -103,8 +103,8 @@ describe("logging wrapper", () => {
});

it("succeeds if no loggers are found", async () => {
const config = new ClientConfigBuilder()
.addPackages({
const config = new PolywrapClientConfigBuilder()
.setPackages({
[wrapperUri]: wrapper
})
.build();
Expand Down
Loading
Loading