flagsmith-nodejs 2.5.2 → 3.0.1

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 (47) hide show
  1. package/.github/workflows/publish.yml +25 -0
  2. package/build/flagsmith-engine/identities/models.d.ts +1 -1
  3. package/build/flagsmith-engine/identities/models.js +2 -1
  4. package/build/flagsmith-engine/segments/evaluators.js +3 -2
  5. package/examples/README.md +3 -0
  6. package/flagsmith-engine/identities/models.ts +3 -1
  7. package/flagsmith-engine/segments/evaluators.ts +4 -3
  8. package/package.json +1 -1
  9. package/tests/engine/unit/segments/segment_evaluators.test.ts +46 -6
  10. package/.vscode/launch.json +0 -18
  11. package/examples/api-proxy/.babelrc +0 -3
  12. package/examples/api-proxy/.eslintrc +0 -8
  13. package/examples/api-proxy/README.md +0 -12
  14. package/examples/api-proxy/package-lock.json +0 -10889
  15. package/examples/api-proxy/package.json +0 -57
  16. package/examples/api-proxy/src/api/index.js +0 -42
  17. package/examples/api-proxy/src/index.js +0 -29
  18. package/examples/basic/.babelrc +0 -3
  19. package/examples/basic/.eslintrc +0 -8
  20. package/examples/basic/README.md +0 -10
  21. package/examples/basic/package-lock.json +0 -10779
  22. package/examples/basic/package.json +0 -56
  23. package/examples/basic/src/api/index.js +0 -33
  24. package/examples/basic/src/index.js +0 -29
  25. package/examples/caching/.babelrc +0 -3
  26. package/examples/caching/.eslintrc +0 -8
  27. package/examples/caching/README.md +0 -9
  28. package/examples/caching/package-lock.json +0 -6750
  29. package/examples/caching/package.json +0 -56
  30. package/examples/caching/src/api/index.js +0 -38
  31. package/examples/caching/src/index.js +0 -29
  32. package/examples/custom-fetch-agent/.babelrc +0 -3
  33. package/examples/custom-fetch-agent/.eslintrc +0 -8
  34. package/examples/custom-fetch-agent/README.md +0 -12
  35. package/examples/custom-fetch-agent/package-lock.json +0 -6750
  36. package/examples/custom-fetch-agent/package.json +0 -56
  37. package/examples/custom-fetch-agent/src/api/index.js +0 -34
  38. package/examples/custom-fetch-agent/src/index.js +0 -29
  39. package/examples/local-evaluation/.babelrc +0 -3
  40. package/examples/local-evaluation/.eslintrc +0 -8
  41. package/examples/local-evaluation/README.md +0 -18
  42. package/examples/local-evaluation/package-lock.json +0 -6668
  43. package/examples/local-evaluation/package.json +0 -56
  44. package/examples/local-evaluation/src/api/index.js +0 -39
  45. package/examples/local-evaluation/src/index.js +0 -29
  46. package/tests/engine/engine-tests/engine-test-data/data/environment_n9fbf9h3v4fFgH3U3ngWhb.json +0 -12591
  47. package/tests/engine/engine-tests/engine-test-data/readme.md +0 -30
@@ -1,30 +0,0 @@
1
- # Engine Test Data
2
-
3
- This repository contains a single directory containing json files that can be used to test that any Flagsmith engine
4
- written in a given language is correct.
5
-
6
- Each JSON file should consist of a single object in the following format.
7
-
8
- ```json
9
- {
10
- "environment": {...}, // the environment document as found in DynamoDB
11
- "identities_and_responses": [
12
- {
13
- "identity": {...}, // the identity as found in DynamoDB,
14
- "response": {...}, // the response that was obtained from the current API
15
- }
16
- ]
17
- }
18
- ```
19
-
20
- To use this data, you will need to write a test case in the repository which contains the engine code and include
21
- this repository as a submodule to get access to the json files.
22
-
23
- To add the git submodule:
24
-
25
- ```bash
26
- git submodule add git@github.com:Flagsmith/engine-test-data.git tests/engine_tests/engine-test-data
27
- ```
28
-
29
- An example of how to use the test data can be found in the flagsmith-flag-engine repository
30
- [here](https://github.com/Flagsmith/flagsmith-engine/blob/main/tests/engine_tests/test_engine.py).