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

types #142

Merged
merged 1 commit into from
Apr 19, 2024
Merged

types #142

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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
createTypeInterface
} from '../../src';
import { expectCode, makeContext } from '../../test-utils';
import { JSONSchema } from '@cosmology/ts-codegen-types';
import { JSONSchema } from '@cosmwasm/ts-codegen-types';

import nftIdlVersionData from '../../../../__fixtures__/idl-version/accounts-nft/account-nft.json';

Expand Down
2 changes: 1 addition & 1 deletion packages/ast/__tests__/client/ts-client.issue-101.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExecuteMsg } from '@cosmology/ts-codegen-types';
import { ExecuteMsg } from '@cosmwasm/ts-codegen-types';
import { createExecuteClass, createExecuteInterface } from '../../src';
import { expectCode, globLegacyContracts, makeContext } from '../../test-utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/ast/__tests__/client/ts-client.issue-71.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '../../src'
import { expectCode } from '../../test-utils';
import cases from 'jest-in-case';
import { ExecuteMsg, QueryMsg } from '@cosmology/ts-codegen-types';
import { ExecuteMsg, QueryMsg } from '@cosmwasm/ts-codegen-types';

const contracts = globLegacyContracts('issues/71');

Expand Down
2 changes: 1 addition & 1 deletion packages/ast/__tests__/client/ts-client.issue-98.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExecuteMsg } from '@cosmology/ts-codegen-types';
import { ExecuteMsg } from '@cosmwasm/ts-codegen-types';
import {
createQueryClass,
createExecuteClass,
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/__tests__/client/ts-client.issues.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExecuteMsg, QueryMsg } from '@cosmology/ts-codegen-types';
import { ExecuteMsg, QueryMsg } from '@cosmwasm/ts-codegen-types';
import {
createQueryClass,
createExecuteClass,
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/__tests__/client/ts-client.vectis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
makeContext,
} from '../../test-utils';

import { ExecuteMsg } from '@cosmology/ts-codegen-types';
import { ExecuteMsg } from '@cosmwasm/ts-codegen-types';

import {
createExecuteClass,
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/__tests__/recoil/recoil.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
createRecoilSelectors
} from '../../src/recoil/recoil';
import { expectCode, globLegacyContracts, makeContext } from '../../test-utils';
import { QueryMsg } from '@cosmology/ts-codegen-types';
import { QueryMsg } from '@cosmwasm/ts-codegen-types';

const globbed = globLegacyContracts('basic').find(c => c.name === '/query_msg.json');
const queryMsg = globbed.content as QueryMsg;
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"dependencies": {
"@babel/types": "7.24.0",
"@cosmology/ts-codegen-types": "^1.1.1",
"@cosmwasm/ts-codegen-types": "^1.1.1",
"ast-stringify": "0.1.0",
"case": "1.6.3",
"deepmerge": "4.2.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
getTypeOrRef
} from '../utils';

import { ExecuteMsg, JSONSchema, QueryMsg } from '@cosmology/ts-codegen-types';
import { ExecuteMsg, JSONSchema, QueryMsg } from '@cosmwasm/ts-codegen-types';

import {
createTypedObjectParams,
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/src/context/context.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as t from '@babel/types';
import { JSONSchema } from "@cosmology/ts-codegen-types";
import { JSONSchema } from "@cosmwasm/ts-codegen-types";
import { refLookup } from "../utils";
import { convertUtilsToImportList, getImportStatements, UtilMapping } from "./imports";
import deepmerge from "deepmerge";
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/src/message-builder/message-builder.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as t from '@babel/types';
import { camel } from 'case';
import { abstractClassDeclaration, arrowFunctionExpression, getMessageProperties } from '../utils';
import { ExecuteMsg, QueryMsg } from '@cosmology/ts-codegen-types';
import { ExecuteMsg, QueryMsg } from '@cosmwasm/ts-codegen-types';
import { createTypedObjectParams } from '../utils/types';
import { RenderContext } from '../context';
import { getWasmMethodArgs } from '../client/client';
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/src/message-composer/message-composer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
OPTIONAL_FUNDS_PARAM,
typedIdentifier
} from '../utils';
import { ExecuteMsg, JSONSchema } from '@cosmology/ts-codegen-types';
import { ExecuteMsg, JSONSchema } from '@cosmwasm/ts-codegen-types';
import { createTypedObjectParams } from '../utils/types';
import { RenderContext } from '../context';
import { getWasmMethodArgs } from '../client/client';
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/src/react-query/react-query.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Expression } from '@babel/types';
import * as t from '@babel/types';
import { camel, pascal } from 'case';
import { JSONSchema, ExecuteMsg, QueryMsg } from '@cosmology/ts-codegen-types';
import { JSONSchema, ExecuteMsg, QueryMsg } from '@cosmwasm/ts-codegen-types';
import {
callExpression,
createTypedObjectParams,
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/src/recoil/recoil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getMessageProperties,
getResponseType
} from '../utils';
import { JSONSchema, QueryMsg } from '@cosmology/ts-codegen-types';
import { JSONSchema, QueryMsg } from '@cosmwasm/ts-codegen-types';
import { RenderContext } from '../context';

export const createRecoilSelector = (
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/src/types/context.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IDLObject, JSONSchema } from "@cosmology/ts-codegen-types";
import { IDLObject, JSONSchema } from "@cosmwasm/ts-codegen-types";
import { MessageBuilderOptions, MessageComposerOptions, ReactQueryOptions, RecoilOptions, TSClientOptions, TSTypesOptions, UseContractsOptions } from "./plugins";

