firestore-meilisearch 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/{functions/.eslintignore → .eslintignore} +0 -0
  2. package/{functions/.eslintrc.js → .eslintrc.js} +0 -0
  3. package/{functions/__tests__ → __tests__}/__mocks__/console.ts +0 -0
  4. package/{functions/__tests__ → __tests__}/adapter.test.ts +0 -0
  5. package/{functions/__tests__ → __tests__}/config.test.ts +0 -0
  6. package/{functions/__tests__ → __tests__}/data/document.ts +0 -0
  7. package/{functions/__tests__ → __tests__}/data/environment.ts +0 -0
  8. package/{functions/__tests__ → __tests__}/functions.test.ts +0 -0
  9. package/{functions/__tests__ → __tests__}/jest.setup.ts +0 -0
  10. package/{functions/__tests__ → __tests__}/test.types.d.ts +0 -0
  11. package/{functions/__tests__ → __tests__}/tsconfig.json +0 -0
  12. package/{functions/__tests__ → __tests__}/util.test.ts +0 -0
  13. package/{functions/jest.config.js → jest.config.js} +0 -0
  14. package/{functions/lib → lib}/adapter.js +0 -0
  15. package/{functions/lib → lib}/config.js +0 -0
  16. package/{functions/lib → lib}/import/config.js +0 -0
  17. package/{functions/lib → lib}/import/index.js +0 -0
  18. package/{functions/lib → lib}/index.js +0 -0
  19. package/{functions/lib → lib}/logs.js +0 -0
  20. package/{functions/lib → lib}/meilisearch/create-index.js +0 -0
  21. package/{functions/lib → lib}/meilisearch-index.js +0 -0
  22. package/{functions/lib → lib}/types.js +0 -0
  23. package/{functions/lib → lib}/util.js +0 -0
  24. package/{functions/lib → lib}/version.js +1 -1
  25. package/package.json +48 -17
  26. package/{functions/src → src}/adapter.ts +0 -0
  27. package/{functions/src → src}/config.ts +0 -0
  28. package/{functions/src → src}/import/config.ts +0 -0
  29. package/{functions/src → src}/import/index.ts +0 -0
  30. package/{functions/src → src}/index.ts +0 -0
  31. package/{functions/src → src}/logs.ts +0 -0
  32. package/{functions/src → src}/meilisearch/create-index.ts +0 -0
  33. package/{functions/src → src}/types.ts +0 -0
  34. package/{functions/src → src}/util.ts +0 -0
  35. package/src/version.ts +1 -0
  36. package/{functions/tsconfig.eslint.json → tsconfig.eslint.json} +0 -0
  37. package/{functions/tsconfig.json → tsconfig.json} +0 -0
  38. package/.editorconfig +0 -20
  39. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -26
  40. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -18
  41. package/.github/ISSUE_TEMPLATE/other.md +0 -7
  42. package/.github/dependatbot.yml +0 -23
  43. package/.github/release-draft-template.yml +0 -33
  44. package/.github/scripts/check-release.sh +0 -42
  45. package/.github/workflows/publish.yml +0 -30
  46. package/.github/workflows/release-drafter.yml +0 -16
  47. package/.github/workflows/test.yml +0 -42
  48. package/CHANGELOG.md +0 -7
  49. package/CONTRIBUTING.md +0 -236
  50. package/LICENSE +0 -201
  51. package/POSTINSTALL.md +0 -40
  52. package/PREINSTALL.md +0 -42
  53. package/README.md +0 -128
  54. package/bors.toml +0 -8
  55. package/dataset/firebase-export-metadata.json +0 -8
  56. package/dataset/firestore_export/all_namespaces/all_kinds/all_namespaces_all_kinds.export_metadata +0 -0
  57. package/dataset/firestore_export/all_namespaces/all_kinds/output-0 +0 -0
  58. package/dataset/firestore_export/firestore_export.overall_export_metadata +0 -0
  59. package/extension.yaml +0 -176
  60. package/firebase.json +0 -20
  61. package/functions/package.json +0 -53
  62. package/functions/src/version.ts +0 -1
  63. package/functions/yarn.lock +0 -5287
  64. package/guides/IMPORT_EXISTING_DOCUMENTS.md +0 -74
  65. package/script/version.sh +0 -51
  66. package/test-params-example.env +0 -9
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = '0.1.1';
4
+ exports.version = '0.1.2';
package/package.json CHANGED
@@ -1,21 +1,52 @@
1
1
  {
2
2
  "name": "firestore-meilisearch",
3
- "version": "0.1.1",
4
- "description": "Search in your Firestore content with Meilisearch",
5
- "repository": "",
6
- "author": "Meilisearch (https://meilisearch.com/)",
7
- "license": "Apache-2.0",
3
+ "version": "0.1.2",
8
4
  "scripts": {
9
- "emulator": "firebase ext:dev:emulators:start --test-params=test-params-example.env --import=dataset --project=meilisearch --config=./firebase.json",
10
- "lint": "yarn --cwd functions lint",
11
- "lint:fix": "yarn --cwd functions lint:fix",
12
- "build": "yarn --cwd functions build",
13
- "watch": "yarn --cwd functions watch",
14
- "playground": "yarn --cwd functions playground",
15
- "install:functions": "yarn --cwd functions",
16
- "test": "yarn --cwd functions test",
17
- "test:watch": "yarn --cwd functions test:watch",
18
- "test:coverage": "yarn --cwd functions test:coverage",
19
- "run-cli": "./functions/lib/import/index.js"
20
- }
5
+ "lint": "eslint .",
6
+ "lint:fix": "eslint . --fix",
7
+ "build": "tsc",
8
+ "watch": "tsc --watch",
9
+ "playground": "nodemon ./lib/import --project 521120192778 --source-collection-path movies --index movies --batch-size 300 --non-interactive -H 'http://localhost:7700' -a masterKey",
10
+ "serve": "yarn build && firebase emulators:start --only functions",
11
+ "shell": "yarn build && firebase functions:shell",
12
+ "start": "yarn shell",
13
+ "deploy": "firebase deploy --only functions",
14
+ "logs": "firebase functions:log",
15
+ "test": "jest",
16
+ "test:watch": "jest --watch",
17
+ "test:coverage": "jest --coverage"
18
+ },
19
+ "engines": {
20
+ "node": ">=14.0.0"
21
+ },
22
+ "main": "lib/index.js",
23
+ "dependencies": {
24
+ "firebase-admin": "^9.8.0",
25
+ "firebase-functions": "^3.16.0",
26
+ "meilisearch": "^0.25.0"
27
+ },
28
+ "devDependencies": {
29
+ "@babel/preset-typescript": "^7.15.0",
30
+ "@types/jest": "^27.0.2",
31
+ "@typescript-eslint/eslint-plugin": "^4.32.0",
32
+ "@typescript-eslint/parser": "^4.32.0",
33
+ "commander": "^8.3.0",
34
+ "eslint": "^7.6.0",
35
+ "eslint-config-google": "^0.14.0",
36
+ "eslint-config-prettier": "^8.3.0",
37
+ "eslint-plugin-import": "^2.24.2",
38
+ "eslint-plugin-jest": "^24.4.2",
39
+ "eslint-plugin-prettier": "^4.0.0",
40
+ "firebase-functions-test": "^0.3.2",
41
+ "inquirer": "^8.2.0",
42
+ "jest": "^27.2.2",
43
+ "jest-mock": "^27.1.1",
44
+ "js-yaml": "^4.1.0",
45
+ "mocked-env": "^1.3.5",
46
+ "prettier": "^2.4.1",
47
+ "ts-jest": "^27.0.5",
48
+ "ts-node": "^10.2.1",
49
+ "typescript": "^4.4.3"
50
+ },
51
+ "bin": "lib/import/index.js"
21
52
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/version.ts ADDED
@@ -0,0 +1 @@
1
+ export const version = '0.1.2'
File without changes
package/.editorconfig DELETED
@@ -1,20 +0,0 @@
1
- # EditorConfig is awesome: https://EditorConfig.org
2
-
3
- # top-most EditorConfig file
4
- root = true
5
-
6
- [*]
7
- indent_style = space
8
- indent_size = 2
9
- end_of_line = lf
10
- charset = utf-8
11
- trim_trailing_whitespace = true
12
- insert_final_newline = true
13
- max_line_length = 80
14
- quote_type = single
15
-
16
- [*.{js,ts}]
17
- quote_type = single
18
- curly_bracket_next_line = false
19
- spaces_around_brackets = inside
20
- indent_brace_style = BSD KNF
@@ -1,26 +0,0 @@
1
- ---
2
- name: Bug Report 🐞
3
- about: Create a report to help us improve.
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
- ---
8
-
9
- <!-- This is not an exhaustive model but a help. No step is mandatory. -->
10
-
11
- **Description**
12
- Description of what the bug is about.
13
-
14
- **Expected behavior**
15
- What you expected to happen.
16
-
17
- **Current behavior**
18
- What happened.
19
-
20
- **Screenshots or Logs**
21
- If applicable, add screenshots or logs to help explain your problem.
22
-
23
- **Environment (please complete the following information):**
24
- - OS: [e.g. Debian GNU/Linux]
25
- - Meilisearch version: [e.g. v.0.20.0]
26
- - firestore-meilisearch version: [e.g v0.1.0]
@@ -1,18 +0,0 @@
1
- ---
2
- name: Feature Request 💡
3
- about: Suggest a new idea for the project.
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
- ---
8
-
9
- <!-- This is not an exhaustive model but a help. No step is mandatory. -->
10
-
11
- **Description**
12
- Brief explanation of the feature.
13
-
14
- **Basic example**
15
- If the proposal involves something new or a change, include a basic example. How would you use the feature? In which context?
16
-
17
- **Other**
18
- Any other things you want to add.
@@ -1,7 +0,0 @@
1
- ---
2
- name: Other
3
- about: Any other topic you want to talk about.
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
- ---
@@ -1,23 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: 'npm'
4
- directory: '/'
5
- schedule:
6
- interval: weekly
7
- time: "04:00"
8
- open-pull-requests-limit: 10
9
- labels:
10
- - skip-changelog
11
- - dependencies
12
- ignore:
13
- - dependency-name: 'eslint*'
14
- - dependency-name: 'prettier*'
15
- rebase-strategy: disabled
16
- - package-ecosystem: github-actions
17
- directory: '/functions'
18
- schedule:
19
- interval: weekly
20
- time: "04:00"
21
- labels:
22
- - skip-changelog
23
- - dependencies
@@ -1,33 +0,0 @@
1
- name-template: 'v$RESOLVED_VERSION 🔥'
2
- tag-template: 'v$RESOLVED_VERSION'
3
- exclude-labels:
4
- - 'skip-changelog'
5
- version-resolver:
6
- minor:
7
- labels:
8
- - 'breaking-change'
9
- default: patch
10
- categories:
11
- - title: '⚠️ Breaking changes'
12
- label: 'breaking-change'
13
- - title: '🚀 Enhancements'
14
- label: 'enhancement'
15
- - title: '🐛 Bug Fixes'
16
- label: 'bug'
17
- - title: '🔒 Security'
18
- label: 'security'
19
- template: |
20
- $CHANGES
21
-
22
- Thanks again to $CONTRIBUTORS! 🎉
23
- no-changes-template: 'Changes are coming soon 😎'
24
- sort-direction: 'ascending'
25
- replacers:
26
- - search: '/(?:and )?@dependabot-preview(?:\[bot\])?,?/g'
27
- replace: ''
28
- - search: '/(?:and )?@dependabot(?:\[bot\])?,?/g'
29
- replace: ''
30
- - search: '/(?:and )?@bors(?:\[bot\])?,?/g'
31
- replace: ''
32
- - search: '/(?:and )?@meili-bot,?/g'
33
- replace: ''
@@ -1,42 +0,0 @@
1
- #!/bin/sh
2
-
3
- # Checking if current tag matches the package version
4
- current_tag=$(echo $GITHUB_REF | cut -d '/' -f 3 | tr -d ' ',v)
5
- package_file_tag=$(grep '"version":' package.json | cut -d ':' -f 2- | tr -d ' ' | tr -d '"' | tr -d ',')
6
- package_function_tag=$(grep '"version":' functions/package.json | cut -d ':' -f 2- | tr -d ' ' | tr -d '"' | tr -d ',')
7
- extension_tag=$(grep "version:" extension.yaml | cut -d ":" -f 2- | tr -d " " )
8
- version_js_tag=$(grep "version =" functions/src/version.ts | cut -d "=" -f 2- | tr -d " " | tr -d "'" )
9
- version_ts_tag=$(grep "version =" functions/lib/version.js | cut -d "=" -f 2- | tr -d " "| tr -d "'" | tr -d ";" | tail -n1 )
10
-
11
- if [ "$current_tag" != "$package_file_tag" ]; then
12
- echo "Error: the current tag does not match the version in package file."
13
- echo "$current_tag vs $package_file_tag"
14
- exit 1
15
- fi
16
-
17
- if [ "$current_tag" != "$package_function_tag" ]; then
18
- echo "Error: the current tag does not match the version in package file inside the function directory."
19
- echo "$current_tag vs $package_function_tag"
20
- exit 1
21
- fi
22
-
23
- if [ "$current_tag" != "$extension_tag" ]; then
24
- echo "Error: the current tag does not match the version in the extension file."
25
- echo "$current_tag vs $extension_tag"
26
- exit 1
27
- fi
28
-
29
- if [ "$current_tag" != "$version_ts_tag" ]; then
30
- echo "Error: the current tag does not match the version in the version.ts file."
31
- echo "$current_tag vs $version_ts_tag"
32
- exit 1
33
- fi
34
-
35
- if [ "$current_tag" != "$version_js_tag" ]; then
36
- echo "Error: the current tag does not match the version in the version.js file, you need to build the package."
37
- echo "$current_tag vs $version_js_tag"
38
- exit 1
39
- fi
40
-
41
- echo 'OK'
42
- exit 0
@@ -1,30 +0,0 @@
1
- name: publish to npm
2
- on:
3
- release:
4
- types: [published]
5
-
6
- jobs:
7
- publish-npm:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - uses: actions/checkout@v2
11
- - uses: actions/setup-node@v2
12
- with:
13
- node-version: 14
14
- registry-url: https://registry.npmjs.org/
15
- - name: Check release validity
16
- run: sh .github/scripts/check-release.sh
17
- - name: Install dependencies
18
- run: yarn && yarn install:functions
19
- - name: Enter functions directory
20
- run: cd functions
21
- - name: Publish with latest tag
22
- if: "!github.event.release.prerelease"
23
- run: npm publish .
24
- env:
25
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
26
- - name: Publish with beta tag
27
- if: "github.event.release.prerelease"
28
- run: npm publish . --tag beta
29
- env:
30
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
@@ -1,16 +0,0 @@
1
- name: Release Drafter
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- update_release_draft:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: release-drafter/release-drafter@v5
13
- with:
14
- config-name: release-draft-template.yml
15
- env:
16
- GITHUB_TOKEN: ${{ secrets.RELEASE_DRAFTER_TOKEN }}
@@ -1,42 +0,0 @@
1
- name: Tests
2
-
3
- on:
4
- pull_request:
5
- push:
6
- # trying and staging branches are for BORS config
7
- branches:
8
- - trying
9
- - staging
10
- - main
11
-
12
- jobs:
13
- linter:
14
- name: linter
15
- runs-on: ubuntu-latest
16
- steps:
17
- - uses: actions/checkout@v2
18
- - name: Setup node
19
- uses: actions/setup-node@v2
20
- with:
21
- node-version: 14
22
- - name: Install dependencies
23
- run: yarn install:functions
24
- - name: Run style check
25
- run: yarn lint
26
-
27
- integration-tests:
28
- name: integration-tests
29
- runs-on: ubuntu-latest
30
- strategy:
31
- matrix:
32
- node: ["14", "16", "17"]
33
- steps:
34
- - uses: actions/checkout@v2
35
- - name: Setup node
36
- uses: actions/setup-node@v1
37
- with:
38
- node-version: ${{ matrix.node }}
39
- - name: Install dependencies
40
- run: yarn install:functions
41
- - name: Run tests with coverage
42
- run: yarn test:coverage
package/CHANGELOG.md DELETED
@@ -1,7 +0,0 @@
1
- ## Version 0.1.0
2
-
3
- Initial release of the _Search in your Firestore content with Meilisearch_ extension.
4
-
5
- ## Version 0.1.1
6
-
7
- Revert upgrade of firebase-admin package