Skip to content

Commit cc8e718

Browse files
author
Gorbasch
committed
add prettier formatting
1 parent 4250b6a commit cc8e718

File tree

15 files changed

+431
-125
lines changed

15 files changed

+431
-125
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/.vscode/
2-
2+
/node_modules/
33
target/

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules/
2+
target/

.prettierrc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"singleQuote": true,
3+
"bracketSameLine": true,
4+
"htmlWhitespaceSensitivity": "ignore",
5+
"singleAttributePerLine": true,
6+
"tabWidth": 4,
7+
"plugins": ["@prettier/plugin-xml", "prettier-plugin-java"],
8+
"overrides": [
9+
{
10+
"files": ".*rc",
11+
"options": {
12+
"parser": "json"
13+
}
14+
},
15+
{
16+
"files": "*.(c|le|sa|sc)ss",
17+
"options": {
18+
"printWidth": 999
19+
}
20+
},
21+
{
22+
"files": "*.xml",
23+
"options": {
24+
"printWidth": 120,
25+
"xmlWhitespaceSensitivity": "ignore"
26+
}
27+
},
28+
{
29+
"files": "*.y*ml",
30+
"options": {
31+
"tabWidth": 2
32+
}
33+
}
34+
]
35+
}

examples/google-business-profile/Google_Business_Profile_Example.xml

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
22
<template encoding-version="1.3">
33
<description>This is a minimal example template for connecting to the Google Business Profile API.</description>
44
<groupId>c6fd7b1d-0186-1000-c9ec-446fee942a22</groupId>
@@ -17,10 +17,10 @@
1717
<flowFileExpiration>0 sec</flowFileExpiration>
1818
<labelIndex>1</labelIndex>
1919
<loadBalanceCompression>DO_NOT_COMPRESS</loadBalanceCompression>
20-
<loadBalancePartitionAttribute></loadBalancePartitionAttribute>
20+
<loadBalancePartitionAttribute />
2121
<loadBalanceStatus>LOAD_BALANCE_NOT_CONFIGURED</loadBalanceStatus>
2222
<loadBalanceStrategy>DO_NOT_LOAD_BALANCE</loadBalanceStrategy>
23-
<name></name>
23+
<name />
2424
<selectedRelationships>Failure</selectedRelationships>
2525
<selectedRelationships>No Retry</selectedRelationships>
2626
<selectedRelationships>Original</selectedRelationships>
@@ -42,7 +42,7 @@
4242
<group>org.apache.nifi</group>
4343
<version>1.20.0</version>
4444
</bundle>
45-
<comments></comments>
45+
<comments />
4646
<descriptors>
4747
<entry>
4848
<key>application-default-credentials</key>
@@ -71,7 +71,9 @@
7171
<entry>
7272
<key>proxy-configuration-service</key>
7373
<value>
74-
<identifiesControllerService>org.apache.nifi.proxy.ProxyConfigurationService</identifiesControllerService>
74+
<identifiesControllerService>
75+
org.apache.nifi.proxy.ProxyConfigurationService
76+
</identifiesControllerService>
7577
<name>proxy-configuration-service</name>
7678
</value>
7779
</entry>
@@ -109,12 +111,14 @@
109111
<group>com.dloop</group>
110112
<version>0.1.0</version>
111113
</bundle>
112-
<comments></comments>
114+
<comments />
113115
<descriptors>
114116
<entry>
115117
<key>gcp-credentials-provider-service</key>
116118
<value>
117-
<identifiesControllerService>org.apache.nifi.gcp.credentials.service.GCPCredentialsService</identifiesControllerService>
119+
<identifiesControllerService>
120+
org.apache.nifi.gcp.credentials.service.GCPCredentialsService
121+
</identifiesControllerService>
118122
<name>gcp-credentials-provider-service</name>
119123
</value>
120124
</entry>
@@ -164,7 +168,7 @@
164168
<config>
165169
<backoffMechanism>PENALIZE_FLOWFILE</backoffMechanism>
166170
<bulletinLevel>WARN</bulletinLevel>
167-
<comments></comments>
171+
<comments />
168172
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount>
169173
<descriptors>
170174
<entry>
@@ -188,7 +192,9 @@
188192
<entry>
189193
<key>SSL Context Service</key>
190194
<value>
191-
<identifiesControllerService>org.apache.nifi.ssl.SSLContextService</identifiesControllerService>
195+
<identifiesControllerService>
196+
org.apache.nifi.ssl.SSLContextService
197+
</identifiesControllerService>
192198
<name>SSL Context Service</name>
193199
</value>
194200
</entry>
@@ -219,7 +225,9 @@
219225
<entry>
220226
<key>proxy-configuration-service</key>
221227
<value>
222-
<identifiesControllerService>org.apache.nifi.proxy.ProxyConfigurationService</identifiesControllerService>
228+
<identifiesControllerService>
229+
org.apache.nifi.proxy.ProxyConfigurationService
230+
</identifiesControllerService>
223231
<name>proxy-configuration-service</name>
224232
</value>
225233
</entry>
@@ -233,7 +241,7 @@
233241
<key>Proxy Port</key>
234242
<value>
235243
<dependencies>
236-
<propertyName>Proxy Host</propertyName>
244+
<propertyName>Proxy Host</propertyName>
237245
</dependencies>
238246
<name>Proxy Port</name>
239247
</value>
@@ -242,7 +250,7 @@
242250
<key>Proxy Type</key>
243251
<value>
244252
<dependencies>
245-
<propertyName>Proxy Host</propertyName>
253+
<propertyName>Proxy Host</propertyName>
246254
</dependencies>
247255
<name>Proxy Type</name>
248256
</value>
@@ -251,7 +259,7 @@
251259
<key>invokehttp-proxy-user</key>
252260
<value>
253261
<dependencies>
254-
<propertyName>Proxy Host</propertyName>
262+
<propertyName>Proxy Host</propertyName>
255263
</dependencies>
256264
<name>invokehttp-proxy-user</name>
257265
</value>
@@ -260,15 +268,17 @@
260268
<key>invokehttp-proxy-password</key>
261269
<value>
262270
<dependencies>
263-
<propertyName>Proxy Host</propertyName>
271+
<propertyName>Proxy Host</propertyName>
264272
</dependencies>
265273
<name>invokehttp-proxy-password</name>
266274
</value>
267275
</entry>
268276
<entry>
269277
<key>oauth2-access-token-provider</key>
270278
<value>
271-
<identifiesControllerService>org.apache.nifi.oauth2.OAuth2AccessTokenProvider</identifiesControllerService>
279+
<identifiesControllerService>
280+
org.apache.nifi.oauth2.OAuth2AccessTokenProvider
281+
</identifiesControllerService>
272282
<name>oauth2-access-token-provider</name>
273283
</value>
274284
</entry>
@@ -288,7 +298,7 @@
288298
<key>Digest Authentication</key>
289299
<value>
290300
<dependencies>
291-
<propertyName>Basic Authentication Username</propertyName>
301+
<propertyName>Basic Authentication Username</propertyName>
292302
</dependencies>
293303
<name>Digest Authentication</name>
294304
</value>
@@ -303,10 +313,10 @@
303313
<key>send-message-body</key>
304314
<value>
305315
<dependencies>
306-
<dependentValues>POST</dependentValues>
307-
<dependentValues>PATCH</dependentValues>
308-
<dependentValues>PUT</dependentValues>
309-
<propertyName>HTTP Method</propertyName>
316+
<dependentValues>POST</dependentValues>
317+
<dependentValues>PATCH</dependentValues>
318+
<dependentValues>PUT</dependentValues>
319+
<propertyName>HTTP Method</propertyName>
310320
</dependencies>
311321
<name>send-message-body</name>
312322
</value>
@@ -315,8 +325,8 @@
315325
<key>form-body-form-name</key>
316326
<value>
317327
<dependencies>
318-
<dependentValues>true</dependentValues>
319-
<propertyName>send-message-body</propertyName>
328+
<dependentValues>true</dependentValues>
329+
<propertyName>send-message-body</propertyName>
320330
</dependencies>
321331
<name>form-body-form-name</name>
322332
</value>
@@ -325,7 +335,7 @@
325335
<key>set-form-filename</key>
326336
<value>
327337
<dependencies>
328-
<propertyName>form-body-form-name</propertyName>
338+
<propertyName>form-body-form-name</propertyName>
329339
</dependencies>
330340
<name>set-form-filename</name>
331341
</value>
@@ -334,10 +344,10 @@
334344
<key>Use Chunked Encoding</key>
335345
<value>
336346
<dependencies>
337-
<dependentValues>POST</dependentValues>
338-
<dependentValues>PATCH</dependentValues>
339-
<dependentValues>PUT</dependentValues>
340-
<propertyName>HTTP Method</propertyName>
347+
<dependentValues>POST</dependentValues>
348+
<dependentValues>PATCH</dependentValues>
349+
<dependentValues>PUT</dependentValues>
350+
<propertyName>HTTP Method</propertyName>
341351
</dependencies>
342352
<name>Use Chunked Encoding</name>
343353
</value>
@@ -346,10 +356,10 @@
346356
<key>Content-Encoding</key>
347357
<value>
348358
<dependencies>
349-
<dependentValues>POST</dependentValues>
350-
<dependentValues>PATCH</dependentValues>
351-
<dependentValues>PUT</dependentValues>
352-
<propertyName>HTTP Method</propertyName>
359+
<dependentValues>POST</dependentValues>
360+
<dependentValues>PATCH</dependentValues>
361+
<dependentValues>PUT</dependentValues>
362+
<propertyName>HTTP Method</propertyName>
353363
</dependencies>
354364
<name>Content-Encoding</name>
355365
</value>
@@ -358,10 +368,10 @@
358368
<key>Content-Type</key>
359369
<value>
360370
<dependencies>
361-
<dependentValues>POST</dependentValues>
362-
<dependentValues>PATCH</dependentValues>
363-
<dependentValues>PUT</dependentValues>
364-
<propertyName>HTTP Method</propertyName>
371+
<dependentValues>POST</dependentValues>
372+
<dependentValues>PATCH</dependentValues>
373+
<dependentValues>PUT</dependentValues>
374+
<propertyName>HTTP Method</propertyName>
365375
</dependencies>
366376
<name>Content-Type</name>
367377
</value>
@@ -394,7 +404,7 @@
394404
<key>Max Length To Put In Attribute</key>
395405
<value>
396406
<dependencies>
397-
<propertyName>Put Response Body In Attribute</propertyName>
407+
<propertyName>Put Response Body In Attribute</propertyName>
398408
</dependencies>
399409
<name>Max Length To Put In Attribute</name>
400410
</value>
@@ -415,8 +425,8 @@
415425
<key>etag-max-cache-size</key>
416426
<value>
417427
<dependencies>
418-
<dependentValues>true</dependentValues>
419-
<propertyName>use-etag</propertyName>
428+
<dependentValues>true</dependentValues>
429+
<propertyName>use-etag</propertyName>
420430
</dependencies>
421431
<name>etag-max-cache-size</name>
422432
</value>
@@ -632,7 +642,7 @@
632642
<retry>false</retry>
633643
</relationships>
634644
<state>STOPPED</state>
635-
<style/>
645+
<style />
636646
<type>org.apache.nifi.processors.standard.InvokeHTTP</type>
637647
</processors>
638648
<processors>
@@ -650,7 +660,7 @@
650660
<config>
651661
<backoffMechanism>PENALIZE_FLOWFILE</backoffMechanism>
652662
<bulletinLevel>WARN</bulletinLevel>
653-
<comments></comments>
663+
<comments />
654664
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount>
655665
<descriptors>
656666
<entry>
@@ -770,7 +780,7 @@
770780
<retry>false</retry>
771781
</relationships>
772782
<state>STOPPED</state>
773-
<style/>
783+
<style />
774784
<type>org.apache.nifi.processors.standard.LogAttribute</type>
775785
</processors>
776786
</snippet>

