Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Fix linting, update package version to 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesrp13 committed Jul 30, 2024
1 parent 43a92e7 commit afc1b1f
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 11 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# v5.0.0 (Mon Jul 29 2024)

#### 💥 Breaking Change

- Removes Universal support with associated flags, prompts, and templates
- Adds architectural updates to EVM templates

#### Authors: 1

- pbillingsby ([@PBillingsby](https://github.com/PBillingsby))

# v4.13.0 (Fri Apr 12 2024)

#### 🚀 Enhancement
Expand Down
21 changes: 14 additions & 7 deletions core/utils/templateMappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ import SolanaDedicatedScaffold, {
import { Timer } from './timer';

export type Chain = 'evm' | 'solana' | 'flow';
export type Template =
| 'nextjs-dedicated-wallet'
| 'nextjs-solana-dedicated-wallet'
| 'nextjs-flow-dedicated-wallet';
export type Template = 'nextjs-dedicated-wallet' | 'nextjs-solana-dedicated-wallet' | 'nextjs-flow-dedicated-wallet';

type ConfigType = CreateMagicAppConfig & {
chain: Chain | undefined;
Expand Down Expand Up @@ -152,9 +149,20 @@ export const buildTemplate = async (appConfig: ConfigType): Promise<ConfigType>
case 'evm':
config.network = await BlockchainNetworkPrompt.evmNetworkPrompt();
break;
default:
config.network = await BlockchainNetworkPrompt.evmNetworkPrompt();
break;
}
} else {
const evmNetworks = ['ethereum', 'ethereum-sepolia', 'polygon', 'polygon-amoy', 'etherlink-testnet', 'zksync', 'zksync-sepolia'];
const evmNetworks = [
'ethereum',
'ethereum-sepolia',
'polygon',
'polygon-amoy',
'etherlink-testnet',
'zksync',
'zksync-sepolia',
];
const solanaNetworks = ['solana-devnet', 'solana-mainnet'];

if (evmNetworks.includes(config.network)) {
Expand All @@ -166,8 +174,7 @@ export const buildTemplate = async (appConfig: ConfigType): Promise<ConfigType>
}
}

config.template = config.chain === 'flow' ?
'nextjs-flow-dedicated-wallet' : 'nextjs-dedicated-wallet';
config.template = config.chain === 'flow' ? 'nextjs-flow-dedicated-wallet' : 'nextjs-dedicated-wallet';
config.isChosenTemplateValid = true;

return config;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "make-magic",
"version": "4.13.0",
"version": "5.0.0",
"description": "A tool for quickly scaffolding an app with Magic authentication baked-in!",
"repository": "magiclabs/create-magic-app",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion scaffolds/nextjs-dedicated-wallet/scaffold.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Flags } from '../../core/flags';
import BaseScaffold, { ExecaCommand } from '../../core/types/BaseScaffold';
import { AuthTypePrompt, BlockchainNetworkPrompt, PublishableApiKeyPrompt } from '../../scaffolds/prompts';
import { AuthTypePrompt, BlockchainNetworkPrompt, PublishableApiKeyPrompt } from '../prompts';

export type Data = BlockchainNetworkPrompt.Data & PublishableApiKeyPrompt.Data & AuthTypePrompt.Data;

Expand Down
2 changes: 1 addition & 1 deletion scaffolds/nextjs-flow-dedicated-wallet/scaffold.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Flags } from '../../core/flags';
import BaseScaffold, { ExecaCommand } from '../../core/types/BaseScaffold';
import { AuthTypePrompt, NpmClientPrompt, PublishableApiKeyPrompt } from '../../scaffolds/prompts';
import { AuthTypePrompt, NpmClientPrompt, PublishableApiKeyPrompt } from '../prompts';

export type Data = NpmClientPrompt.Data & PublishableApiKeyPrompt.Data & AuthTypePrompt.Data;

Expand Down
2 changes: 1 addition & 1 deletion scaffolds/nextjs-solana-dedicated-wallet/scaffold.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Flags } from '../../core/flags';
import BaseScaffold, { ExecaCommand } from '../../core/types/BaseScaffold';
import { AuthTypePrompt, NpmClientPrompt, PublishableApiKeyPrompt } from '../../scaffolds/prompts';
import { AuthTypePrompt, NpmClientPrompt, PublishableApiKeyPrompt } from '../prompts';

export type Data = NpmClientPrompt.Data & PublishableApiKeyPrompt.Data & AuthTypePrompt.Data;

Expand Down

0 comments on commit afc1b1f

Please sign in to comment.