Skip to content

Commit

Permalink
fix: maintain odl nomenclature
Browse files Browse the repository at this point in the history
  • Loading branch information
gagdiez committed Sep 27, 2024
1 parent 16eb842 commit 0c91b60
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const successContractToText = (contract: Contract) =>
contract === 'none'
? ''
: chalk`a smart contract in {bold ${
contract === 'rust' ? 'Rust' : 'Typescript'
contract === 'rs' ? 'Rust' : 'Typescript'
}}`;

const frontendTemplates: FrontendMessage = {
Expand All @@ -52,7 +52,7 @@ export const setupSuccess = (
contract
)}${successFrontendToText(frontend)}.
${
contract === 'rust'
contract === 'rs'
? chalk`🦀 If you are new to Rust please visit {bold {green https://www.rust-lang.org }}\n`
: ''
}
Expand All @@ -74,20 +74,20 @@ export const contractInstructions = (
- {inverse Navigate to your project}:
{blue cd {bold ${projectName}}}
${
contract === 'javascript' && !install
contract === 'ts' && !install
? chalk` - {inverse Install all dependencies}
{blue npm {bold install}}`
: 'Then:'
}
- {inverse Build your contract}:
${
contract === 'javascript'
contract === 'ts'
? chalk`{blue npm {bold run build}}`
: chalk`{blue {bold cargo near build}}`
}
- {inverse Test your contract} in the Sandbox:
${
contract === 'javascript'
contract === 'ts'
? chalk`{blue npm {bold run test}}`
: chalk`{blue {bold cargo test}}`
}
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export type Contract = 'javascript' | 'rust' | 'none';
export const CONTRACTS: Contract[] = ['javascript', 'rust', 'none'];
export type Contract = 'ts' | 'rs' | 'none';
export const CONTRACTS: Contract[] = ['ts', 'rs', 'none'];

export type Frontend = 'next-app' | 'next-page' | 'none';
export const FRONTENDS: Frontend[] = ['next-app' , 'next-page', 'none'];
Expand Down
4 changes: 2 additions & 2 deletions src/user-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const appChoices: Choices<App> = [
},
];
const contractChoices: Choices<Contract> = [
{ title: 'JS/TS Contract', description: 'A Near contract written in javascript/typescript', value: 'javascript' },
{ title: 'Rust Contract', description: 'A Near contract written in Rust', value: 'rust' },
{ title: 'JS/TS Contract', description: 'A Near contract written in javascript/typescript', value: 'ts' },
{ title: 'Rust Contract', description: 'A Near contract written in Rust', value: 'rs' },
];

const frontendChoices: Choices<Frontend> = [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions test/__snapshots__/make.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1054,11 +1054,11 @@ import { useEffect, useState } from 'react';
import '@/app/globals.css';
import { NearContext } from '@/context';
import { Navigation } from '@/components/navigation';
import { NetworkId, HelloNearContract } from '@/config';
import { NetworkId } from '@/config';
import { Wallet } from '@/wallets/near';
const wallet = new Wallet({ networkId: NetworkId, createAccessKeyFor: HelloNearContract });
const wallet = new Wallet({ networkId: NetworkId });
// Layout Component
export default function RootLayout({ children }) {
Expand Down Expand Up @@ -1773,9 +1773,9 @@ import { NearContext } from '@/context';
import { Navigation } from '@/components/navigation';
import { Wallet } from '@/wallets/near';
import { NetworkId, HelloNearContract } from '@/config';
import { NetworkId } from '@/config';
const wallet = new Wallet({ createAccessKeyFor: HelloNearContract, networkId: NetworkId });
const wallet = new Wallet({ networkId: NetworkId });
export default function MyApp({ Component, pageProps }) {
const [signedAccountId, setSignedAccountId] = useState('');
Expand Down

0 comments on commit 0c91b60

Please sign in to comment.