@grainboxlimited/spammy 0.0.0-stage → 0.0.1

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.
Files changed (3) hide show
  1. package/bin/spammy.js +26 -0
  2. package/package.json +21 -4
  3. package/README.md +0 -3
package/bin/spammy.js ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ // Finds the platform package's binary when the command runs rather than in a postinstall step, so
4
+ // an install with --ignore-scripts still works. npm nests or hoists that package depending on how
5
+ // it was installed, so it is resolved, never found by a fixed path.
6
+ const { spawnSync } = require('child_process');
7
+ const path = require('path');
8
+
9
+ const pkg = `@grainboxlimited/spammy-${process.platform}-${process.arch}`;
10
+ let bin;
11
+ try {
12
+ bin = path.join(path.dirname(require.resolve(`${pkg}/package.json`)), 'bin', 'spammy');
13
+ } catch {
14
+ console.error(
15
+ `spammy: ${pkg} is not installed. spammy runs on linux-x64 and linux-arm64; ` +
16
+ 'if you are on one, reinstall without --omit=optional (or --no-optional).'
17
+ );
18
+ process.exit(1);
19
+ }
20
+ const r = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });
21
+ if (r.error) {
22
+ console.error(`spammy: ${r.error.message}`);
23
+ process.exit(1);
24
+ }
25
+ if (r.signal) process.kill(process.pid, r.signal);
26
+ process.exit(r.status);
package/package.json CHANGED
@@ -1,6 +1,23 @@
1
1
  {
2
2
  "name": "@grainboxlimited/spammy",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.1",
4
+ "description": "Answer Claude Code questions from a browser tab.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/awojtas/spammy-agent.git"
9
+ },
10
+ "bin": {
11
+ "spammy": "bin/spammy.js"
12
+ },
13
+ "files": [
14
+ "bin/"
15
+ ],
16
+ "engines": {
17
+ "node": ">=18"
18
+ },
19
+ "optionalDependencies": {
20
+ "@grainboxlimited/spammy-linux-arm64": "0.0.1",
21
+ "@grainboxlimited/spammy-linux-x64": "0.0.1"
22
+ }
23
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.