export interface ContractInfo {
Expand Down
4 changes: 2 additions & 2 deletions packages/ast/src/utils/babel.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as t from '@babel/types';
import { snake } from "case";
import { Field } from '@cosmology/ts-codegen-types';
import { Field } from '@cosmwasm/ts-codegen-types';
import { TSTypeAnnotation, TSExpressionWithTypeArguments, Noop, TypeAnnotation } from '@babel/types';
import { refLookup } from './ref';
import { JSONSchema } from '@cosmology/ts-codegen-types';
import { JSONSchema } from '@cosmwasm/ts-codegen-types';

// t.TSPropertySignature - kind?
export const propertySignature = (
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/src/utils/ref.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JSONSchema } from "@cosmology/ts-codegen-types";
import { JSONSchema } from "@cosmwasm/ts-codegen-types";

export const refLookup = ($ref: string, schema: JSONSchema): JSONSchema => {
const refName = $ref.replace('#/definitions/', '')
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as t from '@babel/types';
import { camel, pascal } from 'case';
import { propertySignature } from './babel';
import { RenderContext } from '../context';
import { JSONSchema } from '@cosmology/ts-codegen-types';
import { JSONSchema } from '@cosmwasm/ts-codegen-types';

export function getResponseType(
context: RenderContext,
Expand Down
2 changes: 1 addition & 1 deletion packages/ast/test-utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import generate from '@babel/generator';
import { sync as glob } from 'glob';
import { readFileSync } from 'fs';
import { join } from 'path';
import { ExecuteMsg, IDLObject, JSONSchema, QueryMsg } from '@cosmology/ts-codegen-types';
import { ExecuteMsg, IDLObject, JSONSchema, QueryMsg } from '@cosmwasm/ts-codegen-types';
import { RenderContext } from '../src/context';
import { RenderOptions } from 'wasm-ast-types/types';

Expand Down
2 changes: 1 addition & 1 deletion packages/ts-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@babel/generator": "7.24.4",
"@babel/traverse": "7.24.1",
"@babel/types": "7.24.0",
"@cosmology/ts-codegen-types": "^1.1.1",
"@cosmwasm/ts-codegen-types": "^1.1.1",
"@pyramation/json-schema-to-typescript": " 11.0.4",
"@types/rimraf": "3.0.2",
"@types/shelljs": "0.8.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-codegen/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { prompt } from './utils/prompt';
import { Commands as commands } from './cmds';
import { MinimistArgs } from '@cosmology/ts-codegen-types';
import { MinimistArgs } from '@cosmwasm/ts-codegen-types';

const question = [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-codegen/src/commands/create-boilerplate.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as shell from 'shelljs';
import { prompt } from '../utils/prompt';
import dargs from 'dargs';
import { MinimistArgs } from '@cosmology/ts-codegen-types';
import { MinimistArgs } from '@cosmwasm/ts-codegen-types';
const glob = require('glob').sync;
const fs = require('fs');
const path = require('path');
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-codegen/src/commands/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { prompt } from '../utils/prompt';
import codegen from '../index';
import { TSBuilderOptions } from '../builder';
import { MinimistArgs } from '@cosmology/ts-codegen-types';
import { MinimistArgs } from '@cosmwasm/ts-codegen-types';

export default async (argv: MinimistArgs) => {
const questions = [
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-codegen/src/commands/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { prompt } from '../utils/prompt';
import { parse } from 'parse-package-name';
import { tmpdir } from 'os';
import { readFileSync, writeFileSync } from 'fs';
import { MinimistArgs } from '@cosmology/ts-codegen-types';
import { MinimistArgs } from '@cosmwasm/ts-codegen-types';

const TMPDIR = tmpdir();
const rnd = () =>
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-codegen/src/utils/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { cleanse } from './cleanse';
import { compile } from '@pyramation/json-schema-to-typescript';
import { parser } from './parse';
import { ContractInfo } from 'wasm-ast-types';
import { ExecuteMsg, IDLObject, JSONSchema, QueryMsg } from '@cosmology/ts-codegen-types';
import { ExecuteMsg, IDLObject, JSONSchema, QueryMsg } from '@cosmwasm/ts-codegen-types';
interface ReadSchemaOpts {
schemaDir: string;
clean?: boolean;
Expand Down
10 changes: 5 additions & 5 deletions packages/types/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.1.1](https://github.com/cosmwasm/ts-codegen/compare/@cosmology/[email protected]...@cosmology/[email protected]) (2024-04-19)
## [1.1.1](https://github.com/cosmwasm/ts-codegen/compare/@cosmwasm/[email protected]...@cosmwasm/[email protected]) (2024-04-19)

**Note:** Version bump only for package @cosmology/ts-codegen-types
**Note:** Version bump only for package @cosmwasm/ts-codegen-types





# [1.1.0](https://github.com/cosmwasm/ts-codegen/compare/@cosmology/[email protected]...@cosmology/[email protected]) (2024-04-17)
# [1.1.0](https://github.com/cosmwasm/ts-codegen/compare/@cosmwasm/[email protected]...@cosmwasm/[email protected]) (2024-04-17)

**Note:** Version bump only for package @cosmology/ts-codegen-types
**Note:** Version bump only for package @cosmwasm/ts-codegen-types





# 1.0.0 (2024-04-17)

**Note:** Version bump only for package @cosmology/ts-codegen-types
**Note:** Version bump only for package @cosmwasm/ts-codegen-types
4 changes: 2 additions & 2 deletions packages/types/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @cosmology/ts-codegen-types
# @cosmwasm/ts-codegen-types

Types for [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen)

Expand All @@ -23,4 +23,4 @@ Checkout these related projects:

AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.

No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@cosmology/ts-codegen-types",
"name": "@cosmwasm/ts-codegen-types",
"version": "1.1.1",
"description": "CosmWasm TSCodegen Types",
"author": "Dan Lynch <[email protected]>",
Expand Down