create-solana-dapp
Advanced tools
Comparing version 2.2.0-beta.5 to 2.2.0-beta.6
@@ -19,3 +19,3 @@ #!/usr/bin/env node | ||
anchorName: args.anchorName, | ||
anchorProgramName: args.anchorProgramName, | ||
anchorProgram: args.anchorProgram, | ||
commit: { | ||
@@ -22,0 +22,0 @@ name: '', |
@@ -6,3 +6,3 @@ import { CreateWorkspaceOptions } from 'create-nx-workspace'; | ||
anchorName: string | undefined; | ||
anchorProgramName: string | undefined; | ||
anchorProgram: string | undefined; | ||
dryRun: boolean; | ||
@@ -9,0 +9,0 @@ name: string | undefined; |
@@ -39,3 +39,3 @@ "use strict"; | ||
.option('--anchor-name <name>', help(`Anchor project name (default: anchor)\n`)) | ||
.option('--anchor-program-name <name>', help(`Anchor program name\n`)) | ||
.option('--anchor-program <name>', help(`Anchor program name\n`)) | ||
.option('--web-name <name>', help(`Web project name (default: web)\n`)) | ||
@@ -76,3 +76,3 @@ .option('--web-port <port>', help(`Web project port (default: 3000)\n`)) | ||
anchorName: (_b = result.anchorName) !== null && _b !== void 0 ? _b : 'anchor', | ||
anchorProgramName: (_d = (_c = result.anchorProgramName) !== null && _c !== void 0 ? _c : name) !== null && _d !== void 0 ? _d : '', | ||
anchorProgram: (_d = (_c = result.anchorProgram) !== null && _c !== void 0 ? _c : name) !== null && _d !== void 0 ? _d : '', | ||
dryRun: (_e = result.dryRun) !== null && _e !== void 0 ? _e : false, | ||
@@ -107,3 +107,3 @@ name: name !== null && name !== void 0 ? name : '', | ||
if (options.anchor !== 'none') { | ||
options.anchorProgramName = prompts.anchorProgramName; | ||
options.anchorProgram = prompts.anchorProgram; | ||
} | ||
@@ -110,0 +110,0 @@ // Validate the options |
@@ -13,3 +13,3 @@ import { AnchorTemplate } from './get-anchor-templates'; | ||
anchor: string; | ||
anchorProgramName: unknown; | ||
anchorProgram: unknown; | ||
}>; | ||
@@ -16,0 +16,0 @@ export declare function getUiLibraries(preset: 'next' | 'react'): { |
@@ -53,8 +53,6 @@ "use strict"; | ||
}, | ||
anchorProgramName: ({ results }) => { | ||
anchorProgram: ({ results }) => { | ||
var _a; | ||
const anchorProgramName = options.anchorProgramName.length | ||
? options.anchorProgramName | ||
: (_a = results.name) !== null && _a !== void 0 ? _a : 'my-program'; | ||
return Promise.resolve(anchorProgramName); | ||
const anchorProgram = options.anchorProgram.length ? options.anchorProgram : (_a = results.name) !== null && _a !== void 0 ? _a : 'my-program'; | ||
return Promise.resolve(anchorProgram); | ||
}, | ||
@@ -61,0 +59,0 @@ }, { |
export declare function validateProjectName(name: string): string | void; | ||
export declare function validateAnchorProgramName(name: string): string | void; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validateAnchorProgramName = exports.validateProjectName = void 0; | ||
exports.validateProjectName = void 0; | ||
const fs_1 = require("fs"); | ||
@@ -20,13 +20,2 @@ function validateProjectName(name) { | ||
exports.validateProjectName = validateProjectName; | ||
function validateAnchorProgramName(name) { | ||
// Name must be a valid directory name | ||
if (!/^[a-z0-9_-]+$/i.test(name)) { | ||
return 'Please enter a valid directory name (alphanumeric characters and dashes only)'; | ||
} | ||
// Name must be at least 1 character long | ||
if (name.length < 1) { | ||
return 'Please enter at least 1 character'; | ||
} | ||
} | ||
exports.validateAnchorProgramName = validateAnchorProgramName; | ||
//# sourceMappingURL=validate-project-name.js.map |
{ | ||
"name": "create-solana-dapp", | ||
"version": "2.2.0-beta.5", | ||
"version": "2.2.0-beta.6", | ||
"description": "Get up and running fast with Solana dApps", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46104
621