Skip to content

Commit

Permalink
fix: cliffy exports in clarinet scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
hstove committed Jul 13, 2022
1 parent 52d697e commit 555b763
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 66 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-keys-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"clarigen-deno": patch
---

Fixed an issue with clarinet scripts importing Cliffy modules
4 changes: 2 additions & 2 deletions cli.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defaultCommand } from './src/cli/commands/default.ts';
import { initCommand } from './src/cli/commands/init.ts';
import { sessionInfoCommand } from "./src/cli/commands/session-info.ts";
import { DenoLandProvider, UpgradeCommand } from './src/deps.ts';
import { sessionInfoCommand } from './src/cli/commands/session-info.ts';
import { DenoLandProvider, UpgradeCommand } from './src/cli/cli-deps.ts';

const baseCommand = defaultCommand
.command('init', initCommand)
Expand Down
51 changes: 2 additions & 49 deletions lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"https://deno.land/std@0.97.0/bytes/bytes_list.ts": "a13287edb03f19d27ba4927dec6d6de3e5bd46254cd4aee6f7e5815810122673",
"https://deno.land/std@0.97.0/bytes/mod.ts": "1ae1ccfe98c4b979f12b015982c7444f81fcb921bea7aa215bf37d84f46e1e13",
"https://deno.land/std@0.97.0/fmt/colors.ts": "db22b314a2ae9430ae7460ce005e0a7130e23ae1c999157e3bb77cf55800f7e4",
"https://deno.land/std@0.97.0/fmt/printf.ts": "7ec612e9b89958b8f7710129f74f502327aad285a9e48ee5297f5882fbc3a078",
"https://deno.land/std@0.97.0/fs/exists.ts": "b0d2e31654819cc2a8d37df45d6b14686c0cc1d802e9ff09e902a63e98b85a00",
"https://deno.land/std@0.97.0/io/buffer.ts": "ed3528e299fd1e0dc056c4b5005a07b28c3dabad2595f077a562ff7b06fe89a5",
"https://deno.land/std@0.97.0/io/bufio.ts": "61d11414e83d2b504eb8ea2fca3c2670470ee2fe2e5fe82bdd81eb55dc11ac4a",
Expand All @@ -74,53 +75,5 @@
"https://deno.land/std@0.97.0/testing/_diff.ts": "961eaf6d9f5b0a8556c9d835bbc6fa74f5addd7d3b02728ba7936ff93364f7a3",
"https://deno.land/std@0.97.0/testing/asserts.ts": "341292d12eebc44be4c3c2ca101ba8b6b5859cef2fa69d50c217f9d0bfbcfd1f",
"https://deno.land/x/clarinet@v0.31.0/index.ts": "74a0de3cbdf0a1ecde78fd7ee288cf3f850a0619395edc64e2e363a310180f58",
"https://deno.land/x/cliffy@v0.24.2/_utils/distance.ts": "02af166952c7c358ac83beae397aa2fbca4ad630aecfcd38d92edb1ea429f004",
"https://deno.land/x/cliffy@v0.24.2/command/_errors.ts": "979a5d3f91b9da60a5871a14c4d7aa88ad4e3258da2df7b83bf40d00949ca944",
"https://deno.land/x/cliffy@v0.24.2/command/_utils.ts": "a17433eaa5fa2931a78590c6ee146129446992214a9483328b321cabd106ed42",
"https://deno.land/x/cliffy@v0.24.2/command/command.ts": "a8a8db0e003c2fde85313ecbaf094502a867ec1229b99eacbdc357b6c0eb7a74",
"https://deno.land/x/cliffy@v0.24.2/command/completions/_bash_completions_generator.ts": "038f70cdf8a84f851984b8aec3e63fe1b4c96455dd34b8b0bc49f2ef97996c00",
"https://deno.land/x/cliffy@v0.24.2/command/completions/_fish_completions_generator.ts": "be4bc20ec11be0248aa3cb2c1451ed4c25433682aa8dc0563e1a7e0a44935d14",
"https://deno.land/x/cliffy@v0.24.2/command/completions/_zsh_completions_generator.ts": "532a5e4ca81e1582dc75047cffaefe4c314f6110cb63089a0a8ab315e251fbd3",
"https://deno.land/x/cliffy@v0.24.2/command/completions/bash.ts": "774e6be686d245f783d65b06d6822af1bff303beb19490b29a0e0f781556cfad",
"https://deno.land/x/cliffy@v0.24.2/command/completions/complete.ts": "626594088e026e9248fcba8b1b3c8076afd964475f63f294223d337c61cf1665",
"https://deno.land/x/cliffy@v0.24.2/command/completions/fish.ts": "c2f353f361c77bbce53e2a8bf064955b028ef6dc0eecca01a7d1f64397b61304",
"https://deno.land/x/cliffy@v0.24.2/command/completions/mod.ts": "2b32933e152628268bfed59bd3091f8d23fbda59ee4e09f4d3de7740c7482fc2",
"https://deno.land/x/cliffy@v0.24.2/command/completions/zsh.ts": "3eb1bfcfb7c1e4dd35b1d2e34a37c2a44a4dc54fdd8a8e4dcb5f933ad193202b",
"https://deno.land/x/cliffy@v0.24.2/command/deps.ts": "84d3beaf8232c73cc62397402ec255db956598c9b7658f244292b34bd2ce5359",
"https://deno.land/x/cliffy@v0.24.2/command/help/_help_generator.ts": "e41b9513f0a8cf55dda713a5e10579835696450aaebfb6517efbb828802cacf9",
"https://deno.land/x/cliffy@v0.24.2/command/help/mod.ts": "01dd638a19ec6fce52317b3398201747d1e1d7ba4352b9a0aed084c7abe5d195",
"https://deno.land/x/cliffy@v0.24.2/command/mod.ts": "d2da7a3d171a7737173525815d7dbe2e3dad3b20f2283385d99b78b5381a8bb5",
"https://deno.land/x/cliffy@v0.24.2/command/type.ts": "2c0e15a618e8c71c7d2654a3cc819ba50b5f4f11828e84210112801363db880d",
"https://deno.land/x/cliffy@v0.24.2/command/types.ts": "f08e0b7846b4571f1e3d3dd4ef4e8e53aa398f4b66d0f833b5817689054b49c7",
"https://deno.land/x/cliffy@v0.24.2/command/types/action_list.ts": "33c98d449617c7a563a535c9ceb3741bde9f6363353fd492f90a74570c611c27",
"https://deno.land/x/cliffy@v0.24.2/command/types/boolean.ts": "bf0fbaacbd79398f4f4a832437a8ac49f34f12fe42b8b44dca68ad23cd7b02e8",
"https://deno.land/x/cliffy@v0.24.2/command/types/child_command.ts": "f1fca390c7fbfa7a713ca15ef55c2c7656bcbb394d50e8ef54085bdf6dc22559",
"https://deno.land/x/cliffy@v0.24.2/command/types/command.ts": "325d0382e383b725fd8d0ef34ebaeae082c5b76a1f6f2e843fee5dbb1a4fe3ac",
"https://deno.land/x/cliffy@v0.24.2/command/types/enum.ts": "a6e805eed88efe1866fa76cd102844a79a9bbe5590e557465f30082c6e383283",
"https://deno.land/x/cliffy@v0.24.2/command/types/file.ts": "8618f16ac9015c8589cbd946b3de1988cc4899b90ea251f3325c93c46745140e",
"https://deno.land/x/cliffy@v0.24.2/command/types/integer.ts": "b49ef8c43fe59ccf67e792c72ff350520dab08c9bd552eff004e134f292daa06",
"https://deno.land/x/cliffy@v0.24.2/command/types/number.ts": "32c3d1decf3b8d9dfa10b0027b07e9c6753c0059d1ccf2d1d768b879d05e0d3e",
"https://deno.land/x/cliffy@v0.24.2/command/types/string.ts": "e415dd7bce1b4d0ac4417e370a41a8c7a476f78cb19bf4a757ba11da343f344c",
"https://deno.land/x/cliffy@v0.24.2/command/upgrade/mod.ts": "17e2df3b620905583256684415e6c4a31e8de5c59066eb6d6c9c133919292dc4",
"https://deno.land/x/cliffy@v0.24.2/command/upgrade/provider.ts": "c6e8e0b8dc91359ece92f73061a218a8384790c29bc48feece9e81f5048611e7",
"https://deno.land/x/cliffy@v0.24.2/command/upgrade/provider/deno_land.ts": "24f8d82e38c51e09be989f30f8ad21f9dd41ac1bb1973b443a13883e8ba06d6d",
"https://deno.land/x/cliffy@v0.24.2/command/upgrade/provider/github.ts": "666f43d7ee687d90da42f1ab105c27f8f953db452f9a6bb88e68852cc813ad08",
"https://deno.land/x/cliffy@v0.24.2/command/upgrade/provider/nest_land.ts": "0e07936cea04fa41ac9297f32d87f39152ea873970c54cb5b4934b12fee1885e",
"https://deno.land/x/cliffy@v0.24.2/command/upgrade/upgrade_command.ts": "f3702efebd89e58aa55cd861f3e63533ee1307ef892fa07f7602a88a7348f0f2",
"https://deno.land/x/cliffy@v0.24.2/flags/_errors.ts": "2e6754a96f8df8a2c23da477388eb426b24090e4cc4140220643ba2590d02136",
"https://deno.land/x/cliffy@v0.24.2/flags/_utils.ts": "85c81dc298b09d616921b0837331f1d2e0b069e6c8e432dc26af74d579eb8967",
"https://deno.land/x/cliffy@v0.24.2/flags/flags.ts": "41462db9188563cfe702b7237a25e8ee805c4c233c13a56750304ac64453122c",
"https://deno.land/x/cliffy@v0.24.2/flags/types.ts": "c1ccc9574c69a0a3120f2464a5667b7169b6e3784f415aa3d5ca09cb36af653a",
"https://deno.land/x/cliffy@v0.24.2/flags/types/boolean.ts": "3a80c2332c2f2f58427774cd0ed15b773be2c6bab6323ab4085ac7eaed9fe021",
"https://deno.land/x/cliffy@v0.24.2/flags/types/integer.ts": "931b6c9f748a839ad304d60851159ebe3f26ccea50fb0907925a94e93772acaf",
"https://deno.land/x/cliffy@v0.24.2/flags/types/number.ts": "ace1b124c644f4fac2a7bf781fafe3f8a32528b22ec939a3291424a313c8e301",
"https://deno.land/x/cliffy@v0.24.2/flags/types/string.ts": "2764413b7f86962152fd0ac3edf5107b94cb6ae8a237243d65c3a2eb2073d624",
"https://deno.land/x/cliffy@v0.24.2/flags/validate_flags.ts": "2d04bfc90c4675e868002ab6b4df3283c32f8b2bd5b7a487d54fdc429f1b59c8",
"https://deno.land/x/cliffy@v0.24.2/table/border.ts": "2514abae4e4f51eda60a5f8c927ba24efd464a590027e900926b38f68e01253c",
"https://deno.land/x/cliffy@v0.24.2/table/cell.ts": "1d787d8006ac8302020d18ec39f8d7f1113612c20801b973e3839de9c3f8b7b3",
"https://deno.land/x/cliffy@v0.24.2/table/deps.ts": "45592ed006efadd7708ea5201bb427cffb8a717176ea202040a8ea863200898e",
"https://deno.land/x/cliffy@v0.24.2/table/layout.ts": "ca9d5159b73f76b98d51feb0286281166a964e4411c087a0c00103035b1ba1dc",
"https://deno.land/x/cliffy@v0.24.2/table/row.ts": "707c8f9c71f28e7ded22a053c13c0988a9598eec0a9e2a7aea7d15cad64d3cfe",
"https://deno.land/x/cliffy@v0.24.2/table/table.ts": "3905c40d030626faab87a3e2e24982382c0d4c11eccae829a9e04db94d29e3e9",
"https://deno.land/x/cliffy@v0.24.2/table/utils.ts": "187bb7dcbcfb16199a5d906113f584740901dfca1007400cba0df7dcd341bc29"
"https://deno.land/x/cliffy@v0.24.2/ansi/colors.ts": "084fc3fe9309d8286f9961d6bd87de19437c3ece07ac55841039fa2994f5adce"
}
6 changes: 5 additions & 1 deletion scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ scripts:

