Skip to content
Draft
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: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.7.1",
"version": "0.7.2",
"workspace": [
"./packages/**/*",
"./e2e/**/*",
Expand Down
3 changes: 2 additions & 1 deletion e2e/shared/contracts/avail/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Account, Pallets, SDK } from "avail-js-sdk";
import { getEnv, cwd, spawn } from "@effectstream/utils/runtime";
import { getEnv, cwd } from "@effectstream/utils/runtime";
import { spawn } from "@effectstream/utils/runtime-spawn";
import { writeFile } from "node:fs/promises";

const sdk = await SDK.New("ws://localhost:9955/ws");
Expand Down
5 changes: 3 additions & 2 deletions packages/build-tools/orchestrator/src/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { type LogHandler, streamTo, systemLog } from "./logging.ts";
import type { Namespace } from "@effectstream/log";
import { ComponentNames } from "@effectstream/log";
import type { ValueOf } from "@effectstream/utils";
import type { SpawnChild } from "@effectstream/utils/runtime";
import { setExitCode, spawn } from "@effectstream/utils/runtime";
import type { SpawnChild } from "@effectstream/utils/runtime-spawn";
import { setExitCode } from "@effectstream/utils/runtime";
import { spawn } from "@effectstream/utils/runtime-spawn";
import { abortControllers } from "./start.ts";

export type ProcessComponent = {
Expand Down
4 changes: 3 additions & 1 deletion packages/build-tools/orchestrator/src/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import {
setStderrOutput,
tsLogOrchestratorAdapter,
} from "./logging.ts";
import { spawn, setEnv, getEnv } from "@effectstream/utils/runtime";
import { setEnv, getEnv } from "@effectstream/utils/runtime";
import { spawn } from "@effectstream/utils/runtime-spawn";

import {
$,
AbortProcessStart,
Expand Down
3 changes: 2 additions & 1 deletion packages/build-tools/orchestrator/src/tmux/tmux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
// https://github.com/denoland/deno/issues/29904
import install_sh from "./install.sh.ts";
import session_tmux from "./session.tmux.ts";
import { spawnOutput, type SpawnOutputResult } from "@effectstream/utils/runtime";
import { type SpawnOutputResult } from "@effectstream/utils/runtime-spawn";
import { spawnOutput } from "@effectstream/utils/runtime-spawn";

export interface TmuxOptions {
/**
Expand Down
4 changes: 3 additions & 1 deletion packages/build-tools/tui/src/logs-standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { LogServer, type OTelLog } from "./logs-server.ts";
import { createStream, type RotatingFileStream } from "rotating-file-stream";
import type { ILogObj } from "tslog";
import { ENV } from "@effectstream/utils/node-env";
import { getEnv, spawn, exit } from "@effectstream/utils/runtime";
import { getEnv } from "@effectstream/utils/runtime";
import { spawn } from "@effectstream/utils/runtime-spawn";
import { exit } from "@effectstream/utils/runtime";
import { lstatSync, mkdirSync } from "node:fs";

// This is a standalone script that can be used to view logs from the collector.
Expand Down
3 changes: 2 additions & 1 deletion packages/build-tools/tui/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
SECTION_ORDER,
SECTIONS,
} from "./tab/BottomBar.tsx";
import { spawn, exit } from "@effectstream/utils/runtime";
import { exit } from "@effectstream/utils/runtime";
import { spawn } from "@effectstream/utils/runtime-spawn";
import { ENV } from "@effectstream/utils/node-env";

// Main App Component
Expand Down
3 changes: 2 additions & 1 deletion packages/effectstream-sdk/utils/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"exports": {
".": "./src/mod.ts",
"./node-env": "./src/config.ts",
"./runtime": "./src/runtime.ts"
"./runtime": "./src/runtime.ts",
"./runtime-spawn": "./src/runtime-spawn.ts"
},
"imports": {
"@coderspirit/nominal": "npm:@coderspirit/nominal@^4.1.1",
Expand Down
9 changes: 0 additions & 9 deletions packages/effectstream-sdk/utils/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,3 @@ export function isNotFoundError(err: unknown): boolean {
}
return false;
}

/** Cross-runtime process spawn. Re-exported from runtime-spawn. */
export {
spawn,
spawnOutput,
type SpawnChild,
type SpawnOptions,
type SpawnOutputResult,
} from "./runtime-spawn.ts";
4 changes: 4 additions & 0 deletions templates/zswap-da/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"deno.enable": true,
"deno.lint": true
}
25 changes: 25 additions & 0 deletions templates/zswap-da/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
NOTE Celestia node and bridge must be running to use the dapp.

```sh
# start the celestia node and bridge
./scripts/single-node.sh
./scripts/single-node-bridge.sh
# send some tokens to the validator
celestia-appd tx bank send validator celestia1pr90qtc4a7sc53x9tk7zv7sefjjl6tcwqkmg09 100000000utia \
--fees 2000utia --chain-id test
```

```sh
# install dependencies
deno install --allow-scripts
# build contracts
deno task -f @zswap-da/contract-offer-files contract:compile
# start
deno task dev
```

```sh
# another terminal
cd packages/frontend
npm run dev
```
13 changes: 13 additions & 0 deletions templates/zswap-da/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"tasks": {
"dev": "deno task -f @zswap-da/node dev",
"check": "deno task -f @zswap-da/node check"
},
"workspace": [
"./packages/node",
"./packages/frontend",
"./packages/midnight-contracts",
"./packages/midnight-contracts/contract-offer-files"
],
"nodeModulesDir": "auto"
}
Loading
Loading