Skip to content

Commit 3655e17

Browse files
Replace sh and bash syntax highlighting for ddn commands only (#13)
Co-authored-by: Rob Dominguez <[email protected]>
1 parent 8e9b2c0 commit 3655e17

File tree

106 files changed

+1769
-361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+1769
-361
lines changed

docs/_prereqs.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ development experience faster and your feedback loops shorter. **You'll need Doc
2020

2121
You can verify that the DDN CLI is installed correctly by running:
2222

23-
```sh
23+
```ddn
2424
ddn doctor
2525
```

docs/auth/jwt/jwt-mode.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ For these examples we'll set the payload of the JWT to specify a `user` role and
228228
Once you've updated your `AuthConfig` object in `auth-config.hml` and updated your claims, you can rebuild your
229229
supergraph and test it locally.
230230

231-
```bash title="For example, from the root of your project, run:"
231+
```ddn title="For example, from the root of your project, run:"
232232
ddn supergraph build local
233233
```
234234

docs/auth/jwt/tutorials/integrations/1-auth0.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ definition:
115115
116116
Then, create a new build of your supergraph:
117117
118-
```sh
118+
```ddn
119119
ddn supergraph build local
120120
```
121121

docs/auth/jwt/tutorials/integrations/2-aws-cognito.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ definition:
115115
116116
Then, create a new build of your supergraph:
117117
118-
```sh
118+
```ddn
119119
ddn supergraph build local
120120
```
121121

docs/auth/jwt/tutorials/integrations/3-firebase.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ AuthConfig object to ensure proper validation.
121121

122122
Then, create a new build of your supergraph:
123123

124-
```sh
124+
```ddn
125125
ddn supergraph build local
126126
```
127127

docs/auth/jwt/tutorials/integrations/4-clerk.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ definition:
9191
9292
Then, create a new build of your supergraph:
9393
94-
```sh
94+
```ddn
9595
ddn supergraph build local
9696
```
9797

docs/auth/jwt/tutorials/setup-test-jwt.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ definition:
7272
7373
Create a supergraph build using this `AuthConfig`.
7474

75-
```bash title="From the root of your project, run:"
75+
```ddn title="From the root of your project, run:"
7676
ddn supergraph build create \
7777
--description "use jwt-based authconfig" \
7878
--supergraph supergraph.yaml

docs/auth/noauth-mode.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ all fields being allowed in the `TypePermissions`.
9393

9494
### Step 3. Build your supergraph
9595

96-
```bash
96+
```ddn
9797
ddn supergraph build local
9898
```
9999

docs/auth/permissions/tutorials/1-simple-user-permissions.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ If you want to restrict which fields the new role can access, simply omit them f
120120

121121
Create a new build of your supergraph:
122122

123-
```sh
123+
```ddn
124124
ddn supergraph build local
125125
```
126126

docs/auth/permissions/tutorials/2-public-access-role.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ definition:
113113

114114
Create a new build of your supergraph:
115115

116-
```sh
116+
```ddn
117117
ddn supergraph build local
118118
```
119119

docs/auth/permissions/tutorials/4-service-account.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Content-Type: application/json
8282

8383
Create a new build of your supergraph:
8484

85-
```sh
85+
```ddn
8686
ddn supergraph build local
8787
```
8888

docs/auth/permissions/tutorials/5-restrict-command-execution-with-role-based-permissions.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ definition:
102102
This will set your `x-hasura-role` session variable as `author` and the `x-hasura-user-id` as `1`, enabling you to
103103
impersonate Alice.
104104

105-
```bash title="Create a new build and start your services:"
105+
```ddn title="Create a new build and start your services:"
106106
ddn supergraph build local && ddn run docker-start
107107
```
108108

docs/auth/private-vs-public.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ If set to `public` with `noAuth` mode, queries do not require any authentication
4949

5050
Set to `private` mode:
5151

52-
```bash
52+
```ddn
5353
ddn project set-api-access-mode private
5454
```
5555

5656
Set to `public` mode:
5757

58-
```bash
58+
```ddn
5959
ddn project set-api-access-mode public
6060
```
6161

docs/auth/webhook/tutorials/special-roles.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ definition:
121121

122122
Once you've updated your metadata files, you can rebuild your supergraph and test it locally.
123123

124-
```bash title="For example, from the root of your project, run:"
124+
```ddn title="For example, from the root of your project, run:"
125125
ddn supergraph build local
126126
```
127127

docs/auth/webhook/webhook-mode.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ definition:
277277

278278
## Step 4. Rebuild your supergraph
279279

280-
```bash title="For example, from the root of your project, run:"
280+
```ddn title="For example, from the root of your project, run:"
281281
ddn supergraph build local
282282
```
283283

docs/business-logic/add-a-lambda-connector.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can add a lambda connector just like any other [data source](/data-sources/o
2121

2222
## Add a connector
2323

24-
```sh title="Initialize a new connector in a project directory:"
24+
```ddn title="Initialize a new connector in a project directory:"
2525
ddn connector init <your_name_for_the_connector> -i
2626
```
2727

docs/business-logic/add-env-vars-to-a-lambda.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ available across your project:
2626

2727
## Add an environment variable
2828

29-
```sh title="From a project directory, run:"
29+
```ddn title="From a project directory, run:"
3030
ddn connector env add <connector_name> --env FOO=bar
3131
```
3232

docs/business-logic/tutorials/1-add-custom-logic.mdx

+10-10
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This tutorial should take about five minutes.
3030

3131
## Step 1. Initialize a new local DDN project
3232

33-
```sh title="Create a new project using the DDN CLI:"
33+
```ddn title="Create a new project using the DDN CLI:"
3434
ddn supergraph init lambda-tutorial
3535
```
3636

@@ -40,7 +40,7 @@ ddn supergraph init lambda-tutorial
4040

4141
<TabItem value="TypeScript" label="TypeScript">
4242

43-
```bash title="Run the following command:"
43+
```ddn title="Run the following command:"
4444
ddn connector init my_ts -i
4545
```
4646

@@ -54,7 +54,7 @@ the entrypoint for your connector.
5454

5555
<TabItem value="Python" label="Python">
5656

57-
```bash title="Run the following command:"
57+
```ddn title="Run the following command:"
5858
ddn connector init my_python -i
5959
```
6060

@@ -68,7 +68,7 @@ be the entrypoint for your connector.
6868

6969
<TabItem value="Go" label="Go">
7070

71-
```bash title="Run the following command:"
71+
```ddn title="Run the following command:"
7272
ddn connector init my_go -i
7373
```
7474

@@ -199,7 +199,7 @@ schema.
199199

200200
<TabItem value="TypeScript" label="TypeScript">
201201

202-
```bash title="Introspect the connector:"
202+
```ddn title="Introspect the connector:"
203203
ddn connector introspect my_ts
204204
```
205205

@@ -213,7 +213,7 @@ ddn command add my_ts encode
213213

214214
<TabItem value="Python" label="Python">
215215

216-
```bash title="Introspect the connector:"
216+
```ddn title="Introspect the connector:"
217217
ddn connector introspect my_python
218218
```
219219

@@ -227,7 +227,7 @@ ddn command add my_python encode
227227

228228
<TabItem value="Go" label="Go">
229229

230-
```bash title="Introspect the connector:"
230+
```ddn title="Introspect the connector:"
231231
ddn connector introspect my_go
232232
```
233233

@@ -246,15 +246,15 @@ generated Hasura metadata for each. Look for `Hello.hml` and `Encode.hml` to see
246246

247247
## Step 5. Create a new build and test
248248

249-
```bash title="Create a new build:"
249+
```ddn title="Create a new build:"
250250
ddn supergraph build local
251251
```
252252

253-
```bash title="Start your services:"
253+
```ddn title="Start your services:"
254254
ddn run docker-start
255255
```
256256

257-
```bash title="Open your local console:"
257+
```ddn title="Open your local console:"
258258
ddn console --local
259259
```
260260

docs/business-logic/tutorials/2-extend-a-model.mdx

+13-13
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ This tutorial should take about ten minutes.
3333

3434
## Step 1. Initialize a new local DDN project
3535

36-
```sh title="Create a new project using the DDN CLI:"
36+
```ddn title="Create a new project using the DDN CLI:"
3737
ddn supergraph init lambda-tutorial
3838
```
3939

4040
## Step 2. Prepare the PostgreSQL data
4141

42-
```sh title="In your project directory, run:"
42+
```ddn title="In your project directory, run:"
4343
ddn connector init my_pg -i
4444
```
4545

@@ -84,11 +84,11 @@ You can verify this worked by using Adminer to query all records from the `users
8484
SELECT * FROM users;
8585
```
8686

87-
```sh title="Next, use the CLI to introspect your PostgreSQL database:"
87+
```ddn title="Next, use the CLI to introspect your PostgreSQL database:"
8888
ddn connector introspect my_pg
8989
```
9090

91-
```sh title="Now, track the table from your PostgreSQL database as a model in your DDN metadata:"
91+
```ddn title="Now, track the table from your PostgreSQL database as a model in your DDN metadata:"
9292
ddn models add my_pg users
9393
```
9494

@@ -102,7 +102,7 @@ Metadata Language file to represent the `users` table from PostgreSQL in your AP
102102

103103
<TabItem value="TypeScript" label="TypeScript">
104104

105-
```bash title="Run the following command:"
105+
```ddn title="Run the following command:"
106106
ddn connector init my_ts -i
107107
```
108108

@@ -116,7 +116,7 @@ the entrypoint for your connector.
116116

117117
<TabItem value="Python" label="Python">
118118

119-
```bash title="Run the following command:"
119+
```ddn title="Run the following command:"
120120
ddn connector init my_python -i
121121
```
122122

@@ -130,7 +130,7 @@ be the entrypoint for your connector.
130130

131131
<TabItem value="Go" label="Go">
132132

133-
```bash title="Run the following command:"
133+
```ddn title="Run the following command:"
134134
ddn connector init my_go -i
135135
```
136136

@@ -221,7 +221,7 @@ func FunctionShoutName(ctx context.Context, state *types.State, arguments *Upper
221221

222222
<TabItem value="TypeScript" label="TypeScript">
223223

224-
```bash title="Introspect the connector:"
224+
```ddn title="Introspect the connector:"
225225
ddn connector introspect my_ts
226226
```
227227

@@ -234,7 +234,7 @@ ddn command add my_ts shoutName
234234

235235
<TabItem value="Python" label="Python">
236236

237-
```bash title="Introspect the connector:"
237+
```ddn title="Introspect the connector:"
238238
ddn connector introspect my_python
239239
```
240240

@@ -247,7 +247,7 @@ ddn command add my_python shoutName
247247

248248
<TabItem value="Go" label="Go">
249249

250-
```bash title="Introspect the connector:"
250+
```ddn title="Introspect the connector:"
251251
ddn connector introspect my_go
252252
```
253253

@@ -284,15 +284,15 @@ definition:
284284
285285
## Step 7. Create a new build and test
286286
287-
```bash title="Create a new build:"
287+
```ddn title="Create a new build:"
288288
ddn supergraph build local
289289
```
290290

291-
```bash title="Start your services:"
291+
```ddn title="Start your services:"
292292
ddn run docker-start
293293
```
294294

295-
```bash title="Open your local console:"
295+
```ddn title="Open your local console:"
296296
ddn console --local
297297
```
298298

docs/business-logic/tutorials/3-format-datetime-objects.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ below. You can adapt this recipe to fit your individual needs.**
123123
To add your function, generate the related metadata that will link together any functions in your lambda connector's
124124
source files and your API:
125125

126-
```bash
126+
```ddn
127127
ddn connector introspect <connector_name>
128128
```
129129

130130
Then, you can generate an `hml` file for the function using the following command:
131131

132-
```bash
132+
```ddn
133133
ddn command add <connector_name> "*"
134134
```
135135

@@ -164,7 +164,7 @@ definition:
164164
165165
Create a new build of your supergraph:
166166
167-
```sh
167+
```ddn
168168
ddn supergraph build local
169169
```
170170

docs/business-logic/tutorials/3-hash-passwords.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -135,21 +135,21 @@ across many systems.**
135135
To add your function, generate the related metadata that will link together any functions in your lambda connector's
136136
source files and your API:
137137

138-
```bash
138+
```ddn
139139
ddn connector introspect <connector_name>
140140
```
141141

142142
Then, you can generate an `hml` file for the function using the following command:
143143

144-
```bash
144+
```ddn
145145
ddn command add <connector_name> "*"
146146
```
147147

148148
### Step 3. Test your function
149149

150150
Create a new build of your supergraph:
151151

152-
```sh
152+
```ddn
153153
ddn supergraph build local
154154
```
155155

0 commit comments

Comments
 (0)