@posthog/nuxt 1.5.43 → 1.5.44

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.
package/README.md CHANGED
@@ -35,11 +35,11 @@ export default defineNuxtConfig({
35
35
  publicKey: 'public api key', // Your public web snippet key. You can find it in settings
36
36
  clientConfig?: Partial<PostHogConfig> // (optional) It will be passed to the posthog-js client on init in vue
37
37
  serverConfig?: PostHogOptions // (optional) It will be passed to the posthog-node client on init in nitro. Please note that this client instance is intended for error-tracking purposes only
38
- sourceMaps: {
38
+ sourcemaps: {
39
39
  enabled: true, // Enables sourcemaps generation and upload
40
- envId: '2', // Environment ID, see https://app.posthog.com/settings/environment#variables
41
- project: 'my-application', // (optional) Project name, defaults to git repository name
42
- version: '1.0.0', // (optional) Release version, defaults to current git commit
40
+ projectId: '2', // Project ID, see https://app.posthog.com/settings/project#variables
41
+ releaseName: 'my-application', // (optional) Release name, defaults to git repository name
42
+ releaseVersion: '1.0.0', // (optional) Release version, defaults to current git commit
43
43
  personalApiKey: 'personal api key', // Your personal API key. You can generate it in settings -> Personal API keys
44
44
  },
45
45
  },
package/dist/module.d.mts CHANGED
@@ -6,9 +6,15 @@ type LogLevel = 'debug' | 'info' | 'warn' | 'error';
6
6
  interface SourcemapsConfig {
7
7
  enabled: boolean;
8
8
  personalApiKey: string;
9
- envId: string;
9
+ /** @deprecated Use projectId instead */
10
+ envId?: string;
11
+ projectId?: string;
12
+ /** @deprecated Use releaseVersion instead */
10
13
  version?: string;
14
+ releaseVersion?: string;
15
+ /** @deprecated Use releaseName instead */
11
16
  project?: string;
17
+ releaseName?: string;
12
18
  logLevel?: LogLevel;
13
19
  deleteAfterUpload?: boolean;
14
20
  batchSize?: number;
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.7.0"
6
6
  },
7
- "version": "1.5.43",
7
+ "version": "1.5.44",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -70,12 +70,13 @@ const module$1 = defineNuxtModule({
70
70
  cwd: resolvedDirname
71
71
  });
72
72
  const logLevel = sourcemapsConfig.logLevel || "info";
73
+ const projectId = sourcemapsConfig.projectId ?? sourcemapsConfig.envId;
73
74
  const cliEnv = {
74
75
  ...process.env,
75
76
  RUST_LOG: `posthog_cli=${logLevel}`,
76
77
  POSTHOG_CLI_HOST: options.host,
77
- POSTHOG_CLI_ENV_ID: sourcemapsConfig.envId,
78
- POSTHOG_CLI_TOKEN: sourcemapsConfig.personalApiKey
78
+ POSTHOG_CLI_PROJECT_ID: projectId,
79
+ POSTHOG_CLI_API_KEY: sourcemapsConfig.personalApiKey
79
80
  };
80
81
  return (args) => {
81
82
  return spawnLocal(cliBinaryPath, args, {
@@ -108,11 +109,13 @@ const module$1 = defineNuxtModule({
108
109
  });
109
110
  function getInjectArgs(directory, sourcemapsConfig) {
110
111
  const processOptions = ["sourcemap", "inject", "--ignore", "**/node_modules/**", "--directory", directory];
111
- if (sourcemapsConfig.project) {
112
- processOptions.push("--project", sourcemapsConfig.project);
112
+ const releaseName = sourcemapsConfig.releaseName ?? sourcemapsConfig.project;
113
+ if (releaseName) {
114
+ processOptions.push("--release-name", releaseName);
113
115
  }
114
- if (sourcemapsConfig.version) {
115
- processOptions.push("--version", sourcemapsConfig.version);
116
+ const releaseVersion = sourcemapsConfig.releaseVersion ?? sourcemapsConfig.version;
117
+ if (releaseVersion) {
118
+ processOptions.push("--release-version", releaseVersion);
116
119
  }
117
120
  return processOptions;
118
121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/nuxt",
3
- "version": "1.5.43",
3
+ "version": "1.5.44",
4
4
  "description": "Nuxt module for Posthog 🦔",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,11 +23,11 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "@posthog/cli": "~0.5.26",
26
+ "@posthog/cli": "~0.5.29",
27
27
  "@nuxt/kit": ">=3.7.0",
28
+ "posthog-node": "5.24.15",
28
29
  "posthog-js": "1.345.5",
29
- "@posthog/core": "1.22.0",
30
- "posthog-node": "5.24.15"
30
+ "@posthog/core": "1.22.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^20.0.0",