@webiny/global-config 5.40.0-beta.2 → 5.40.0-beta.4

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 (3) hide show
  1. package/index.d.ts +6 -0
  2. package/index.js +9 -1
  3. package/package.json +2 -2
package/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export interface GlobalConfig {
2
+ get(key: string): any;
3
+ set(key: string, value: any): void;
4
+ }
5
+
6
+ export declare const globalConfig: GlobalConfig;
package/index.js CHANGED
@@ -18,7 +18,15 @@ module.exports.globalConfig = {
18
18
  }
19
19
  } catch (e) {
20
20
  // A new config file is written if it doesn't exist or is invalid.
21
- this.__globalConfig = { id: uuidv4(), telemetry: true };
21
+ this.__globalConfig = {
22
+ id: uuidv4(),
23
+ telemetry: true,
24
+
25
+ // This flag is set to `false` the moment user successfully
26
+ // deploys a Webiny project for the first time. Once they do,
27
+ // they're considered no longer a "new user".
28
+ newUser: true
29
+ };
22
30
  writeJson.sync(GLOBAL_CONFIG_PATH, this.__globalConfig);
23
31
  }
24
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/global-config",
3
- "version": "5.40.0-beta.2",
3
+ "version": "5.40.0-beta.4",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -12,5 +12,5 @@
12
12
  "access": "public",
13
13
  "directory": "."
14
14
  },
15
- "gitHead": "15e414a228687140ce2f30bd2f55763368e99827"
15
+ "gitHead": "42f3b1c985d6f8317d5c1084838b43a270c79f01"
16
16
  }