@flarecode/import-memory 0.2.0 → 0.2.2
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 +1 -1
- package/src/index.js +5 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { exec } from "node:child_process";
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
3
4
|
import process from "node:process";
|
|
4
5
|
import { formatScanSummary, parseSince, parseSourceFilter, readRulesContent, scanSources } from "./scanner.js";
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
// Read from package.json (always shipped in the tarball) so --version never
|
|
8
|
+
// drifts from the published version.
|
|
9
|
+
const VERSION = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
7
10
|
const API_BASE = "https://api.flarecode.sh";
|
|
8
11
|
const APP_BASE = "https://app.flarecode.sh";
|
|
9
12
|
|
|
@@ -111,7 +114,7 @@ async function main(argv) {
|
|
|
111
114
|
process.stdout.write("Authorized! Uploading scan summary...\n");
|
|
112
115
|
const rulesContent = await readRulesContent(result);
|
|
113
116
|
const importId = await uploadImport(token, result, rulesContent);
|
|
114
|
-
process.stdout.write(`Done. Review and approve your memory at: ${APP_BASE}/?memory
|
|
117
|
+
process.stdout.write(`Done. Review and approve your memory at: ${APP_BASE}/?account=memory\n`);
|
|
115
118
|
void importId;
|
|
116
119
|
} catch (err) {
|
|
117
120
|
process.stderr.write(`Upload failed: ${err instanceof Error ? err.message : String(err)}\n`);
|