Skip to content

Commit

Permalink
[tag] v0.2.45-4
Browse files Browse the repository at this point in the history
  • Loading branch information
subshell committed Dec 30, 2024
1 parent 6530374 commit 9905869
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Here are Subshell's advantages over existing Node.js based shells.
In fact, you can load the Subshell init script in Deno.

```
$ deno repl --unstable --eval-file=https://deno.land/x/subshell@0.2.45-3/init.ts
$ deno repl --unstable --eval-file=https://deno.land/x/subshell@0.2.45-4/init.ts
...
Deno 1.23.2
exit using ctrl+d or close()
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.2.45-4 Dec 30, 2024

- switch to npm: specifier

## 0.2.45-3 Dec 30, 2024

- fix release tag
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ RUN chmod 644 /cache/deno_history.txt

USER subshell

ENV SUBSHELL_VERSION 0.2.45-3
ENV SUBSHELL_VERSION 0.2.45-4

CMD hub
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ a Deno 🦕 repl, using polkadot-js extension as remote signer ✍️.
Start with browser extension integration

```
$ deno repl --allow-net --allow-env --eval-file=https://deno.land/x/subshell@0.2.45-3/init.ts
$ deno repl --allow-net --allow-env --eval-file=https://deno.land/x/subshell@0.2.45-4/init.ts
```

Start in lite mode

```
$ deno repl --allow-net --allow-env --eval-file=https://deno.land/x/subshell@0.2.45-3/tini.ts
$ deno repl --allow-net --allow-env --eval-file=https://deno.land/x/subshell@0.2.45-4/tini.ts
```
5 changes: 1 addition & 4 deletions cache.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
ApiPromise,
WsProvider,
} from "https://deno.land/x/polkadot@0.2.45/api/mod.ts";
import { ApiPromise, WsProvider } from "npm:@polkadot/api";

import fs from "node:fs";

Expand Down
7 changes: 4 additions & 3 deletions ci-release.ts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env -S deno run --allow-read --allow-run --allow-write --allow-env
// Copyright 2017-2022 @polkadot/deno authors & contributors
// SPDX-License-Identifier: Apache-2.0

// execute with
// deno run --allow-read --allow-run --allow-write --allow-env ci-release.ts

import { stringCamelCase } from "https://deno.land/x/polkadot@0.2.45/util/mod.ts";
import { stringCamelCase } from "npm:@polkadot/util";

// tighter specification for git arguments
type GitArgs =
Expand Down Expand Up @@ -113,7 +114,7 @@ async function gitSetup(): Promise<void> {
await git("config", "user.email", MAIL);
await git("config", "push.default", "simple");
await git("config", "merge.ours.driver", "true");
await git("config", "--unset", "http.https://github.com/.extraheader");
// await git("config", "--unset", "http.https://github.com/.extraheader");
await git("checkout", "main");
}

Expand Down Expand Up @@ -176,4 +177,4 @@ await setPkgVersion(
POLKADOT_VERSION,
".",
);
await gitPush(version);
// await gitPush(version);
12 changes: 3 additions & 9 deletions client/mod.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import {
ApiPromise,
WsProvider,
} from "https://deno.land/x/polkadot@0.2.45/api/mod.ts";
import type {
Signer,
SignerResult,
} from "https://deno.land/x/polkadot@0.2.45/api/types/index.ts";
import { ApiPromise, WsProvider } from "npm:@polkadot/api";
import type { Signer, SignerResult } from "npm:@polkadot/api/types";
import type {
Registry,
SignerPayloadJSON,
SignerPayloadRaw,
} from "https://deno.land/x/polkadot@0.2.45/types/types/index.ts";
} from "npm:@polkadot/types/types";

export class Client implements Signer {
private encoder = new TextEncoder();
Expand Down
25 changes: 13 additions & 12 deletions init.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import "https://deno.land/x/polkadot@0.2.45/api-augment/mod.ts";
import {
ApiPromise,
WsProvider,
} from "https://deno.land/x/polkadot@0.2.45/api/mod.ts";
import { GearApi } from "https://gear-js.deno.dev/api/src/index.ts";
import { Client } from "https://deno.land/x/subshell@0.2.45-3/client/mod.ts";
// import { VerboseSigner } from "https://deno.land/x/subshell@0.2.45-3/signer/mod.ts";
import { stringToU8a } from "https://deno.land/x/polkadot@0.2.45/util/mod.ts";
import "npm:@polkadot/api-augment";
import { ApiPromise, WsProvider } from "npm:@polkadot/api";
import { GearApi } from "npm:@gear-js/api";
import { Client } from "https://deno.land/x/subshell@0.2.45-4/client/mod.ts";
// import { VerboseSigner } from "https://deno.land/x/subshell@0.2.45-4/signer/mod.ts";
import { stringToU8a } from "npm:@polkadot/util";

const GEAR = !!Deno.env.get("GEAR");
const DEFAULT_PROVIDER = GEAR
? "wss://rpc.vara-network.io"
? "wss://rpc.vara.network"
: "wss://rpc.polkadot.io";
const SESSION_ID = Deno.env.get("SESSION_ID") ?? "";
const PROVIDER = Deno.env.get("PROVIDER") ?? DEFAULT_PROVIDER;
Expand All @@ -24,8 +21,12 @@ function progInfo() {
// "⚙️ v8 version ": Deno.version.v8,
// "🇹 TypeScript version ": Deno.version.typescript,
"🦕 Deno": Deno.version.deno,
"📗 Wiki": GEAR ? "https://github.com/btwiuse/gear.sh/wiki" : "https://wiki.subshell.xyz",
"🙋 Issues": GEAR ? "https://github.com/btwiuse/gear.sh/issues" : "https://github.com/btwiuse/subshell/issues",
"📗 Wiki": GEAR
? "https://github.com/btwiuse/gear.sh/wiki"
: "https://wiki.subshell.xyz",
"🙋 Issues": GEAR
? "https://github.com/btwiuse/gear.sh/issues"
: "https://github.com/btwiuse/subshell/issues",
// "⛓️ RPC Pprvider": PROVIDER,
// "🪄 Custom types": JSON.stringify(TYPES) != '{}' ? 'Yes' : 'None',
// "📖 Runtime api reference": 'https://substrate.rs',
Expand Down
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ const status = await Deno.run({
"--allow-env",
"--no-prompt",
"--unstable",
"--eval-file=https://deno.land/x/subshell@0.2.45-3/init.ts",
"--eval-file=https://deno.land/x/subshell@0.2.45-4/init.ts",
],
}).status();
16 changes: 5 additions & 11 deletions signer/mod.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import {
ApiPromise,
WsProvider,
} from "https://deno.land/x/polkadot@0.2.45/api/mod.ts";
import type {
Signer,
SignerResult,
} from "https://deno.land/x/polkadot@0.2.45/api/types/index.ts";
import { ApiPromise, WsProvider } from "npm:@polkadot/api";
import type { Signer, SignerResult } from "npm:@polkadot/api/types";
import type {
Registry,
SignerPayloadJSON,
SignerPayloadRaw,
} from "https://deno.land/x/polkadot@0.2.45/types/types/index.ts";
import { Keyring } from "https://deno.land/x/polkadot@0.2.45/api/mod.ts";
import { createTestPairs } from "https://deno.land/x/polkadot@0.2.45/keyring/mod.ts";
} from "npm:@polkadot/types/types";
import { Keyring } from "npm:@polkadot/api";
import { createTestPairs } from "npm:@polkadot/keyring";

export function VerboseSigner(inner: Signer): Signer {
async function signRaw(payload: SignerPayloadRaw): Promise<SignerResult> {
Expand Down
2 changes: 1 addition & 1 deletion sixel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { fromPng } from "npm:@rgba-image/png";
import * as sixel from "npm:sixel";
import { stringToU8a } from "https://deno.land/x/polkadot@0.2.45/util/mod.ts";
import { stringToU8a } from "npm:@polkadot/util";
import {
ImageMagick,
initializeImageMagick,
Expand Down
9 changes: 6 additions & 3 deletions subsh-deno
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ if [[ -z "$RUNNING_IN_DOCKER" ]]; then
cd $(dirname $(realpath $0))
fi

# DENO=deno
DENO=subshell

if ! command -v $DENO &> /dev/null; then
DENO=deno
fi

if [[ "$1" == cache ]]; then
until
$DENO run --no-lock --unstable -A cache.ts
Expand All @@ -16,7 +19,7 @@ if [[ "$1" == cache ]]; then
done
$DENO run --no-lock --unstable -A cache.ts
else
# $DENO repl --v8-flags=--trace-side-effect-free-debug-evaluate --unstable --eval-file=https://deno.land/x/subshell@0.2.45-3/init.ts
# $DENO repl --v8-flags=--trace-side-effect-free-debug-evaluate --unstable --eval-file=https://deno.land/x/subshell@0.2.45-4/init.ts
# $DENO repl --no-lock --allow-read=".github" --allow-net --allow-env --no-prompt --unstable --eval-file=./init.ts
$DENO repl --no-lock --allow-read=".github" --allow-net --allow-env --no-prompt --unstable --allow-import --eval-file=https://deno.land/x/subshell@0.2.45-3/init.ts
$DENO repl --no-lock --allow-read=".github" --allow-net --allow-env --no-prompt --unstable --allow-import --eval-file=https://deno.land/x/subshell@0.2.45-4/init.ts
fi
5 changes: 1 addition & 4 deletions tini.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
ApiPromise,
WsProvider,
} from "https://deno.land/x/polkadot@0.2.45/api/mod.ts";
import { ApiPromise, WsProvider } from "npm:@polkadot/api";

async function initApi() {
const PROVIDER = Deno.env.get("PROVIDER") ?? "wss://rpc.polkadot.io";
Expand Down

0 comments on commit 9905869

Please sign in to comment.