@pagebridge/cli 0.1.1 → 0.1.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.
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkCpC,eAAO,MAAM,WAAW,SAkYpB,CAAC"}
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkCpC,eAAO,MAAM,WAAW,SAyapB,CAAC"}
@@ -54,12 +54,42 @@ export const syncCommand = new Command("sync")
54
54
  const sanityToken = resolve(options.sanityToken, "SANITY_TOKEN");
55
55
  const siteUrl = resolve(options.siteUrl, "SITE_URL");
56
56
  requireConfig([
57
- { name: "GOOGLE_SERVICE_ACCOUNT", flag: "--google-service-account <json>", envVar: "GOOGLE_SERVICE_ACCOUNT", value: googleServiceAccount },
58
- { name: "DATABASE_URL", flag: "--db-url <url>", envVar: "DATABASE_URL", value: dbUrl },
59
- { name: "SANITY_PROJECT_ID", flag: "--sanity-project-id <id>", envVar: "SANITY_PROJECT_ID", value: sanityProjectId },
60
- { name: "SANITY_DATASET", flag: "--sanity-dataset <name>", envVar: "SANITY_DATASET", value: sanityDataset },
61
- { name: "SANITY_TOKEN", flag: "--sanity-token <token>", envVar: "SANITY_TOKEN", value: sanityToken },
62
- { name: "SITE_URL", flag: "--site-url <url>", envVar: "SITE_URL", value: siteUrl },
57
+ {
58
+ name: "GOOGLE_SERVICE_ACCOUNT",
59
+ flag: "--google-service-account <json>",
60
+ envVar: "GOOGLE_SERVICE_ACCOUNT",
61
+ value: googleServiceAccount,
62
+ },
63
+ {
64
+ name: "DATABASE_URL",
65
+ flag: "--db-url <url>",
66
+ envVar: "DATABASE_URL",
67
+ value: dbUrl,
68
+ },
69
+ {
70
+ name: "SANITY_PROJECT_ID",
71
+ flag: "--sanity-project-id <id>",
72
+ envVar: "SANITY_PROJECT_ID",
73
+ value: sanityProjectId,
74
+ },
75
+ {
76
+ name: "SANITY_DATASET",
77
+ flag: "--sanity-dataset <name>",
78
+ envVar: "SANITY_DATASET",
79
+ value: sanityDataset,
80
+ },
81
+ {
82
+ name: "SANITY_TOKEN",
83
+ flag: "--sanity-token <token>",
84
+ envVar: "SANITY_TOKEN",
85
+ value: sanityToken,
86
+ },
87
+ {
88
+ name: "SITE_URL",
89
+ flag: "--site-url <url>",
90
+ envVar: "SITE_URL",
91
+ value: siteUrl,
92
+ },
63
93
  ]);
64
94
  // Run migrations if requested
65
95
  await migrateIfRequested(!!options.migrate, dbUrl);
@@ -325,7 +355,7 @@ export const syncCommand = new Command("sync")
325
355
  log.info(`Updated Sanity snapshots`);
326
356
  }
327
357
  timer.end("Total sync", syncStartTime);
328
- log.info(`\nSync complete!`);
358
+ log.info(`Sync complete!`);
329
359
  }
330
360
  catch (error) {
331
361
  const message = error instanceof Error ? error.message : String(error);
@@ -336,6 +366,9 @@ export const syncCommand = new Command("sync")
336
366
  await close();
337
367
  process.removeListener("SIGTERM", shutdown);
338
368
  process.removeListener("SIGINT", shutdown);
369
+ // Sanity client and GSC client keep HTTP connections alive with no close() API.
370
+ // Force exit so the process doesn't hang indefinitely.
371
+ process.exit(process.exitCode ?? 0);
339
372
  }
340
373
  });
341
374
  async function getPublishedDates(sanity, matches) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagebridge/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "CLI for PageBridge — sync Google Search Console data, detect content decay, and generate refresh tasks",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -35,8 +35,8 @@
35
35
  "@types/node": "^22.15.3",
36
36
  "eslint": "^9.39.1",
37
37
  "typescript": "^5.9.3",
38
- "@pagebridge/eslint-config": "^0.0.0",
39
- "@pagebridge/typescript-config": "^0.0.0"
38
+ "@pagebridge/typescript-config": "^0.0.0",
39
+ "@pagebridge/eslint-config": "^0.0.0"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "tsc",