posthog-node 6.0.3 → 6.0.5

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.
@@ -35,10 +35,10 @@ __webpack_require__.d(__webpack_exports__, {
35
35
  const core_namespaceObject = require("@posthog/core");
36
36
  const external_attachments_js_namespaceObject = require("./attachments.js");
37
37
  const external_errors_js_namespaceObject = require("./errors.js");
38
- const SEND_PATH = '/api/projects/@current/messaging/send/email/';
39
- const UPLOADS_PATH = '/api/projects/@current/messaging/attachments/uploads/';
40
- const STATUS_PATH = '/api/projects/@current/messaging/emails/{messageId}/';
41
- const PREFERENCES_PATH = '/api/projects/@current/messaging/preferences/';
38
+ const SEND_PATH = '/api/messaging/send/email/';
39
+ const UPLOADS_PATH = '/api/messaging/attachments/uploads/';
40
+ const STATUS_PATH = '/api/messaging/emails/{messageId}/';
41
+ const PREFERENCES_PATH = '/api/messaging/preferences/';
42
42
  const US_APP_HOST = 'https://us.posthog.com';
43
43
  const EU_APP_HOST = 'https://eu.posthog.com';
44
44
  const CLOUD_APP_HOSTS = {
@@ -1,10 +1,10 @@
1
1
  import { parseRetryAfterMs, removeTrailingSlash, safeJsonStringify } from "@posthog/core";
2
2
  import { attachmentFiles, attachmentReference, hashedFiles, refuseRenderedMessageOverLimit } from "./attachments.mjs";
3
3
  import { EmailError } from "./errors.mjs";
4
- const SEND_PATH = '/api/projects/@current/messaging/send/email/';
5
- const UPLOADS_PATH = '/api/projects/@current/messaging/attachments/uploads/';
6
- const STATUS_PATH = '/api/projects/@current/messaging/emails/{messageId}/';
7
- const PREFERENCES_PATH = '/api/projects/@current/messaging/preferences/';
4
+ const SEND_PATH = '/api/messaging/send/email/';
5
+ const UPLOADS_PATH = '/api/messaging/attachments/uploads/';
6
+ const STATUS_PATH = '/api/messaging/emails/{messageId}/';
7
+ const PREFERENCES_PATH = '/api/messaging/preferences/';
8
8
  const US_APP_HOST = 'https://us.posthog.com';
9
9
  const EU_APP_HOST = 'https://eu.posthog.com';
10
10
  const CLOUD_APP_HOSTS = {
@@ -177,7 +177,7 @@ class FeatureFlagsPoller {
177
177
  skipLoadCheck: true
178
178
  });
179
179
  response[flag.key] = matchValue;
180
- if (matchPayload) payloads[flag.key] = matchPayload;
180
+ if (null != matchPayload) payloads[flag.key] = matchPayload;
181
181
  } catch (e) {
182
182
  if (e instanceof RequiresServerEvaluation || e instanceof core_namespaceObject.InconclusiveMatchError) {
183
183
  this.logMsgIfDebug(()=>console.debug(`${e.name} when computing flag locally: ${flag.key}: ${e.message}`));
@@ -139,7 +139,7 @@ class FeatureFlagsPoller {
139
139
  skipLoadCheck: true
140
140
  });
141
141
  response[flag.key] = matchValue;
142
- if (matchPayload) payloads[flag.key] = matchPayload;
142
+ if (null != matchPayload) payloads[flag.key] = matchPayload;
143
143
  } catch (e) {
144
144
  if (e instanceof RequiresServerEvaluation || e instanceof InconclusiveMatchError) {
145
145
  this.logMsgIfDebug(()=>console.debug(`${e.name} when computing flag locally: ${flag.key}: ${e.message}`));
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "6.0.3";
1
+ export declare const version = "6.0.5";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -27,7 +27,7 @@ var __webpack_require__ = {};
27
27
  })();
28
28
  var __webpack_exports__ = {};
29
29
  __webpack_require__.r(__webpack_exports__);
30
- const version = "6.0.3";
30
+ const version = "6.0.5";
31
31
  __webpack_require__.d(__webpack_exports__, {}, {
32
32
  version: version
33
33
  });
package/dist/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- const version = "6.0.3";
1
+ const version = "6.0.5";
2
2
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-node",
3
- "version": "6.0.3",
3
+ "version": "6.0.5",
4
4
  "bugs": {
5
5
  "url": "https://github.com/PostHog/posthog-js/issues"
6
6
  },
@@ -30,7 +30,7 @@
30
30
  "module": "dist/entrypoints/index.node.mjs",
31
31
  "types": "dist/entrypoints/index.node.d.ts",
32
32
  "dependencies": {
33
- "@posthog/core": "^1.69.1"
33
+ "@posthog/core": "^1.69.2"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@edge-runtime/vm": "^5.0.0",
@@ -50,8 +50,8 @@
50
50
  "rxjs": "^7.8.0",
51
51
  "typescript": "7.0.2",
52
52
  "vitest": "^1.6.1",
53
- "@posthog-tooling/tsconfig-base": "1.1.1",
54
- "@posthog/types": "^1.425.1"
53
+ "@posthog/types": "^1.427.0",
54
+ "@posthog-tooling/tsconfig-base": "1.1.1"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@opentelemetry/api": "^1.2.0",
@@ -34,10 +34,10 @@ import type {
34
34
  TemplateEmailForm,
35
35
  } from './types'
36
36
 
37
- const SEND_PATH = '/api/projects/@current/messaging/send/email/'
38
- const UPLOADS_PATH = '/api/projects/@current/messaging/attachments/uploads/'
39
- const STATUS_PATH = '/api/projects/@current/messaging/emails/{messageId}/'
40
- const PREFERENCES_PATH = '/api/projects/@current/messaging/preferences/'
37
+ const SEND_PATH = '/api/messaging/send/email/'
38
+ const UPLOADS_PATH = '/api/messaging/attachments/uploads/'
39
+ const STATUS_PATH = '/api/messaging/emails/{messageId}/'
40
+ const PREFERENCES_PATH = '/api/messaging/preferences/'
41
41
  const US_APP_HOST = 'https://us.posthog.com'
42
42
  const EU_APP_HOST = 'https://eu.posthog.com'
43
43
  const CLOUD_APP_HOSTS: Record<string, string> = {
@@ -335,7 +335,7 @@ class FeatureFlagsPoller {
335
335
  { skipLoadCheck: true }
336
336
  )
337
337
  response[flag.key] = matchValue
338
- if (matchPayload) {
338
+ if (matchPayload !== undefined && matchPayload !== null) {
339
339
  payloads[flag.key] = matchPayload
340
340
  }
341
341
  } catch (e) {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = "6.0.3"
1
+ export const version = "6.0.5"