@skilldeck/outreach 0.1.0 → 1.0.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "outreach",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Engage on Reddit without spamming: script-app OAuth setup with a doctor check, rule-aware thread search, help-first drafts checked for disclosure and near-duplicates, and posting in review mode (approve each reply) or confirmed auto mode, with daily, per-subreddit, cooldown and one-reply-per-thread caps enforced by the script. Zero-dependency Node.js.",
5
5
  "author": {
6
6
  "name": "SkillDeck"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilldeck/outreach",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Help-first Reddit engagement for coding agents: OAuth setup and a doctor check, rule-aware thread search, draft checks for disclosure and near-duplicates, and posting gated by per-reply approval or a confirmed auto mode with hard daily, per-subreddit and cooldown caps enforced in code.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -19,7 +19,7 @@
19
19
  "LICENSE"
20
20
  ],
21
21
  "dependencies": {
22
- "@skilldeck/core": "^0.1.1"
22
+ "@skilldeck/core": "^1.0.0"
23
23
  },
24
24
  "engines": {
25
25
  "node": ">=20"
@@ -18,10 +18,11 @@
18
18
  // Exit 0 ok, 1 refused or failed, 2 usage or missing environment.
19
19
  // Zero dependencies. Node 20+.
20
20
 
21
+ import { realpathSync } from 'node:fs'
22
+ import { fileURLToPath } from 'node:url'
21
23
  import fs from 'node:fs'
22
24
  import path from 'node:path'
23
25
  import crypto from 'node:crypto'
24
- import { pathToFileURL } from 'node:url'
25
26
 
26
27
  const VERSION = '0.1.0'
27
28
 
@@ -869,4 +870,11 @@ export async function run(argv, { fetch: f = globalThis.fetch, env = process.env
869
870
  }
870
871
  }
871
872
 
872
- if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) process.exitCode = await run(process.argv.slice(2))
873
+ // Run only when this file is the entry point. Real paths are compared because
874
+ // the path Node was given can be a symlink (macOS /tmp and /var, a linked
875
+ // skills folder), and then it never equals the module's own URL.
876
+ function isEntryPoint(url) {
877
+ try { return Boolean(process.argv[1]) && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(url)) } catch { return false }
878
+ }
879
+
880
+ if (isEntryPoint(import.meta.url)) process.exitCode = await run(process.argv.slice(2))