kryptheon-night 0.1.4 → 0.1.6

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/installer.js CHANGED
@@ -87,6 +87,21 @@ async function install(client, options) {
87
87
  const at = opts.at || AT;
88
88
  const made = { extensions: [], schema: false, jobid: null };
89
89
 
90
+ // Both asked about before either is made. pg_net used to be created first
91
+ // and pg_cron checked after, so a database offering one and not the other
92
+ // kept a pg_net nobody recorded - and uninstall only removes what the
93
+ // record names. Nothing is created until everything needed is there.
94
+ for (const name of ['pg_net', 'pg_cron']) {
95
+ if (!(await extensionState(client, name)).available) {
96
+ const err = new Error(
97
+ 'this database does not offer ' + name + ', so the nightly run cannot be installed. ' +
98
+ 'Supabase has it; a plain Postgres may not.',
99
+ );
100
+ err.missingExtension = name;
101
+ throw err;
102
+ }
103
+ }
104
+
90
105
  // pg_net first: it is the one that lands in the wrong place if nobody
91
106
  // says where, and it is easier to take back out before anything depends
92
107
  // on it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kryptheon-night",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Attacks a copy of your Supabase database and tells you in plain English what got in.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -29,7 +29,7 @@
29
29
  "node": ">=18.0.0"
30
30
  },
31
31
  "scripts": {
32
- "check": "node package.check.js && node trouble.check.js && node intro.check.js && node finding.check.js && node recheck.check.js && node untouched.check.js && node blocked.check.js && node orphans.check.js && node guests.check.js && node usable.check.js && node twin.check.js && node engines.check.js && node external.check.js && node schema.check.js && node collision.check.js && node tamper.check.js && node orphan.check.js && node shapes.check.js && node verdicts.check.js && node loop.check.js",
32
+ "check": "node package.check.js && node trouble.check.js && node intro.check.js && node finding.check.js && node recheck.check.js && node untouched.check.js && node blocked.check.js && node orphans.check.js && node guests.check.js && node usable.check.js && node twin.check.js && node engines.check.js && node external.check.js && node schema.check.js && node collision.check.js && node tamper.check.js && node orphan.check.js && node shapes.check.js && node verdicts.check.js && node shop.check.js && node loop.check.js",
33
33
  "check:dry": "node package.check.js && node trouble.check.js && node intro.check.js && node finding.check.js && node recheck.check.js",
34
34
  "check:package": "node package.check.js",
35
35
  "check:trouble": "node trouble.check.js",
@@ -47,6 +47,7 @@
47
47
  "check:external": "node external.check.js",
48
48
  "check:shapes": "node shapes.check.js",
49
49
  "check:verdicts": "node verdicts.check.js",
50
+ "check:shop": "node shop.check.js",
50
51
  "check:writes": "node tamper.check.js",
51
52
  "check:orphans": "node orphans.check.js",
52
53
  "probe:write": "node probe-write.js",