@tgrv/void-cli 1.0.2 → 1.0.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.
package/bin/void.js CHANGED
@@ -189,20 +189,32 @@ function runBuild(pluginPathArg) {
189
189
  // Copy WASM
190
190
  fs.copyFileSync(builtWasmPath, path.join(buildOutputDir, "plugin.wasm"));
191
191
 
192
- // Write package.json
193
- const pkgJson = {
194
- name: pluginName,
195
- version: "1.0.0",
196
- type: "module",
197
- main: "index.js",
198
- dependencies: {
199
- "@tgrv/void-runtime": "^1.0.0",
200
- },
201
- publishConfig: {
202
- access: "public"
192
+ // Clean up temporary compiled WASM
193
+ if (path.dirname(builtWasmPath) === absolutePluginDir) {
194
+ try {
195
+ fs.unlinkSync(builtWasmPath);
196
+ } catch (e) {
197
+ // Ignore
203
198
  }
204
- };
205
- fs.writeFileSync(path.join(buildOutputDir, "package.json"), JSON.stringify(pkgJson, null, 2));
199
+ }
200
+
201
+ // Write package.json if it does not already exist
202
+ const packageJsonPath = path.join(buildOutputDir, "package.json");
203
+ if (!fs.existsSync(packageJsonPath)) {
204
+ const pkgJson = {
205
+ name: pluginName,
206
+ version: manifest.version || "1.0.0",
207
+ type: "module",
208
+ main: "index.js",
209
+ dependencies: {
210
+ "@tgrv/void-runtime": "^1.0.0",
211
+ },
212
+ publishConfig: {
213
+ access: "public"
214
+ }
215
+ };
216
+ fs.writeFileSync(packageJsonPath, JSON.stringify(pkgJson, null, 2));
217
+ }
206
218
 
207
219
  // Generate standard ESM index.js loader
208
220
  const indexJsContent = `import { runtime } from "@tgrv/void-runtime";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tgrv/void-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "void": "./bin/void.js"
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "@void/{{name}}",
3
+ "version": "1.0.0",
3
4
  "type": "go",
4
5
  "buildDir": "@void/{{name}}"
5
6
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "@void/{{name}}",
3
+ "version": "1.0.0",
3
4
  "type": "rust",
4
5
  "buildDir": "@void/{{name}}"
5
6
  }