Skip to content

Commit 097d08a

Browse files
authored
Rename validator scripts (#11)
1 parent 2b62bf0 commit 097d08a

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

.changeset/honest-donuts-obey.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-solana-program": patch
3+
---
4+
5+
Rename validator scripts

template/base/README.md.njk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ The following clients are available for your programs. You may use the following
8080
The following script is available to start your local validator.
8181

8282
```sh
83-
{{ getNpmCommand("validator") }}
83+
{{ getNpmCommand("validator:start") }}
8484
```
8585

86-
By default, if a local validator is already running, the script will be skipped. You may use the `--restart` flag to force the validator to restart.
86+
By default, if a local validator is already running, the script will be skipped. You may use the `validator:restart` script instead to force the validator to restart.
8787

8888
```sh
89-
{{ getNpmCommand("validator", "--restart") }}
89+
{{ getNpmCommand("validator:restart") }}
9090
```
9191

9292
Finally, you may stop the local validator using the following command.
@@ -112,6 +112,6 @@ Next time you build your program and run your validator, these external programs
112112

113113
```sh
114114
{{ getNpmCommand("programs:build") }}
115-
{{ getNpmCommand("validator", "--restart") }}
115+
{{ getNpmCommand("validator:restart") }}
116116
```
117117
{% endif %}

template/clients/base/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"scripts": {
33
"generate": "pnpm generate:idls && pnpm generate:clients",
44
"generate:clients": "zx ./scripts/generate-clients.mjs",
5-
"validator": "zx ./scripts/start-validator.mjs",
5+
"validator:start": "zx ./scripts/start-validator.mjs",
6+
"validator:restart": "pnpm validator:start --restart",
67
"validator:stop": "zx ./scripts/stop-validator.mjs"
78
},
89
"devDependencies": {

template/clients/js/clients/js/README.md.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Alternatively, you can go into the client directory and run the tests directly.
1919
```sh
2020
# Build your programs and start the validator.
2121
{{ getNpmCommand("programs:build") }}
22-
{{ getNpmCommand("validator") }}
22+
{{ getNpmCommand("validator:restart") }}
2323

2424
# Go into the client directory and run the tests.
2525
cd clients/js

template/clients/js/scripts/client/test-js.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'zx/globals';
33
import { workingDirectory } from '../utils.mjs';
44

55
// Start the local validator if it's not already running.
6-
await $`pnpm validator --restart`;
6+
await $`pnpm validator:restart`;
77

88
// Build the client and run the tests.
99
cd(path.join(workingDirectory, 'clients', 'js'));

template/clients/rust/scripts/client/test-rust.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'zx/globals';
33
import { workingDirectory } from '../utils.mjs';
44

55
// Start the local validator if it's not already running.
6-
await $`pnpm validator --restart`;
6+
await $`pnpm validator:restart`;
77

88
// Run the tests.
99
cd(path.join(workingDirectory, 'clients', 'rust'));

0 commit comments

Comments
 (0)