flagsmith-nodejs 1.1.0 → 1.1.3

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.
@@ -1,12 +1,11 @@
1
- Copyright (c) 2017 Solid State Technology Ltd (https://www.solidstategroup.com/) and individual contributors.
2
- All rights reserved.
1
+ Copyright 2022 Bullet Train Ltd. A UK company.
3
2
 
4
3
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
4
 
6
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
5
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
6
 
8
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
7
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
8
 
10
- 3. Neither the name of the Sentry nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
10
 
12
11
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <img width="100%" src="https://raw.githubusercontent.com/SolidStateGroup/bullet-train-frontend/master/hero.png"/>
1
+ <img width="100%" src="https://github.com/Flagsmith/flagsmith/raw/main/static-files/hero.png"/>
2
2
 
3
3
  # Flagsmith NodeJS Client
4
4
 
package/flagsmith-core.js CHANGED
@@ -1,4 +1,6 @@
1
- const fetch = require('node-fetch');
1
+ let fetch = require('node-fetch');
2
+ // https://github.com/node-fetch/node-fetch/issues/450
3
+ if (typeof fetch.default !== "undefined") fetch = fetch.default
2
4
 
3
5
  module.exports = class FlagsmithCore {
4
6
  normalizeFlags(flags) {
package/index.d.ts CHANGED
@@ -57,7 +57,7 @@ declare module 'flagsmith-nodejs' {
57
57
  userId: string,
58
58
  key: string,
59
59
  value: string | number | boolean
60
- ): IUserIdentity;
60
+ ): Promise<IUserIdentity>;
61
61
 
62
62
  interface IFeature {
63
63
  enabled: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flagsmith-nodejs",
3
- "version": "1.1.0",
3
+ "version": "1.1.3",
4
4
  "description": "Flagsmith lets you manage features flags and remote config across web, mobile and server side applications. Deliver true Continuous Integration. Get builds out faster. Control who has access to new features.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -1,52 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <HTMLCodeStyleSettings>
4
- <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
5
- <option name="HTML_KEEP_WHITESPACES_INSIDE" value="pre,textarea" />
6
- <option name="HTML_QUOTE_STYLE" value="Single" />
7
- <option name="HTML_ENFORCE_QUOTES" value="true" />
8
- <option name="HTML_NEWLINE_AFTER_LAST_ATTRIBUTE" value="When multiline" />
9
- </HTMLCodeStyleSettings>
10
- <JSCodeStyleSettings version="0">
11
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
12
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
13
- <option name="USE_DOUBLE_QUOTES" value="false" />
14
- <option name="FORCE_QUOTE_STYlE" value="true" />
15
- <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
16
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
17
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
18
- </JSCodeStyleSettings>
19
- <TypeScriptCodeStyleSettings version="0">
20
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
21
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
22
- <option name="USE_DOUBLE_QUOTES" value="false" />
23
- <option name="FORCE_QUOTE_STYlE" value="true" />
24
- <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
25
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
26
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
27
- </TypeScriptCodeStyleSettings>
28
- <VueCodeStyleSettings>
29
- <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
30
- <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
31
- </VueCodeStyleSettings>
32
- <codeStyleSettings language="HTML">
33
- <option name="SOFT_MARGINS" value="100" />
34
- <indentOptions>
35
- <option name="CONTINUATION_INDENT_SIZE" value="4" />
36
- </indentOptions>
37
- </codeStyleSettings>
38
- <codeStyleSettings language="JavaScript">
39
- <option name="SOFT_MARGINS" value="100" />
40
- </codeStyleSettings>
41
- <codeStyleSettings language="TypeScript">
42
- <option name="SOFT_MARGINS" value="100" />
43
- </codeStyleSettings>
44
- <codeStyleSettings language="Vue">
45
- <option name="SOFT_MARGINS" value="100" />
46
- <indentOptions>
47
- <option name="INDENT_SIZE" value="4" />
48
- <option name="TAB_SIZE" value="4" />
49
- </indentOptions>
50
- </codeStyleSettings>
51
- </code_scheme>
52
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
- </state>
5
- </component>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/temp" />
6
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/flagsmith-nodejs-client.iml" filepath="$PROJECT_DIR$/.idea/flagsmith-nodejs-client.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>