examples/google-business-profile/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
This example runs a [Method: accounts.list](https://developers.google.com/my-business/reference/accountmanagement/rest/v1/accounts/list) request from the Google Business Profile API.
44

55
## Requirements
6+
67
1. Access to a Google (service) account through Application Default Credentials, Compute Engine Credentials or Service Account JSON.
78
2. The GCP project that corresponds to the account has to enable the Google Business Profile API (requires filling out a form and waiting for Google's acceptance).
89
3. Access to a Google Business Profile with that account (not necessary for this test call).
910
4. This module must be [built](../../README.md#manual-build) and NiFi restarted.
1011

1112
## Use Template
13+
1214
1. [Upload example template](https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Import_Template).
1315
2. Add example template ("Template" action in top navigation).
1416

1517
## Configure controller services
18+
1619
1. Click anywhere to focus the process group.
1720
2. Open process group configuration.
1821
3. Open "Controller Services" tab.
@@ -24,6 +27,7 @@ This example runs a [Method: accounts.list](https://developers.google.com/my-bus
2427
9. Close process group configuration window.
2528

2629
## Test InvokeHTTP processor
30+
2731
1. Right click "InvokeHTTP" and select "Run Once" from menu.
2832
2. When the processor has finished and the view has been refreshed it should say "Queued 1 (xxx bytes)" on the Connection.
2933
3. Right click Connection and select "List Queue" from menu.

0 commit comments

Comments
 (0)