@logbrew/sdk 0.1.16 → 0.1.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logbrew/sdk",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Public LogBrew JavaScript SDK for building, validating, and flushing event batches.",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",
@@ -55,13 +55,6 @@ function resolveBuildDir(root, outDir, explicitBuildDir) {
55
55
  return resolvePathFromRoot(root, outDir || "dist");
56
56
  }
57
57
 
58
- function resolveManifestPath(root, buildDir, explicitManifestPath) {
59
- if (explicitManifestPath) {
60
- return resolvePathFromRoot(root, explicitManifestPath);
61
- }
62
- return path.join(buildDir, DEFAULT_MANIFEST_NAME);
63
- }
64
-
65
58
  function createLogBrewViteReleaseArtifactsPlugin(options) {
66
59
  const release = requiredString(options, "release");
67
60
  const environment = requiredString(options, "environment");
@@ -95,9 +88,11 @@ function createLogBrewViteReleaseArtifactsPlugin(options) {
95
88
  viteOutDir = config?.build?.outDir || "dist";
96
89
  viteLogger = config?.logger && typeof config.logger.info === "function" ? config.logger : null;
97
90
  },
98
- async closeBundle() {
91
+ async writeBundle() {
99
92
  const buildDir = resolveBuildDir(viteRoot, viteOutDir, explicitBuildDir);
100
- const manifestPath = resolveManifestPath(viteRoot, buildDir, explicitManifestPath);
93
+ const manifestPath = explicitManifestPath
94
+ ? resolvePathFromRoot(viteRoot, explicitManifestPath)
95
+ : path.join(buildDir, DEFAULT_MANIFEST_NAME);
101
96
  const sourcePrefixes = userSourcePrefixes.length > 0 ? userSourcePrefixes : [viteRoot];
102
97
  const prepareArgs = ["--build-dir", buildDir, "--write"];
103
98
  if (stripSourcesContent) {
@@ -34,7 +34,7 @@ export interface LogBrewViteReleaseArtifactsPlugin {
34
34
  build?: { outDir?: string };
35
35
  logger?: { info(message: string): void };
36
36
  }): void;
37
- closeBundle(): Promise<void>;
37
+ writeBundle(): Promise<void>;
38
38
  }
39
39
 
40
40
  export declare function createLogBrewViteReleaseArtifactsPlugin(
@@ -34,7 +34,7 @@ export interface LogBrewViteReleaseArtifactsPlugin {
34
34
  build?: { outDir?: string };
35
35
  logger?: { info(message: string): void };
36
36
  }): void;
37
- closeBundle(): Promise<void>;
37
+ writeBundle(): Promise<void>;
38
38
  }
39
39
 
40
40
  export declare function createLogBrewViteReleaseArtifactsPlugin(