You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-7Lines changed: 17 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Check out our [example repositories](https://github.com/githubocto?q=flat-demo&t
29
29
30
30
### Option 1: Flat Editor VSCode Extension
31
31
32
-
The easiest way to get a Flat Data action up and running is with the accompanying [Flat Editor VSCode Extension](https://marketplace.visualstudio.com/items?itemName=GitHubOCTO.flat) which helps you author Flat yml files.
32
+
The easiest way to get a Flat Data action up and running is with the accompanying [Flat Editor VSCode Extension](https://marketplace.visualstudio.com/items?itemName=GitHubOCTO.flat) which helps you author Flat yml files.
33
33
34
34
To use it, [install the extension](https://marketplace.visualstudio.com/items?itemName=GitHubOCTO.flat) and then invoke `Flat Editor` from the command palette within VSCode (Mac: ⌘⇧P, Others:ctrl-shift-P).
35
35
@@ -85,13 +85,13 @@ These two modes are exclusive; you cannot mix settings for these two in one Flat
85
85
86
86
#### `http_url`
87
87
88
-
A URL from which to fetch data. Specifying this input puts Flat into `http` mode.
88
+
A URL from which to fetch data. Specifying this input puts Flat into `http` mode.
89
89
90
90
This can be any endpoint: a json, csv, png, zip, xlsx, etc.
91
91
92
92
#### `downloaded_filename`
93
93
94
-
The name of the file to store data fetched by Flat.
94
+
The name of the file to store data fetched by Flat.
95
95
96
96
In `http` mode this can be anything. This can be any endpoint: a json, csv, txt, png, zip, xlsx, etc. file
97
97
@@ -111,7 +111,6 @@ If your `http_url` string contains secrets, you can choose to mask it from the c
@@ -128,19 +127,30 @@ A URI-style database connection string. Flat will use this connection string to
128
127
>
129
128
> If you're using the [flat-vscode extension](https://github.com/githubocto/flat-vscode), this is handled for you.
130
129
131
-
132
130
#### `sql_queryfile`
133
131
134
132
The pathname of the file containing the SQL query that will be issued to the database. Defaults to `.github/workflows/query.sql`. This path is relative to the root of your repo.
135
133
136
134
#### `downloaded_filename`
137
135
138
-
The name of the file to store data fetched by Flat.
136
+
The name of the file to store data fetched by Flat.
139
137
140
138
In `sql` mode this should be one of `csv` or `json`. SQL query results will be serialized to disk in the specified format.
141
139
142
140
> ⚠️ While the JSON is not pretty-printed, CSV is often a more efficient serialization for tabular data.
143
141
142
+
#### `typeorm_config` (optional)
143
+
144
+
A JSON string representing a configuration passed to [TypeORMs createConnection function](https://orkhan.gitbook.io/typeorm/docs/connection-api#main-api).
145
+
146
+
A common use case for this value is connecting your [Flat action to a Heroku database](https://github.com/typeorm/typeorm/issues/278).
147
+
148
+
For instance, you can pass the following configuration string to your Flat action in order to connect to a Heroku Postgres database.
A path to a local Deno javascript or typescript file for postprocessing the `downloaded_filename` file. Read more in the ["Postprocessing section"](https://github.com/githubocto/flat#postprocessing).
@@ -155,7 +165,7 @@ A signed number describing the number of bytes that changed in this run. If the
155
165
156
166
You can add a `postprocess` input in the Action which is path to a [deno](https://deno.land) Javascript or Typescript script that will be invoked to postprocess your data after it is fetched. This path is relative to the root of your repo.
157
167
158
-
The script can use either `Deno.args[0]` or the name of the `downloaded_filename` to access the file fetched by Flat Data.
168
+
The script can use either `Deno.args[0]` or the name of the `downloaded_filename` to access the file fetched by Flat Data.
159
169
160
170
```ts
161
171
import { readJSON, writeJSON } from 'https://deno.land/x/flat/mod.ts'
Copy file name to clipboardExpand all lines: dist/LICENSE
+4-12Lines changed: 4 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -15,15 +15,6 @@ MIT
15
15
16
16
@actions/io
17
17
MIT
18
-
The MIT License (MIT)
19
-
20
-
Copyright 2019 GitHub
21
-
22
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
23
-
24
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
25
-
26
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
18
28
19
@azure/ms-rest-azure-env
29
20
MIT
@@ -3100,7 +3091,7 @@ pg
3100
3091
MIT
3101
3092
MIT License
3102
3093
3103
-
Copyright (c) 2010 - 2021 Brian Carlson
3094
+
Copyright (c) 2010 - 2020 Brian Carlson
3104
3095
3105
3096
Permission is hereby granted, free of charge, to any person obtaining a copy
3106
3097
of this software and associated documentation files (the "Software"), to deal
@@ -3191,7 +3182,7 @@ pg-protocol
3191
3182
MIT
3192
3183
MIT License
3193
3184
3194
-
Copyright (c) 2010 - 2021 Brian Carlson
3185
+
Copyright (c) 2010 - 2020 Brian Carlson
3195
3186
3196
3187
Permission is hereby granted, free of charge, to any person obtaining a copy
3197
3188
of this software and associated documentation files (the "Software"), to deal
@@ -4208,7 +4199,8 @@ MIT
4208
4199
4209
4200
underscore
4210
4201
MIT
4211
-
Copyright (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
4202
+
Copyright (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative
4203
+
Reporters & Editors
4212
4204
4213
4205
Permission is hereby granted, free of charge, to any person
4214
4206
obtaining a copy of this software and associated documentation
0 commit comments