@posthog/rollup-plugin 1.1.4 → 1.1.6
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/package.json +3 -3
- package/src/index.ts +6 -0
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAA2C,MAAM,QAAQ,CAAA;AAC7E,OAAO,EAAiC,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG/E,MAAM,WAAW,0BAA0B;IACvC,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,UAAU,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,iBAAiB,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAA2C,MAAM,QAAQ,CAAA;AAC7E,OAAO,EAAiC,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG/E,MAAM,WAAW,0BAA0B;IACvC,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,UAAU,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,iBAAiB,CAAC,EAAE,OAAO,CAAA;QAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;CACJ;AAiBD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,WAAW,EAAE,0BAA0B,GAqD1E,MAAM,CACd"}
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ function posthogRollupPlugin(userOptions) {
|
|
|
34
34
|
if (posthogOptions.sourcemaps.project) args.push('--project', posthogOptions.sourcemaps.project);
|
|
35
35
|
if (posthogOptions.sourcemaps.version) args.push('--version', posthogOptions.sourcemaps.version);
|
|
36
36
|
if (posthogOptions.sourcemaps.deleteAfterUpload) args.push('--delete-after');
|
|
37
|
+
if (posthogOptions.sourcemaps.batchSize) args.push('--batch-size', posthogOptions.sourcemaps.batchSize.toString());
|
|
37
38
|
await spawnLocal(cliPath, args, {
|
|
38
39
|
env: {
|
|
39
40
|
...process.env,
|
|
@@ -66,7 +67,8 @@ function resolveOptions(userOptions) {
|
|
|
66
67
|
logLevel: null != (_userOptions_logLevel = userOptions.logLevel) ? _userOptions_logLevel : 'info',
|
|
67
68
|
sourcemaps: {
|
|
68
69
|
enabled: null != (_userSourcemaps_enabled = userSourcemaps.enabled) ? _userSourcemaps_enabled : true,
|
|
69
|
-
deleteAfterUpload: null != (_userSourcemaps_deleteAfterUpload = userSourcemaps.deleteAfterUpload) ? _userSourcemaps_deleteAfterUpload : true
|
|
70
|
+
deleteAfterUpload: null != (_userSourcemaps_deleteAfterUpload = userSourcemaps.deleteAfterUpload) ? _userSourcemaps_deleteAfterUpload : true,
|
|
71
|
+
batchSize: userSourcemaps.batchSize
|
|
70
72
|
}
|
|
71
73
|
};
|
|
72
74
|
return posthogOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/rollup-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "PostHog Rollup plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@posthog/cli": "~0.5.
|
|
19
|
-
"@posthog/core": "1.
|
|
18
|
+
"@posthog/cli": "~0.5.20",
|
|
19
|
+
"@posthog/core": "1.9.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"rollup": ">= 4.0.0"
|
package/src/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface PostHogRollupPluginOptions {
|
|
|
13
13
|
project?: string
|
|
14
14
|
version?: string
|
|
15
15
|
deleteAfterUpload?: boolean
|
|
16
|
+
batchSize?: number
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -27,6 +28,7 @@ interface ResolvedPostHogRollupPluginOptions {
|
|
|
27
28
|
project?: string
|
|
28
29
|
version?: string
|
|
29
30
|
deleteAfterUpload: boolean
|
|
31
|
+
batchSize?: number
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
|
|
@@ -68,6 +70,9 @@ export default function posthogRollupPlugin(userOptions: PostHogRollupPluginOpti
|
|
|
68
70
|
if (posthogOptions.sourcemaps.deleteAfterUpload) {
|
|
69
71
|
args.push('--delete-after')
|
|
70
72
|
}
|
|
73
|
+
if (posthogOptions.sourcemaps.batchSize) {
|
|
74
|
+
args.push('--batch-size', posthogOptions.sourcemaps.batchSize.toString())
|
|
75
|
+
}
|
|
71
76
|
await spawnLocal(cliPath, args, {
|
|
72
77
|
env: {
|
|
73
78
|
...process.env,
|
|
@@ -104,6 +109,7 @@ function resolveOptions(userOptions: PostHogRollupPluginOptions): ResolvedPostHo
|
|
|
104
109
|
sourcemaps: {
|
|
105
110
|
enabled: userSourcemaps.enabled ?? true,
|
|
106
111
|
deleteAfterUpload: userSourcemaps.deleteAfterUpload ?? true,
|
|
112
|
+
batchSize: userSourcemaps.batchSize,
|
|
107
113
|
},
|
|
108
114
|
}
|
|
109
115
|
return posthogOptions
|