Skip to content

Commit 757e5b1

Browse files
committed
chore: format, fix typos
1 parent 2c048f1 commit 757e5b1

File tree

4 files changed

+27
-26
lines changed

4 files changed

+27
-26
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ You can also use it in your `package.json` scripts.
118118
// package.json
119119
{
120120
"scripts": {
121-
"import-my-data": "backfire import path-to-my-data ..."
122-
}
121+
"import-my-data": "backfire import path-to-my-data ...",
122+
},
123123
}
124124
```
125125

@@ -129,7 +129,7 @@ All options listed in the documentation have a CLI flag equivalent unless
129129
otherwise specified. The flag will always be `--` followed by the option name.
130130
For example, the option `limit` can be passed on the CLI using `--limit`. In
131131
most cases, a shorthand may be available. Use the `backfire [command] --help`
132-
command to see the available options and their repsective flags.
132+
command to see the available options and their respective flags.
133133

134134
#### CLI examples <!-- omit in toc -->
135135

@@ -236,7 +236,7 @@ interface.
236236
| ------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
237237
| paths | `string[]` | Provide a list of paths where you want to export data from. This can be a collection path (e.g. `emails`), or a path to a document (e.g. `emails/1`). If not specified, all paths will be exported, starting from the root collections. |
238238
| match | `RegExp[]` | Provide a list of regex patterns that a document path must match to be exported. |
239-
| ignore | `RegExp[]` | Provide a list of regex patterns that prevent a document from being exported when its path matches any of the patterns. Takes precendence over `match`. |
239+
| ignore | `RegExp[]` | Provide a list of regex patterns that prevent a document from being exported when its path matches any of the patterns. Takes precedence over `match`. |
240240
| depth | `number` | Limit the subcollection depth to export documents from. Documents in the root collection have a depth of 0. If not specified, no limit is applied. |
241241
| limit | `number` | Limit the number of documents to export. If not specified, no limit is applied. |
242242
| overwrite | `boolean` | Overwrite any existing data at the output path. Defaults to `false`. |
@@ -304,7 +304,7 @@ interface.
304304
| ----------------- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
305305
| paths | `string[]` | Provide a list of paths where you want to import data from. This can be a collection path (e.g. `emails`), or a path to a document (e.g. `emails/1`). If not specified, all paths will be imported. |
306306
| match | `RegExp[]` | Provide a list of regex patterns that a document path must match to be imported. |
307-
| ignore | `RegExp[]` | Provide a list of regex patterns that prevent a document from being imported if its path matches any of the patterns. Takes precendence over `match`. |
307+
| ignore | `RegExp[]` | Provide a list of regex patterns that prevent a document from being imported if its path matches any of the patterns. Takes precedence over `match`. |
308308
| depth | `number` | Limit the subcollection depth to import documents from. Documents in the root collection have a depth of 0. If not specified, no limit is applied. |
309309
| limit | `number` | Limit the number of documents to import. If not specified, no limit is applied. |
310310
| mode | `"create"` `"insert"` `"overwrite"` `"merge"` | Specify how to handle importing documents that would overwrite existing data. See the [import mode](#import-mode) section for more information. Defaults to `create`. |
@@ -321,8 +321,8 @@ cases. Considered internal, so may change as implementation changes.
321321
The `mode` option specifies how to handle importing documents that would
322322
overwrite existing data in Firestore. The default import mode is `create`.
323323

324-
- `create` mode will log an error when impporting documents that already exist
325-
in Firestore, and existing documents will not be modified.
324+
- `create` mode will log an error when importing documents that already exist in
325+
Firestore, and existing documents will not be modified.
326326
- `insert` mode will only import documents that do not exist, and existing
327327
documents will not be modified.
328328
- `overwrite` mode will import documents that do not exist, and completely
@@ -435,7 +435,7 @@ options for the connection. Follows the
435435

436436
As an alternative, these options can also be provided through a
437437
[configuration file](#configuration-file) or as environment variables. Note that
438-
CLI options will always take precendence over environment variables.
438+
CLI options will always take precedence over environment variables.
439439

440440
- `GOOGLE_CLOUD_PROJECT` can be used to provide `project`
441441
- `GOOGLE_APPLICATION_CREDENTIALS` can be used to provide `keyFile`
@@ -447,7 +447,7 @@ providing connection options.
447447
## Data sources
448448

449449
A data source provides a way to to read and write data to an external location.
450-
This pacakge comes with a few implementations, and exports interfaces for you to
450+
This package comes with a few implementations, and exports interfaces for you to
451451
implement your own ones in Node if the provided implementations do not suit your
452452
needs.
453453

@@ -506,11 +506,11 @@ CLI options or through a [configuration file](#configuration-file).
506506
| ------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
507507
| awsRegion | `string` | The AWS region to use. |
508508
| awsProfile | `string` | The name of the profile to use from your local AWS credentials. Requires [@aws-sdk/credential-provider-ini](https://www.npmjs.com/package/@aws-sdk/credential-provider-ini) to be installed. |
509-
| awsAccessKeyId | `string` | The access key id to use. This takes precendence over the `awsProfile` option, which means that if you provide `awsProfile` as well as access keys, the access keys will be used. |
510-
| awsSecretAccessKey | `string` | The secret access key to use. This takes precendence over the `awsProfile` option, which means that if you provide `awsProfile` as well as access keys, the access keys will be used. |
509+
| awsAccessKeyId | `string` | The access key id to use. This takes precedence over the `awsProfile` option, which means that if you provide `awsProfile` as well as access keys, the access keys will be used. |
510+
| awsSecretAccessKey | `string` | The secret access key to use. This takes precedence over the `awsProfile` option, which means that if you provide `awsProfile` as well as access keys, the access keys will be used. |
511511

512512
- The `awsRegion` option is always required
513-
- You can choose to use either `awsProfile`, or `awsAcecssKeyId` and
513+
- You can choose to use either `awsProfile`, or `awsAccessKeyId` and
514514
`awsSecretAccessKey`
515515

516516
Alternatively, these values can also be provided through the corresponding

src/actions/exportFirestoreData/exportFirestoreData.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export async function exportFirestoreData(
2727
const level = options.quiet
2828
? "silent"
2929
: options.verbose
30-
? "verbose"
31-
: options.debug
32-
? "debug"
33-
: "info";
30+
? "verbose"
31+
: options.debug
32+
? "debug"
33+
: "info";
3434
const path = dir(writer.path);
3535
const logger = Logger.create("export", level);
3636
const log = logger.info.bind(logger);

src/actions/importFirestoreData/importFirestoreData.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export async function importFirestoreData(
2727
const level = options.quiet
2828
? "silent"
2929
: options.verbose
30-
? "verbose"
31-
: options.debug
32-
? "debug"
33-
: "info";
30+
? "verbose"
31+
: options.debug
32+
? "debug"
33+
: "info";
3434

3535
const path = dir(reader.path);
3636
const logger = Logger.create("import", level);

src/cli/options.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export const ProjectOption = ({
1919
action === "import"
2020
? "the Firebase project to import data to"
2121
: action === "export"
22-
? "the Firebase project to export data from"
23-
: "the Firebase project to read from",
22+
? "the Firebase project to export data from"
23+
: "the Firebase project to read from",
2424
);
2525

2626
export const KeyFileOption = () =>
@@ -118,7 +118,7 @@ export const UpdateRateOption = () =>
118118
// Advanced config options
119119

120120
export const ExploreIntervalOption = () =>
121-
new Option("--exploreInterval <millseconds>", "see documentation").argParser(
121+
new Option("--exploreInterval <milliseconds>", "see documentation").argParser(
122122
Parser.integer({ min: 1 }),
123123
);
124124

@@ -128,9 +128,10 @@ export const ExploreChunkSizeOption = () =>
128128
);
129129

130130
export const DownloadIntervalOption = () =>
131-
new Option("--downloadInterval <millseconds>", "see documentation").argParser(
132-
Parser.integer({ min: 1 }),
133-
);
131+
new Option(
132+
"--downloadInterval <milliseconds>",
133+
"see documentation",
134+
).argParser(Parser.integer({ min: 1 }));
134135

135136
export const DownloadChunkSizeOption = () =>
136137
new Option("--downloadChunkSize <size>", "see documentation").argParser(

0 commit comments

Comments
 (0)