release:
- sh scripts/check-git.sh
- echo "not dirty" # todo
- yarn changeset version
- git add .
- 'git commit -m "chore: version"'
- yarn changeset tag
- git push origin --follow-tags

test-all:
pll:
Expand Down
6 changes: 6 additions & 0 deletions src/cli/cli-deps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export { Command } from 'https://deno.land/x/cliffy@v0.24.2/command/mod.ts';
export {
DenoLandProvider,
GithubProvider,
UpgradeCommand,
} from 'https://deno.land/x/cliffy@v0.24.2/command/upgrade/mod.ts';
3 changes: 2 additions & 1 deletion src/cli/commands/default.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Command, getLevelByName } from '../../deps.ts';
import { getLevelByName } from '../../deps.ts';
import { Command } from '../cli-deps.ts';
import { runClarinet } from '../clarinet-wrapper.ts';
import { generateDenoFile } from '../files/deno.ts';
import { generateBaseFile } from '../files/base.ts';
Expand Down
3 changes: 2 additions & 1 deletion src/cli/commands/init.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Command, resolve } from '../../deps.ts';
import { resolve } from '../../deps.ts';
import { Command } from '../cli-deps.ts';
import { fileExists } from '../utils.ts';
import { CONFIG_FILE, configFilePath } from '../config.ts';

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/session-info.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Command } from '../../deps.ts';
import { Command } from '../cli-deps.ts';
import { runClarinet } from '../clarinet-wrapper.ts';
import { serialize } from '../files/base.ts';
import { log } from '../logger.ts';
Expand Down
8 changes: 1 addition & 7 deletions src/deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ export {
parse as parseToml,
stringify as stringifyToml,
} from 'https://deno.land/std@0.133.0/encoding/toml.ts';
export { Command } from 'https://deno.land/x/cliffy@v0.24.2/command/mod.ts';
export {
DenoLandProvider,
GithubProvider,
UpgradeCommand,
} from 'https://deno.land/x/cliffy@v0.24.2/command/upgrade/mod.ts';
export { colors } from 'https://deno.land/x/cliffy@v0.24.2/ansi/colors.ts';
export { parse as parseYaml } from 'https://deno.land/std@0.95.0/encoding/yaml.ts';
export { assertEquals } from 'https://deno.land/std@0.144.0/testing/asserts.ts';
export { assertEquals } from 'https://deno.land/std@0.97.0/testing/asserts.ts';
2 changes: 1 addition & 1 deletion src/encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type {
ResponseErr,
ResponseOk,
} from './types.ts';
import { types } from './deps.ts';
import { types } from './clarinet-deps.ts';
import { toCamelCase, toKebabCase } from './cli/utils.ts';

export function ok<T, Err = never>(value: T): ResponseOk<T, Err> {
Expand Down
2 changes: 1 addition & 1 deletion src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ClarinetChain as _Chain,
ReadOnlyFn,
TxReceipt,
} from './deps.ts';
} from './clarinet-deps.ts';
import { cvToValue } from './encoder.ts';
import { Account, Accounts, contractsFactory, Simnet } from './factory.ts';
import { AllContracts, ContractCallTyped } from './factory-types.ts';
Expand Down
2 changes: 1 addition & 1 deletion src/tx.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tx } from './deps.ts';
import { Tx } from './clarinet-deps.ts';
import { ContractCallTyped } from './factory-types.ts';
import { ClarityAbiFunction } from './types.ts';

Expand Down
2 changes: 1 addition & 1 deletion tests/tester_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals } from '../src/deps.ts';
import { types } from '../src/deps.ts';
import { types } from '../src/clarinet-deps.ts';
import { accounts, simnet } from '../artifacts/clarigen/index.ts';
import { factory, ok, tx, txErr, txOk } from '../src/index.ts';

Expand Down

0 comments on commit 555b763

Please sign in to comment.