diff --git a/.ghjk/deno.lock b/.ghjk/deno.lock index 8ec1e4b..4e2c93a 100644 --- a/.ghjk/deno.lock +++ b/.ghjk/deno.lock @@ -398,6 +398,47 @@ "https://deno.land/x/jszip@0.11.0/mod.ts": "5661ddc18e9ac9c07e3c5d2483bc912a7022b6af0d784bb7b05035973e640ba1", "https://esm.sh/jszip@3.7.1": "f3872a819b015715edb05f81d973b5cd05d3d213d8eb28293ca5471fe7a71773", "https://esm.sh/v135/jszip@3.7.1/denonext/jszip.mjs": "d31d7f9e0de9c6db3c07ca93f7301b756273d4dccb41b600461978fc313504c9", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/deps/cli.ts": "aac025f9372ad413b9c2663dc7f61affd597820d9448f010a510d541df3b56ea", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/deps/common.ts": "6fc8efc7f33b96c206e434e7c3e6ad1039070c97586371e57a521dce4b00561f", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/deps/ports.ts": "3c60d1f7ab626ffdd81b37f4e83a780910936480da8fe24f4ccceaefa207d339", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/files/deno/bindings.ts": "dd8758428cb651194ca009ba108299399f91c7a90dc3151653c653ccafabee7f", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/host/types.ts": "f450d9b9c0eced2650262d02455aa6f794de0edd6b052aade256882148e5697f", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/install/utils.ts": "d2e0514871a1393e29095ed78895490f5455ce0d01cf476e86bd795bd9bfef2d", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/envs/inter.ts": "84805fa208754a08f185dca7a5236de3760bbc1d0df96af86ea5fd7778f827a2", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/envs/mod.ts": "6fdb2931feda733800fd46f6564b7a111c457d75fa44511b8376d0bd435142f2", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/envs/posix.ts": "c3221bdeb76962a4262924ec0b7887fa3881c351349fbcd23f7319028dd51185", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/envs/reducer.ts": "76ee6974c9d4885da0898e01c498dcfdd99a3652a5a564d679577931a680e781", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/envs/types.ts": "9ff28d47aa60042df42fbb98a46f7689d8111be462237f5fb81771011e429088", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/mod.ts": "dd79843fc580c2051f7d2a2f2c73002561d7469b9a6f0a97cd719426dc758943", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/ambient.ts": "dfa1082c67170b24840f2c22ca320b095cdefbca26c2b8b8f9c5703bd9ba2a36", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/base.ts": "8ef8a8de372420bddcd63a1b363937f43d898059e99478a58621e8432bcd5891", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/db.ts": "a309d1058f66079a481141c3f1733d928b9af8a37b7ce911b1228f70fd24df0f", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/ghrel.ts": "f9339b4a6d6d58c902152c5016158bceb9e39a5252d612ab749b8395dc04aed0", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/inter.ts": "b3999e73d73d7f928a8de86e5e2261fe6b1450ceedfb54f24537bf0803532ed0", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/mod.ts": "108d949da3ef0d20e00e1c10966ce6899f112fb4b7388bc1f728923d74d77e08", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/reducers.ts": "d04e813652101f67f946242df68429ed5540e499fbdb7776b8be5703f16754c8", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/sync.ts": "8324650e23cf22ef8cf44b6764988e984117fdecc4a7a55acff77137c14b6fd2", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/types.ts": "f4dbd1a3f4b7f539b3a85418617d25adbf710b54144161880d48f6c4ec032eee", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/types/platform.ts": "0ecffeda71919293f9ffdb6c564ddea4f23bc85c4e640b08ea78225d34387fdc", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/utils.ts": "6b14b331cce66bd46e7aec51f02424327d819150f16d3f72a6b0aaf7aee43c09", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/ports/worker.ts": "5ece2be9ba50b28a9c1ef28779ecc7eb2cfad7d115c7d740ae1a0d4616e885f8", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/std.ts": "419d6b04680f73f7b252257ab287d68c1571cee4347301c53278e2b53df21c4a", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/tasks/deno.ts": "75b85d8cdc129e56d7bd1bfbfdc4a6f4685e86933c41908e48fbc51be7a57fee", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/tasks/exec.ts": "ddc6bc7cbed464fdd94038a0df8668138411e94e49ae639615b93e734e37d311", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/tasks/inter.ts": "63e8f2860f7e3b4d95b6f61ca56aeb8567e4f265aa9c22cace6c8075edd6210f", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/tasks/mod.ts": "75bc52b248b43e32329462e33ae40b7a147e049e3c58dd4975ba78648c61731b", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/tasks/types.ts": "072a34bd0749428bad4d612cc86abe463d4d4f74dc56cf0a48a1f41650e2399b", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/modules/types.ts": "76209cb68996a3bc5da4ae88666b3a7eca9109049ed8771b56e86580d4d267bd", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/port.ts": "c039a010dee7dfd978478cf4c5e2256c643135e10f33c30a09f8db9915e9d89d", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/src/deno_systems/bindings.ts": "513adea5cbd7de22e9a4be411400ddd0ba4f4e474363935bf6c0231c5449edcf", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/src/deno_systems/mod.ts": "87390d9dd5935606d2588586302d76676c66fac3ff3ca75fbe8193d23ec3bfd6", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/src/deno_systems/types.ts": "8591343fc77c46cdd5998f12464675ae19239bc81cf133bbb467842b5710b382", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/src/ghjk/js/runtime.js": "65adbfcbc1d46563eda4c90e4886f5da2220182072bfcdef06ae00c41ad49d89", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/utils/logger.ts": "1fc012c6bc52f8112bdd26ee57b4d5836d556344892ee3c6c585b75d172684dd", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/utils/mod.ts": "f94e6bbef44e70050eda3954c703f90b6dba6e35b21ece8d99f89dbda9f9700c", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/utils/unarchive.ts": "903de8e8beecde247f4a116c2426d9e992e97d174a6e3c26aeed852c2610a51a", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/utils/url.ts": "e1ada6fd30fc796b8918c88456ea1b5bbd87a07d0a0538b092b91fd2bb9b7623", + "https://raw.githubusercontent.com/metatypedev/ghjk/0eaf4d8bd190896970501673b8969a2af03f0919/utils/worker.ts": "ac4caf72a36d2e4af4f4e92f2e0a95f9fc2324b568640f24c7c2ff6dc0c11d62", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/deps/cli.ts": "aac025f9372ad413b9c2663dc7f61affd597820d9448f010a510d541df3b56ea", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/deps/common.ts": "f775710b66a9099b98651cd3831906466e9b83ef98f2e5c080fd59ee801c28d4", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/deps/ports.ts": "3c60d1f7ab626ffdd81b37f4e83a780910936480da8fe24f4ccceaefa207d339", diff --git a/.ghjk/lock.json b/.ghjk/lock.json index 32181f4..b1faf95 100644 --- a/.ghjk/lock.json +++ b/.ghjk/lock.json @@ -430,7 +430,7 @@ } ] }, - "bciqgcwltl3sbuyrqlhxz2spihe2asdzrgt3axosw3mre7ived23syhy": { + "bciqnerbswitlqt27ado74puxt3faxea6jaxe4wvytnzwjpupig25kky": { "provides": [ { "ty": "posix.envVar", @@ -440,7 +440,7 @@ { "ty": "posix.envVar", "key": "RUSTY_V8_MIRROR", - "val": "/var/home/asdf/repos/ecma/ghjk/.dev/rusty_v8" + "val": "/home/yohe/ghjk/.dev/rusty_v8" }, { "ty": "ghjk.ports.InstallSetRef", @@ -453,7 +453,7 @@ "envsNamed": { "main": "bciqfnku2tswsz4gapwhys5ox5uiyzcb5r7bmuwzljjeziljcu7efroi", "_rust": "bciqex5g2cetqvfipwhu6fb3mmyke3y6jvrscjrykf2zl7wfwupiqhca", - "dev": "bciqgcwltl3sbuyrqlhxz2spihe2asdzrgt3axosw3mre7ived23syhy" + "dev": "bciqnerbswitlqt27ado74puxt3faxea6jaxe4wvytnzwjpupig25kky" } } } diff --git a/deno.jsonc b/deno.jsonc index b2f858e..2dfa2c4 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,11 +1,27 @@ { "tasks": { "test": "cargo build -p ghjk && deno test --unstable-worker-options --unstable-kv -A tests/*", + "test-doc": "cargo build -p ghjk && deno test --unstable-worker-options --unstable-kv -A --doc **/*.ts", "self": "cargo run -p ghjk", "cache": "deno cache deps/*", "check": "deno run -A ./tools/check.ts", "dev": "deno run -A ./tools/dev.ts" }, + "test": { + "exclude": [ + ".git", + ".dev", + "install.ts", + "./target", + ".ghjk/**", + ".deno-dir/**", + "vendor/**", + "./src/deno_systems/bindings.ts", + "./src/ghjk/js", + "./files/deno/bindings.ts", + "./tools" + ] + }, "fmt": { "exclude": [ ".git", diff --git a/deps/cli.ts b/deps/cli.ts index 9829c22..9294775 100644 --- a/deps/cli.ts +++ b/deps/cli.ts @@ -2,5 +2,4 @@ export * from "./common.ts"; -export * as cliffy_cmd from "https://deno.land/x/cliffy@v1.0.0-rc.4/command/mod.ts"; export { Table } from "https://deno.land/x/cliffy@v1.0.0-rc.4/table/table.ts"; diff --git a/install.sh b/install.sh index 1eaa503..ae17dc8 100755 --- a/install.sh +++ b/install.sh @@ -22,7 +22,6 @@ INSTALLER_URL="https://raw.githubusercontent.com/$ORG/$REPO/main/install.sh" RELEASE_URL="https://github.com/$ORG/$REPO/releases" LATEST_VERSION=$(curl "$RELEASE_URL/latest" -s -L -I -o /dev/null -w '%{url_effective}') -LATEST_VERSION="${LATEST_VERSION##*v}" PLATFORM="${PLATFORM:-}" TMP_DIR=$(mktemp -d) @@ -31,7 +30,9 @@ VERSION="${VERSION:-$LATEST_VERSION}" # make sure the version is prepended with v if [ "${VERSION#"v"}" = "$VERSION" ]; then - VERSION="v$VERSION" + cat >&2 <&2 read -r _throwaway mv "$TMP_DIR/$EXE" "$GHJK_INSTALL_EXEC_DIR" + rm -r "$TMP_DIR" else echo "$GHJK_INSTALL_EXEC_DIR is not writable." exit 1 @@ -126,9 +128,8 @@ EOF fi GHJK_INSTALLER_URL="${GHJK_INSTALLER_URL:-https://raw.github.com/$ORG/$REPO/$VERSION/install.ts}" -"$TMP_DIR/$EXE" deno run -A "$GHJK_INSTALLER_URL" +"$GHJK_INSTALL_EXEC_DIR/$EXE" deno run -A "$GHJK_INSTALLER_URL" -rm -r "$TMP_DIR" SHELL_TYPE=$(basename "$SHELL") diff --git a/src/ghjk/config.rs b/src/ghjk/config.rs index 5157c90..b1f6865 100644 --- a/src/ghjk/config.rs +++ b/src/ghjk/config.rs @@ -92,8 +92,7 @@ impl Config { .join(&format!("{}/", cwd.file_name().unwrap().to_string_lossy())) .wrap_err("repo url error")? } else { - const BASE_URL: &str = - "https://raw.githubusercontent.com/metatypedev/metatype/"; + const BASE_URL: &str = "https://raw.githubusercontent.com/metatypedev/ghjk/"; // repo root url must end in slash due to // how Url::join works let url = BASE_URL.to_owned() + crate::shadow::COMMIT_HASH + "/";