@hot-updater/supabase 0.20.0-rc.0 → 0.20.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.
- package/dist/iac/index.cjs +74 -68
- package/dist/iac/index.js +74 -68
- package/dist/index.cjs +3 -2
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -3
- package/package.json +4 -4
package/dist/iac/index.cjs
CHANGED
|
@@ -46,7 +46,7 @@ const __hot_updater_plugin_core = __toESM(require("@hot-updater/plugin-core"));
|
|
|
46
46
|
const fs_promises = __toESM(require("fs/promises"));
|
|
47
47
|
|
|
48
48
|
//#region ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
49
|
-
var require_src = __commonJS({ "../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
|
|
49
|
+
var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js": ((exports, module) => {
|
|
50
50
|
const ESC = "\x1B";
|
|
51
51
|
const CSI = `${ESC}[`;
|
|
52
52
|
const beep = "\x07";
|
|
@@ -99,11 +99,11 @@ var require_src = __commonJS({ "../../node_modules/.pnpm/sisteransi@1.0.5/node_m
|
|
|
99
99
|
erase,
|
|
100
100
|
beep
|
|
101
101
|
};
|
|
102
|
-
} });
|
|
102
|
+
}) });
|
|
103
103
|
|
|
104
104
|
//#endregion
|
|
105
105
|
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
106
|
-
var require_picocolors = __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
106
|
+
var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
|
|
107
107
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
108
108
|
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
109
109
|
let formatter = (open, close, replace = open) => (input) => {
|
|
@@ -168,12 +168,12 @@ var require_picocolors = __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1
|
|
|
168
168
|
};
|
|
169
169
|
module.exports = createColors();
|
|
170
170
|
module.exports.createColors = createColors;
|
|
171
|
-
} });
|
|
171
|
+
}) });
|
|
172
172
|
|
|
173
173
|
//#endregion
|
|
174
174
|
//#region ../../node_modules/.pnpm/@clack+core@0.4.1/node_modules/@clack/core/dist/index.mjs
|
|
175
|
-
var import_src$1 = __toESM(require_src(), 1);
|
|
176
|
-
var import_picocolors$1 = __toESM(require_picocolors(), 1);
|
|
175
|
+
var import_src$1 = /* @__PURE__ */ __toESM(require_src(), 1);
|
|
176
|
+
var import_picocolors$1 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
177
177
|
function J$1({ onlyFirst: t = !1 } = {}) {
|
|
178
178
|
const F$1 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
179
179
|
return new RegExp(F$1, t ? void 0 : "g");
|
|
@@ -418,7 +418,7 @@ const iD = sD(), v = new Set(["\x1B", ""]), CD = 39, w$1 = "\x07", W$1 = "[",
|
|
|
418
418
|
`)];
|
|
419
419
|
for (const [E, a$1] of o$2.entries()) {
|
|
420
420
|
if (e$1 += a$1, v.has(a$1)) {
|
|
421
|
-
const { groups: B$1 } = new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`).exec(o$2.slice(E).join("")) || { groups: {} };
|
|
421
|
+
const { groups: B$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`)).exec(o$2.slice(E).join("")) || { groups: {} };
|
|
422
422
|
if (B$1.code !== void 0) {
|
|
423
423
|
const p$1 = Number.parseFloat(B$1.code);
|
|
424
424
|
s = p$1 === CD ? void 0 : p$1;
|
|
@@ -811,8 +811,8 @@ var PD = class extends x {
|
|
|
811
811
|
|
|
812
812
|
//#endregion
|
|
813
813
|
//#region ../../node_modules/.pnpm/@clack+prompts@0.10.0/node_modules/@clack/prompts/dist/index.mjs
|
|
814
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
815
|
-
var import_src = __toESM(require_src(), 1);
|
|
814
|
+
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
815
|
+
var import_src = /* @__PURE__ */ __toESM(require_src(), 1);
|
|
816
816
|
function ce() {
|
|
817
817
|
return node_process.default.platform !== "win32" ? node_process.default.env.TERM !== "linux" : !!node_process.default.env.CI || !!node_process.default.env.WT_SESSION || !!node_process.default.env.TERMINUS_SUBLIME || node_process.default.env.ConEmuTask === "{cmd::Cmder}" || node_process.default.env.TERM_PROGRAM === "Terminus-Sublime" || node_process.default.env.TERM_PROGRAM === "vscode" || node_process.default.env.TERM === "xterm-256color" || node_process.default.env.TERM === "alacritty" || node_process.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
818
818
|
}
|
|
@@ -2044,10 +2044,10 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
2044
2044
|
|
|
2045
2045
|
//#endregion
|
|
2046
2046
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
2047
|
-
var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) {
|
|
2047
|
+
var require_windows = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js": ((exports, module) => {
|
|
2048
2048
|
module.exports = isexe$3;
|
|
2049
2049
|
isexe$3.sync = sync$2;
|
|
2050
|
-
var fs$
|
|
2050
|
+
var fs$3 = require("fs");
|
|
2051
2051
|
function checkPathExt(path$10, options) {
|
|
2052
2052
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
2053
2053
|
if (!pathext) return true;
|
|
@@ -2064,28 +2064,28 @@ var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_mo
|
|
|
2064
2064
|
return checkPathExt(path$10, options);
|
|
2065
2065
|
}
|
|
2066
2066
|
function isexe$3(path$10, options, cb) {
|
|
2067
|
-
fs$
|
|
2067
|
+
fs$3.stat(path$10, function(er, stat) {
|
|
2068
2068
|
cb(er, er ? false : checkStat$1(stat, path$10, options));
|
|
2069
2069
|
});
|
|
2070
2070
|
}
|
|
2071
2071
|
function sync$2(path$10, options) {
|
|
2072
|
-
return checkStat$1(fs$
|
|
2072
|
+
return checkStat$1(fs$3.statSync(path$10), path$10, options);
|
|
2073
2073
|
}
|
|
2074
|
-
} });
|
|
2074
|
+
}) });
|
|
2075
2075
|
|
|
2076
2076
|
//#endregion
|
|
2077
2077
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
2078
|
-
var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) {
|
|
2078
|
+
var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js": ((exports, module) => {
|
|
2079
2079
|
module.exports = isexe$2;
|
|
2080
2080
|
isexe$2.sync = sync$1;
|
|
2081
|
-
var fs$
|
|
2081
|
+
var fs$2 = require("fs");
|
|
2082
2082
|
function isexe$2(path$10, options, cb) {
|
|
2083
|
-
fs$
|
|
2083
|
+
fs$2.stat(path$10, function(er, stat) {
|
|
2084
2084
|
cb(er, er ? false : checkStat(stat, options));
|
|
2085
2085
|
});
|
|
2086
2086
|
}
|
|
2087
2087
|
function sync$1(path$10, options) {
|
|
2088
|
-
return checkStat(fs$
|
|
2088
|
+
return checkStat(fs$2.statSync(path$10), options);
|
|
2089
2089
|
}
|
|
2090
2090
|
function checkStat(stat, options) {
|
|
2091
2091
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -2103,12 +2103,12 @@ var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modul
|
|
|
2103
2103
|
var ret = mod & o$2 || mod & g$2 && gid === myGid || mod & u$2 && uid === myUid || mod & ug && myUid === 0;
|
|
2104
2104
|
return ret;
|
|
2105
2105
|
}
|
|
2106
|
-
} });
|
|
2106
|
+
}) });
|
|
2107
2107
|
|
|
2108
2108
|
//#endregion
|
|
2109
2109
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
2110
|
-
var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
|
|
2111
|
-
|
|
2110
|
+
var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js": ((exports, module) => {
|
|
2111
|
+
require("fs");
|
|
2112
2112
|
var core;
|
|
2113
2113
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
2114
2114
|
else core = require_mode();
|
|
@@ -2146,16 +2146,16 @@ var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modu
|
|
|
2146
2146
|
else throw er;
|
|
2147
2147
|
}
|
|
2148
2148
|
}
|
|
2149
|
-
} });
|
|
2149
|
+
}) });
|
|
2150
2150
|
|
|
2151
2151
|
//#endregion
|
|
2152
2152
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
2153
|
-
var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module) {
|
|
2153
|
+
var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js": ((exports, module) => {
|
|
2154
2154
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
2155
2155
|
const path$9 = require("path");
|
|
2156
2156
|
const COLON = isWindows ? ";" : ":";
|
|
2157
2157
|
const isexe = require_isexe();
|
|
2158
|
-
const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
2158
|
+
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
2159
2159
|
const getPathInfo = (cmd, opt) => {
|
|
2160
2160
|
const colon = opt.colon || COLON;
|
|
2161
2161
|
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH || "").split(colon)];
|
|
@@ -2221,11 +2221,11 @@ var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modu
|
|
|
2221
2221
|
};
|
|
2222
2222
|
module.exports = which$1;
|
|
2223
2223
|
which$1.sync = whichSync;
|
|
2224
|
-
} });
|
|
2224
|
+
}) });
|
|
2225
2225
|
|
|
2226
2226
|
//#endregion
|
|
2227
2227
|
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
2228
|
-
var require_path_key = __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module) {
|
|
2228
|
+
var require_path_key = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js": ((exports, module) => {
|
|
2229
2229
|
const pathKey$1 = (options = {}) => {
|
|
2230
2230
|
const environment = options.env || process.env;
|
|
2231
2231
|
const platform$1 = options.platform || process.platform;
|
|
@@ -2234,11 +2234,11 @@ var require_path_key = __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/nod
|
|
|
2234
2234
|
};
|
|
2235
2235
|
module.exports = pathKey$1;
|
|
2236
2236
|
module.exports.default = pathKey$1;
|
|
2237
|
-
} });
|
|
2237
|
+
}) });
|
|
2238
2238
|
|
|
2239
2239
|
//#endregion
|
|
2240
2240
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
2241
|
-
var require_resolveCommand = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
2241
|
+
var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js": ((exports, module) => {
|
|
2242
2242
|
const path$8 = require("path");
|
|
2243
2243
|
const which = require_which();
|
|
2244
2244
|
const getPathKey = require_path_key();
|
|
@@ -2266,11 +2266,11 @@ var require_resolveCommand = __commonJS({ "../../node_modules/.pnpm/cross-spawn@
|
|
|
2266
2266
|
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
2267
2267
|
}
|
|
2268
2268
|
module.exports = resolveCommand$1;
|
|
2269
|
-
} });
|
|
2269
|
+
}) });
|
|
2270
2270
|
|
|
2271
2271
|
//#endregion
|
|
2272
2272
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
2273
|
-
var require_escape = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
|
|
2273
|
+
var require_escape = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js": ((exports, module) => {
|
|
2274
2274
|
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
2275
2275
|
function escapeCommand(arg) {
|
|
2276
2276
|
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
@@ -2287,17 +2287,17 @@ var require_escape = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/no
|
|
|
2287
2287
|
}
|
|
2288
2288
|
module.exports.command = escapeCommand;
|
|
2289
2289
|
module.exports.argument = escapeArgument;
|
|
2290
|
-
} });
|
|
2290
|
+
}) });
|
|
2291
2291
|
|
|
2292
2292
|
//#endregion
|
|
2293
2293
|
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
2294
|
-
var require_shebang_regex = __commonJS({ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module) {
|
|
2294
|
+
var require_shebang_regex = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js": ((exports, module) => {
|
|
2295
2295
|
module.exports = /^#!(.*)/;
|
|
2296
|
-
} });
|
|
2296
|
+
}) });
|
|
2297
2297
|
|
|
2298
2298
|
//#endregion
|
|
2299
2299
|
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
2300
|
-
var require_shebang_command = __commonJS({ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module) {
|
|
2300
|
+
var require_shebang_command = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js": ((exports, module) => {
|
|
2301
2301
|
const shebangRegex = require_shebang_regex();
|
|
2302
2302
|
module.exports = (string = "") => {
|
|
2303
2303
|
const match = string.match(shebangRegex);
|
|
@@ -2307,11 +2307,11 @@ var require_shebang_command = __commonJS({ "../../node_modules/.pnpm/shebang-com
|
|
|
2307
2307
|
if (binary === "env") return argument;
|
|
2308
2308
|
return argument ? `${binary} ${argument}` : binary;
|
|
2309
2309
|
};
|
|
2310
|
-
} });
|
|
2310
|
+
}) });
|
|
2311
2311
|
|
|
2312
2312
|
//#endregion
|
|
2313
2313
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
2314
|
-
var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
2314
|
+
var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js": ((exports, module) => {
|
|
2315
2315
|
const fs$1 = require("fs");
|
|
2316
2316
|
const shebangCommand = require_shebang_command();
|
|
2317
2317
|
function readShebang$1(command) {
|
|
@@ -2326,11 +2326,11 @@ var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0
|
|
|
2326
2326
|
return shebangCommand(buffer.toString());
|
|
2327
2327
|
}
|
|
2328
2328
|
module.exports = readShebang$1;
|
|
2329
|
-
} });
|
|
2329
|
+
}) });
|
|
2330
2330
|
|
|
2331
2331
|
//#endregion
|
|
2332
2332
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
2333
|
-
var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
2333
|
+
var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js": ((exports, module) => {
|
|
2334
2334
|
const path$7 = require("path");
|
|
2335
2335
|
const resolveCommand = require_resolveCommand();
|
|
2336
2336
|
const escape = require_escape();
|
|
@@ -2389,14 +2389,14 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/nod
|
|
|
2389
2389
|
return options.shell ? parsed : parseNonShell(parsed);
|
|
2390
2390
|
}
|
|
2391
2391
|
module.exports = parse$1;
|
|
2392
|
-
} });
|
|
2392
|
+
}) });
|
|
2393
2393
|
|
|
2394
2394
|
//#endregion
|
|
2395
2395
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
2396
|
-
var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports, module) {
|
|
2396
|
+
var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js": ((exports, module) => {
|
|
2397
2397
|
const isWin = process.platform === "win32";
|
|
2398
2398
|
function notFoundError(original, syscall) {
|
|
2399
|
-
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
2399
|
+
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
2400
2400
|
code: "ENOENT",
|
|
2401
2401
|
errno: "ENOENT",
|
|
2402
2402
|
syscall: `${syscall} ${original.command}`,
|
|
@@ -2429,11 +2429,11 @@ var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/no
|
|
|
2429
2429
|
verifyENOENTSync,
|
|
2430
2430
|
notFoundError
|
|
2431
2431
|
};
|
|
2432
|
-
} });
|
|
2432
|
+
}) });
|
|
2433
2433
|
|
|
2434
2434
|
//#endregion
|
|
2435
2435
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
|
|
2436
|
-
var require_cross_spawn = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports, module) {
|
|
2436
|
+
var require_cross_spawn = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js": ((exports, module) => {
|
|
2437
2437
|
const cp = require("child_process");
|
|
2438
2438
|
const parse = require_parse();
|
|
2439
2439
|
const enoent = require_enoent();
|
|
@@ -2454,10 +2454,11 @@ var require_cross_spawn = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0
|
|
|
2454
2454
|
module.exports.sync = spawnSync$1;
|
|
2455
2455
|
module.exports._parse = parse;
|
|
2456
2456
|
module.exports._enoent = enoent;
|
|
2457
|
-
} });
|
|
2457
|
+
}) });
|
|
2458
2458
|
|
|
2459
2459
|
//#endregion
|
|
2460
2460
|
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
2461
|
+
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
2461
2462
|
function pathKey(options = {}) {
|
|
2462
2463
|
const { env: env$1 = process.env, platform: platform$1 = process.platform } = options;
|
|
2463
2464
|
if (platform$1 !== "win32") return "PATH";
|
|
@@ -3028,7 +3029,7 @@ const throwOnMissingStrict = (isSubprocess) => {
|
|
|
3028
3029
|
const throwOnStrictDisconnect = (isSubprocess) => {
|
|
3029
3030
|
throw new Error(`${getMethodName("sendMessage", isSubprocess)} failed: the ${getOtherProcessName(isSubprocess)} exited without listening to incoming messages.`);
|
|
3030
3031
|
};
|
|
3031
|
-
const getAbortDisconnectError = () => new Error(`\`cancelSignal\` aborted: the ${getOtherProcessName(true)} disconnected.`);
|
|
3032
|
+
const getAbortDisconnectError = () => /* @__PURE__ */ new Error(`\`cancelSignal\` aborted: the ${getOtherProcessName(true)} disconnected.`);
|
|
3032
3033
|
const throwOnMissingParent = () => {
|
|
3033
3034
|
throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.");
|
|
3034
3035
|
};
|
|
@@ -3666,7 +3667,6 @@ const fixCwdError = (originalMessage, cwd) => {
|
|
|
3666
3667
|
|
|
3667
3668
|
//#endregion
|
|
3668
3669
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/options.js
|
|
3669
|
-
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
3670
3670
|
const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
3671
3671
|
rawOptions.cwd = normalizeCwd(rawOptions.cwd);
|
|
3672
3672
|
const [processedFile, processedArguments, processedOptions] = handleNodeOption(filePath, rawArguments, rawOptions);
|
|
@@ -3994,7 +3994,7 @@ const arrayMethods = {
|
|
|
3994
3994
|
async function getStreamAsArrayBuffer(stream, options) {
|
|
3995
3995
|
return getStreamContents$1(stream, arrayBufferMethods, options);
|
|
3996
3996
|
}
|
|
3997
|
-
const initArrayBuffer = () => ({ contents: new ArrayBuffer(0) });
|
|
3997
|
+
const initArrayBuffer = () => ({ contents: /* @__PURE__ */ new ArrayBuffer(0) });
|
|
3998
3998
|
const useTextEncoder = (chunk) => textEncoder.encode(chunk);
|
|
3999
3999
|
const textEncoder = new TextEncoder();
|
|
4000
4000
|
const useUint8Array = (chunk) => new Uint8Array(chunk);
|
|
@@ -4343,10 +4343,9 @@ function parseBigint(milliseconds) {
|
|
|
4343
4343
|
}
|
|
4344
4344
|
function parseMilliseconds(milliseconds) {
|
|
4345
4345
|
switch (typeof milliseconds) {
|
|
4346
|
-
case "number":
|
|
4346
|
+
case "number":
|
|
4347
4347
|
if (Number.isFinite(milliseconds)) return parseNumber(milliseconds);
|
|
4348
4348
|
break;
|
|
4349
|
-
}
|
|
4350
4349
|
case "bigint": return parseBigint(milliseconds);
|
|
4351
4350
|
}
|
|
4352
4351
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -4886,10 +4885,10 @@ const getDuplicateStream = ({ stdioItem: { type, value, optionName }, direction,
|
|
|
4886
4885
|
optionName
|
|
4887
4886
|
});
|
|
4888
4887
|
};
|
|
4889
|
-
const getOtherStdioItems = (fileDescriptors, type) => fileDescriptors.flatMap(({ direction, stdioItems }) => stdioItems.filter((stdioItem) => stdioItem.type === type).map((stdioItem) => ({
|
|
4888
|
+
const getOtherStdioItems = (fileDescriptors, type) => fileDescriptors.flatMap(({ direction, stdioItems }) => stdioItems.filter((stdioItem) => stdioItem.type === type).map(((stdioItem) => ({
|
|
4890
4889
|
...stdioItem,
|
|
4891
4890
|
direction
|
|
4892
|
-
})));
|
|
4891
|
+
}))));
|
|
4893
4892
|
const validateDuplicateStreamSync = ({ otherStdioItems, type, value, optionName, direction }) => {
|
|
4894
4893
|
if (SPECIAL_DUPLICATE_TYPES_SYNC.has(type)) getDuplicateStreamInstance({
|
|
4895
4894
|
otherStdioItems,
|
|
@@ -5406,7 +5405,7 @@ const logLine = (line, fdNumber, verboseInfo) => {
|
|
|
5406
5405
|
const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, isMaxBuffer, verboseInfo }) => {
|
|
5407
5406
|
if (output === null) return { output: Array.from({ length: 3 }) };
|
|
5408
5407
|
const state = {};
|
|
5409
|
-
const outputFiles = new Set([]);
|
|
5408
|
+
const outputFiles = /* @__PURE__ */ new Set([]);
|
|
5410
5409
|
const transformedOutput = output.map((result, fdNumber) => transformOutputResultSync({
|
|
5411
5410
|
result,
|
|
5412
5411
|
fileDescriptors,
|
|
@@ -5968,9 +5967,9 @@ const getHighWaterMark = (streams, objectMode) => {
|
|
|
5968
5967
|
return Math.max(...highWaterMarks);
|
|
5969
5968
|
};
|
|
5970
5969
|
var MergedStream = class extends node_stream.PassThrough {
|
|
5971
|
-
#streams = new Set([]);
|
|
5972
|
-
#ended = new Set([]);
|
|
5973
|
-
#aborted = new Set([]);
|
|
5970
|
+
#streams = /* @__PURE__ */ new Set([]);
|
|
5971
|
+
#ended = /* @__PURE__ */ new Set([]);
|
|
5972
|
+
#aborted = /* @__PURE__ */ new Set([]);
|
|
5974
5973
|
#onFinished;
|
|
5975
5974
|
#unpipeEvent = Symbol("unpipe");
|
|
5976
5975
|
#streamPromises = /* @__PURE__ */ new WeakMap();
|
|
@@ -6569,7 +6568,7 @@ const unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ?
|
|
|
6569
6568
|
const unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, fileDescriptors, sourceOptions, startTime }) => {
|
|
6570
6569
|
await (0, node_util.aborted)(unpipeSignal, sourceStream);
|
|
6571
6570
|
await mergedStream.remove(sourceStream);
|
|
6572
|
-
const error = new Error("Pipe canceled by `unpipeSignal` option.");
|
|
6571
|
+
const error = /* @__PURE__ */ new Error("Pipe canceled by `unpipeSignal` option.");
|
|
6573
6572
|
throw createNonCommandError({
|
|
6574
6573
|
error,
|
|
6575
6574
|
fileDescriptors,
|
|
@@ -7780,7 +7779,7 @@ const selectBucket = async (api) => {
|
|
|
7780
7779
|
await Te([{
|
|
7781
7780
|
title: "Fetching bucket list...",
|
|
7782
7781
|
task: async (message) => {
|
|
7783
|
-
while (retryCount <
|
|
7782
|
+
while (retryCount < 300) try {
|
|
7784
7783
|
if (retryCount === 5) message("Supabase project is not ready yet. This might take a few minutes.");
|
|
7785
7784
|
buckets = await api.listBuckets();
|
|
7786
7785
|
return `Retrieved ${buckets.length} buckets`;
|
|
@@ -7827,19 +7826,20 @@ const selectBucket = async (api) => {
|
|
|
7827
7826
|
}
|
|
7828
7827
|
return JSON.parse(selectedBucketId);
|
|
7829
7828
|
};
|
|
7830
|
-
const linkSupabase = async (workdir, projectId) => {
|
|
7829
|
+
const linkSupabase = async (workdir, { projectId, dbPassword }) => {
|
|
7831
7830
|
const spinner = Y();
|
|
7832
|
-
spinner.start("Linking Supabase...");
|
|
7833
7831
|
try {
|
|
7834
7832
|
await fs_promises.default.writeFile(path.default.join(workdir, "supabase", "config.toml"), (0, __hot_updater_plugin_core.transformTemplate)(SUPABASE_CONFIG_TEMPLATE, { projectId }));
|
|
7833
|
+
spinner.start("Linking Supabase...");
|
|
7835
7834
|
await execa("npx", [
|
|
7836
7835
|
"supabase",
|
|
7837
7836
|
"link",
|
|
7838
7837
|
"--project-ref",
|
|
7839
7838
|
projectId,
|
|
7840
7839
|
"--workdir",
|
|
7841
|
-
workdir
|
|
7842
|
-
|
|
7840
|
+
workdir,
|
|
7841
|
+
dbPassword ? ["--password", dbPassword] : []
|
|
7842
|
+
].flat(), {
|
|
7843
7843
|
cwd: workdir,
|
|
7844
7844
|
input: "",
|
|
7845
7845
|
stdio: [
|
|
@@ -7856,14 +7856,15 @@ const linkSupabase = async (workdir, projectId) => {
|
|
|
7856
7856
|
process.exit(1);
|
|
7857
7857
|
}
|
|
7858
7858
|
};
|
|
7859
|
-
const pushDB = async (workdir) => {
|
|
7859
|
+
const pushDB = async (workdir, { dbPassword }) => {
|
|
7860
7860
|
try {
|
|
7861
7861
|
const dbPush = await execa("npx", [
|
|
7862
7862
|
"supabase",
|
|
7863
7863
|
"db",
|
|
7864
7864
|
"push",
|
|
7865
|
-
"--include-all"
|
|
7866
|
-
|
|
7865
|
+
"--include-all",
|
|
7866
|
+
dbPassword ? ["--password", dbPassword] : []
|
|
7867
|
+
].flat(), {
|
|
7867
7868
|
cwd: workdir,
|
|
7868
7869
|
stdio: "inherit",
|
|
7869
7870
|
shell: true
|
|
@@ -7950,8 +7951,13 @@ const runInit = async ({ build }) => {
|
|
|
7950
7951
|
const content = await fs_promises.default.readFile(filePath, "utf-8");
|
|
7951
7952
|
await fs_promises.default.writeFile(filePath, (0, __hot_updater_plugin_core.transformTemplate)(content, { BUCKET_NAME: bucket.name }));
|
|
7952
7953
|
}
|
|
7953
|
-
await
|
|
7954
|
-
|
|
7954
|
+
const dbPassword = await ge({ message: "Enter your Supabase database password (press Enter to skip if none)" });
|
|
7955
|
+
if (BD(dbPassword)) process.exit(0);
|
|
7956
|
+
await linkSupabase(tmpDir, {
|
|
7957
|
+
projectId: project.id,
|
|
7958
|
+
dbPassword
|
|
7959
|
+
});
|
|
7960
|
+
await pushDB(tmpDir, { dbPassword });
|
|
7955
7961
|
await deployEdgeFunction(tmpDir, project.id);
|
|
7956
7962
|
await removeTmpDir();
|
|
7957
7963
|
await fs_promises.default.writeFile("hot-updater.config.ts", getConfigTemplate(build));
|
|
@@ -7960,10 +7966,10 @@ const runInit = async ({ build }) => {
|
|
|
7960
7966
|
HOT_UPDATER_SUPABASE_BUCKET_NAME: bucket.name,
|
|
7961
7967
|
HOT_UPDATER_SUPABASE_URL: `https://${project.id}.supabase.co`
|
|
7962
7968
|
});
|
|
7963
|
-
f.success("Generated '.env' file with Supabase settings.");
|
|
7969
|
+
f.success("Generated '.env.hotupdater' file with Supabase settings.");
|
|
7964
7970
|
f.success("Generated 'hot-updater.config.ts' file with Supabase settings.");
|
|
7965
7971
|
Me((0, __hot_updater_plugin_core.transformTemplate)(SOURCE_TEMPLATE, { source: `https://${project.id}.supabase.co/functions/v1/update-server` }));
|
|
7966
|
-
f.message(`Next step: ${(0, __hot_updater_plugin_core.link)("https://
|
|
7972
|
+
f.message(`Next step: ${(0, __hot_updater_plugin_core.link)("https://hot-updater.dev/guide/getting-started/quick-start-with-supabase.html#step-4-add-hotupdater-to-your-project")}`);
|
|
7967
7973
|
f.success("Done! 🎉");
|
|
7968
7974
|
};
|
|
7969
7975
|
|
package/dist/iac/index.js
CHANGED
|
@@ -49,7 +49,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
49
49
|
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
52
|
-
var require_src = __commonJS({ "../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
|
|
52
|
+
var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js": ((exports, module) => {
|
|
53
53
|
const ESC = "\x1B";
|
|
54
54
|
const CSI = `${ESC}[`;
|
|
55
55
|
const beep = "\x07";
|
|
@@ -102,11 +102,11 @@ var require_src = __commonJS({ "../../node_modules/.pnpm/sisteransi@1.0.5/node_m
|
|
|
102
102
|
erase,
|
|
103
103
|
beep
|
|
104
104
|
};
|
|
105
|
-
} });
|
|
105
|
+
}) });
|
|
106
106
|
|
|
107
107
|
//#endregion
|
|
108
108
|
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
109
|
-
var require_picocolors = __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
109
|
+
var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
|
|
110
110
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
111
111
|
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
112
112
|
let formatter = (open, close, replace = open) => (input) => {
|
|
@@ -171,12 +171,12 @@ var require_picocolors = __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1
|
|
|
171
171
|
};
|
|
172
172
|
module.exports = createColors();
|
|
173
173
|
module.exports.createColors = createColors;
|
|
174
|
-
} });
|
|
174
|
+
}) });
|
|
175
175
|
|
|
176
176
|
//#endregion
|
|
177
177
|
//#region ../../node_modules/.pnpm/@clack+core@0.4.1/node_modules/@clack/core/dist/index.mjs
|
|
178
|
-
var import_src$1 = __toESM(require_src(), 1);
|
|
179
|
-
var import_picocolors$1 = __toESM(require_picocolors(), 1);
|
|
178
|
+
var import_src$1 = /* @__PURE__ */ __toESM(require_src(), 1);
|
|
179
|
+
var import_picocolors$1 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
180
180
|
function J$1({ onlyFirst: t = !1 } = {}) {
|
|
181
181
|
const F$1 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
182
182
|
return new RegExp(F$1, t ? void 0 : "g");
|
|
@@ -421,7 +421,7 @@ const iD = sD(), v = new Set(["\x1B", ""]), CD = 39, w$1 = "\x07", W$1 = "[",
|
|
|
421
421
|
`)];
|
|
422
422
|
for (const [E, a$1] of o$2.entries()) {
|
|
423
423
|
if (e$1 += a$1, v.has(a$1)) {
|
|
424
|
-
const { groups: B$1 } = new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`).exec(o$2.slice(E).join("")) || { groups: {} };
|
|
424
|
+
const { groups: B$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`)).exec(o$2.slice(E).join("")) || { groups: {} };
|
|
425
425
|
if (B$1.code !== void 0) {
|
|
426
426
|
const p$1 = Number.parseFloat(B$1.code);
|
|
427
427
|
s = p$1 === CD ? void 0 : p$1;
|
|
@@ -814,8 +814,8 @@ var PD = class extends x {
|
|
|
814
814
|
|
|
815
815
|
//#endregion
|
|
816
816
|
//#region ../../node_modules/.pnpm/@clack+prompts@0.10.0/node_modules/@clack/prompts/dist/index.mjs
|
|
817
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
818
|
-
var import_src = __toESM(require_src(), 1);
|
|
817
|
+
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
818
|
+
var import_src = /* @__PURE__ */ __toESM(require_src(), 1);
|
|
819
819
|
function ce() {
|
|
820
820
|
return g.platform !== "win32" ? g.env.TERM !== "linux" : !!g.env.CI || !!g.env.WT_SESSION || !!g.env.TERMINUS_SUBLIME || g.env.ConEmuTask === "{cmd::Cmder}" || g.env.TERM_PROGRAM === "Terminus-Sublime" || g.env.TERM_PROGRAM === "vscode" || g.env.TERM === "xterm-256color" || g.env.TERM === "alacritty" || g.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
821
821
|
}
|
|
@@ -2047,10 +2047,10 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
2047
2047
|
|
|
2048
2048
|
//#endregion
|
|
2049
2049
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
2050
|
-
var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) {
|
|
2050
|
+
var require_windows = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js": ((exports, module) => {
|
|
2051
2051
|
module.exports = isexe$3;
|
|
2052
2052
|
isexe$3.sync = sync$2;
|
|
2053
|
-
var fs$
|
|
2053
|
+
var fs$3 = __require("fs");
|
|
2054
2054
|
function checkPathExt(path$5, options) {
|
|
2055
2055
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
2056
2056
|
if (!pathext) return true;
|
|
@@ -2067,28 +2067,28 @@ var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_mo
|
|
|
2067
2067
|
return checkPathExt(path$5, options);
|
|
2068
2068
|
}
|
|
2069
2069
|
function isexe$3(path$5, options, cb) {
|
|
2070
|
-
fs$
|
|
2070
|
+
fs$3.stat(path$5, function(er, stat) {
|
|
2071
2071
|
cb(er, er ? false : checkStat$1(stat, path$5, options));
|
|
2072
2072
|
});
|
|
2073
2073
|
}
|
|
2074
2074
|
function sync$2(path$5, options) {
|
|
2075
|
-
return checkStat$1(fs$
|
|
2075
|
+
return checkStat$1(fs$3.statSync(path$5), path$5, options);
|
|
2076
2076
|
}
|
|
2077
|
-
} });
|
|
2077
|
+
}) });
|
|
2078
2078
|
|
|
2079
2079
|
//#endregion
|
|
2080
2080
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
2081
|
-
var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) {
|
|
2081
|
+
var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js": ((exports, module) => {
|
|
2082
2082
|
module.exports = isexe$2;
|
|
2083
2083
|
isexe$2.sync = sync$1;
|
|
2084
|
-
var fs$
|
|
2084
|
+
var fs$2 = __require("fs");
|
|
2085
2085
|
function isexe$2(path$5, options, cb) {
|
|
2086
|
-
fs$
|
|
2086
|
+
fs$2.stat(path$5, function(er, stat) {
|
|
2087
2087
|
cb(er, er ? false : checkStat(stat, options));
|
|
2088
2088
|
});
|
|
2089
2089
|
}
|
|
2090
2090
|
function sync$1(path$5, options) {
|
|
2091
|
-
return checkStat(fs$
|
|
2091
|
+
return checkStat(fs$2.statSync(path$5), options);
|
|
2092
2092
|
}
|
|
2093
2093
|
function checkStat(stat, options) {
|
|
2094
2094
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -2106,12 +2106,12 @@ var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modul
|
|
|
2106
2106
|
var ret = mod & o$2 || mod & g$2 && gid === myGid || mod & u$2 && uid === myUid || mod & ug && myUid === 0;
|
|
2107
2107
|
return ret;
|
|
2108
2108
|
}
|
|
2109
|
-
} });
|
|
2109
|
+
}) });
|
|
2110
2110
|
|
|
2111
2111
|
//#endregion
|
|
2112
2112
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
2113
|
-
var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
|
|
2114
|
-
|
|
2113
|
+
var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js": ((exports, module) => {
|
|
2114
|
+
__require("fs");
|
|
2115
2115
|
var core;
|
|
2116
2116
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
2117
2117
|
else core = require_mode();
|
|
@@ -2149,16 +2149,16 @@ var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modu
|
|
|
2149
2149
|
else throw er;
|
|
2150
2150
|
}
|
|
2151
2151
|
}
|
|
2152
|
-
} });
|
|
2152
|
+
}) });
|
|
2153
2153
|
|
|
2154
2154
|
//#endregion
|
|
2155
2155
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
2156
|
-
var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module) {
|
|
2156
|
+
var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js": ((exports, module) => {
|
|
2157
2157
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
2158
2158
|
const path$4 = __require("path");
|
|
2159
2159
|
const COLON = isWindows ? ";" : ":";
|
|
2160
2160
|
const isexe = require_isexe();
|
|
2161
|
-
const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
2161
|
+
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
2162
2162
|
const getPathInfo = (cmd, opt) => {
|
|
2163
2163
|
const colon = opt.colon || COLON;
|
|
2164
2164
|
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH || "").split(colon)];
|
|
@@ -2224,11 +2224,11 @@ var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modu
|
|
|
2224
2224
|
};
|
|
2225
2225
|
module.exports = which$1;
|
|
2226
2226
|
which$1.sync = whichSync;
|
|
2227
|
-
} });
|
|
2227
|
+
}) });
|
|
2228
2228
|
|
|
2229
2229
|
//#endregion
|
|
2230
2230
|
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
2231
|
-
var require_path_key = __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module) {
|
|
2231
|
+
var require_path_key = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js": ((exports, module) => {
|
|
2232
2232
|
const pathKey$1 = (options = {}) => {
|
|
2233
2233
|
const environment = options.env || process.env;
|
|
2234
2234
|
const platform$1 = options.platform || process.platform;
|
|
@@ -2237,11 +2237,11 @@ var require_path_key = __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/nod
|
|
|
2237
2237
|
};
|
|
2238
2238
|
module.exports = pathKey$1;
|
|
2239
2239
|
module.exports.default = pathKey$1;
|
|
2240
|
-
} });
|
|
2240
|
+
}) });
|
|
2241
2241
|
|
|
2242
2242
|
//#endregion
|
|
2243
2243
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
2244
|
-
var require_resolveCommand = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
2244
|
+
var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js": ((exports, module) => {
|
|
2245
2245
|
const path$3 = __require("path");
|
|
2246
2246
|
const which = require_which();
|
|
2247
2247
|
const getPathKey = require_path_key();
|
|
@@ -2269,11 +2269,11 @@ var require_resolveCommand = __commonJS({ "../../node_modules/.pnpm/cross-spawn@
|
|
|
2269
2269
|
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
2270
2270
|
}
|
|
2271
2271
|
module.exports = resolveCommand$1;
|
|
2272
|
-
} });
|
|
2272
|
+
}) });
|
|
2273
2273
|
|
|
2274
2274
|
//#endregion
|
|
2275
2275
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
2276
|
-
var require_escape = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
|
|
2276
|
+
var require_escape = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js": ((exports, module) => {
|
|
2277
2277
|
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
2278
2278
|
function escapeCommand(arg) {
|
|
2279
2279
|
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
@@ -2290,17 +2290,17 @@ var require_escape = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/no
|
|
|
2290
2290
|
}
|
|
2291
2291
|
module.exports.command = escapeCommand;
|
|
2292
2292
|
module.exports.argument = escapeArgument;
|
|
2293
|
-
} });
|
|
2293
|
+
}) });
|
|
2294
2294
|
|
|
2295
2295
|
//#endregion
|
|
2296
2296
|
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
2297
|
-
var require_shebang_regex = __commonJS({ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module) {
|
|
2297
|
+
var require_shebang_regex = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js": ((exports, module) => {
|
|
2298
2298
|
module.exports = /^#!(.*)/;
|
|
2299
|
-
} });
|
|
2299
|
+
}) });
|
|
2300
2300
|
|
|
2301
2301
|
//#endregion
|
|
2302
2302
|
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
2303
|
-
var require_shebang_command = __commonJS({ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module) {
|
|
2303
|
+
var require_shebang_command = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js": ((exports, module) => {
|
|
2304
2304
|
const shebangRegex = require_shebang_regex();
|
|
2305
2305
|
module.exports = (string = "") => {
|
|
2306
2306
|
const match = string.match(shebangRegex);
|
|
@@ -2310,11 +2310,11 @@ var require_shebang_command = __commonJS({ "../../node_modules/.pnpm/shebang-com
|
|
|
2310
2310
|
if (binary === "env") return argument;
|
|
2311
2311
|
return argument ? `${binary} ${argument}` : binary;
|
|
2312
2312
|
};
|
|
2313
|
-
} });
|
|
2313
|
+
}) });
|
|
2314
2314
|
|
|
2315
2315
|
//#endregion
|
|
2316
2316
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
2317
|
-
var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
2317
|
+
var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js": ((exports, module) => {
|
|
2318
2318
|
const fs$1 = __require("fs");
|
|
2319
2319
|
const shebangCommand = require_shebang_command();
|
|
2320
2320
|
function readShebang$1(command) {
|
|
@@ -2329,11 +2329,11 @@ var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0
|
|
|
2329
2329
|
return shebangCommand(buffer.toString());
|
|
2330
2330
|
}
|
|
2331
2331
|
module.exports = readShebang$1;
|
|
2332
|
-
} });
|
|
2332
|
+
}) });
|
|
2333
2333
|
|
|
2334
2334
|
//#endregion
|
|
2335
2335
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
2336
|
-
var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
2336
|
+
var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js": ((exports, module) => {
|
|
2337
2337
|
const path$2 = __require("path");
|
|
2338
2338
|
const resolveCommand = require_resolveCommand();
|
|
2339
2339
|
const escape = require_escape();
|
|
@@ -2392,14 +2392,14 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/nod
|
|
|
2392
2392
|
return options.shell ? parsed : parseNonShell(parsed);
|
|
2393
2393
|
}
|
|
2394
2394
|
module.exports = parse$1;
|
|
2395
|
-
} });
|
|
2395
|
+
}) });
|
|
2396
2396
|
|
|
2397
2397
|
//#endregion
|
|
2398
2398
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
2399
|
-
var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports, module) {
|
|
2399
|
+
var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js": ((exports, module) => {
|
|
2400
2400
|
const isWin = process.platform === "win32";
|
|
2401
2401
|
function notFoundError(original, syscall) {
|
|
2402
|
-
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
2402
|
+
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
2403
2403
|
code: "ENOENT",
|
|
2404
2404
|
errno: "ENOENT",
|
|
2405
2405
|
syscall: `${syscall} ${original.command}`,
|
|
@@ -2432,11 +2432,11 @@ var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/no
|
|
|
2432
2432
|
verifyENOENTSync,
|
|
2433
2433
|
notFoundError
|
|
2434
2434
|
};
|
|
2435
|
-
} });
|
|
2435
|
+
}) });
|
|
2436
2436
|
|
|
2437
2437
|
//#endregion
|
|
2438
2438
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
|
|
2439
|
-
var require_cross_spawn = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports, module) {
|
|
2439
|
+
var require_cross_spawn = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js": ((exports, module) => {
|
|
2440
2440
|
const cp = __require("child_process");
|
|
2441
2441
|
const parse = require_parse();
|
|
2442
2442
|
const enoent = require_enoent();
|
|
@@ -2457,10 +2457,11 @@ var require_cross_spawn = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0
|
|
|
2457
2457
|
module.exports.sync = spawnSync$1;
|
|
2458
2458
|
module.exports._parse = parse;
|
|
2459
2459
|
module.exports._enoent = enoent;
|
|
2460
|
-
} });
|
|
2460
|
+
}) });
|
|
2461
2461
|
|
|
2462
2462
|
//#endregion
|
|
2463
2463
|
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
2464
|
+
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
2464
2465
|
function pathKey(options = {}) {
|
|
2465
2466
|
const { env: env$1 = process.env, platform: platform$1 = process.platform } = options;
|
|
2466
2467
|
if (platform$1 !== "win32") return "PATH";
|
|
@@ -3031,7 +3032,7 @@ const throwOnMissingStrict = (isSubprocess) => {
|
|
|
3031
3032
|
const throwOnStrictDisconnect = (isSubprocess) => {
|
|
3032
3033
|
throw new Error(`${getMethodName("sendMessage", isSubprocess)} failed: the ${getOtherProcessName(isSubprocess)} exited without listening to incoming messages.`);
|
|
3033
3034
|
};
|
|
3034
|
-
const getAbortDisconnectError = () => new Error(`\`cancelSignal\` aborted: the ${getOtherProcessName(true)} disconnected.`);
|
|
3035
|
+
const getAbortDisconnectError = () => /* @__PURE__ */ new Error(`\`cancelSignal\` aborted: the ${getOtherProcessName(true)} disconnected.`);
|
|
3035
3036
|
const throwOnMissingParent = () => {
|
|
3036
3037
|
throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.");
|
|
3037
3038
|
};
|
|
@@ -3669,7 +3670,6 @@ const fixCwdError = (originalMessage, cwd) => {
|
|
|
3669
3670
|
|
|
3670
3671
|
//#endregion
|
|
3671
3672
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/options.js
|
|
3672
|
-
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
3673
3673
|
const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
3674
3674
|
rawOptions.cwd = normalizeCwd(rawOptions.cwd);
|
|
3675
3675
|
const [processedFile, processedArguments, processedOptions] = handleNodeOption(filePath, rawArguments, rawOptions);
|
|
@@ -3997,7 +3997,7 @@ const arrayMethods = {
|
|
|
3997
3997
|
async function getStreamAsArrayBuffer(stream, options) {
|
|
3998
3998
|
return getStreamContents$1(stream, arrayBufferMethods, options);
|
|
3999
3999
|
}
|
|
4000
|
-
const initArrayBuffer = () => ({ contents: new ArrayBuffer(0) });
|
|
4000
|
+
const initArrayBuffer = () => ({ contents: /* @__PURE__ */ new ArrayBuffer(0) });
|
|
4001
4001
|
const useTextEncoder = (chunk) => textEncoder.encode(chunk);
|
|
4002
4002
|
const textEncoder = new TextEncoder();
|
|
4003
4003
|
const useUint8Array = (chunk) => new Uint8Array(chunk);
|
|
@@ -4346,10 +4346,9 @@ function parseBigint(milliseconds) {
|
|
|
4346
4346
|
}
|
|
4347
4347
|
function parseMilliseconds(milliseconds) {
|
|
4348
4348
|
switch (typeof milliseconds) {
|
|
4349
|
-
case "number":
|
|
4349
|
+
case "number":
|
|
4350
4350
|
if (Number.isFinite(milliseconds)) return parseNumber(milliseconds);
|
|
4351
4351
|
break;
|
|
4352
|
-
}
|
|
4353
4352
|
case "bigint": return parseBigint(milliseconds);
|
|
4354
4353
|
}
|
|
4355
4354
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -4889,10 +4888,10 @@ const getDuplicateStream = ({ stdioItem: { type, value, optionName }, direction,
|
|
|
4889
4888
|
optionName
|
|
4890
4889
|
});
|
|
4891
4890
|
};
|
|
4892
|
-
const getOtherStdioItems = (fileDescriptors, type) => fileDescriptors.flatMap(({ direction, stdioItems }) => stdioItems.filter((stdioItem) => stdioItem.type === type).map((stdioItem) => ({
|
|
4891
|
+
const getOtherStdioItems = (fileDescriptors, type) => fileDescriptors.flatMap(({ direction, stdioItems }) => stdioItems.filter((stdioItem) => stdioItem.type === type).map(((stdioItem) => ({
|
|
4893
4892
|
...stdioItem,
|
|
4894
4893
|
direction
|
|
4895
|
-
})));
|
|
4894
|
+
}))));
|
|
4896
4895
|
const validateDuplicateStreamSync = ({ otherStdioItems, type, value, optionName, direction }) => {
|
|
4897
4896
|
if (SPECIAL_DUPLICATE_TYPES_SYNC.has(type)) getDuplicateStreamInstance({
|
|
4898
4897
|
otherStdioItems,
|
|
@@ -5409,7 +5408,7 @@ const logLine = (line, fdNumber, verboseInfo) => {
|
|
|
5409
5408
|
const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, isMaxBuffer, verboseInfo }) => {
|
|
5410
5409
|
if (output === null) return { output: Array.from({ length: 3 }) };
|
|
5411
5410
|
const state = {};
|
|
5412
|
-
const outputFiles = new Set([]);
|
|
5411
|
+
const outputFiles = /* @__PURE__ */ new Set([]);
|
|
5413
5412
|
const transformedOutput = output.map((result, fdNumber) => transformOutputResultSync({
|
|
5414
5413
|
result,
|
|
5415
5414
|
fileDescriptors,
|
|
@@ -5971,9 +5970,9 @@ const getHighWaterMark = (streams, objectMode) => {
|
|
|
5971
5970
|
return Math.max(...highWaterMarks);
|
|
5972
5971
|
};
|
|
5973
5972
|
var MergedStream = class extends PassThrough {
|
|
5974
|
-
#streams = new Set([]);
|
|
5975
|
-
#ended = new Set([]);
|
|
5976
|
-
#aborted = new Set([]);
|
|
5973
|
+
#streams = /* @__PURE__ */ new Set([]);
|
|
5974
|
+
#ended = /* @__PURE__ */ new Set([]);
|
|
5975
|
+
#aborted = /* @__PURE__ */ new Set([]);
|
|
5977
5976
|
#onFinished;
|
|
5978
5977
|
#unpipeEvent = Symbol("unpipe");
|
|
5979
5978
|
#streamPromises = /* @__PURE__ */ new WeakMap();
|
|
@@ -6572,7 +6571,7 @@ const unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ?
|
|
|
6572
6571
|
const unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, fileDescriptors, sourceOptions, startTime }) => {
|
|
6573
6572
|
await aborted(unpipeSignal, sourceStream);
|
|
6574
6573
|
await mergedStream.remove(sourceStream);
|
|
6575
|
-
const error = new Error("Pipe canceled by `unpipeSignal` option.");
|
|
6574
|
+
const error = /* @__PURE__ */ new Error("Pipe canceled by `unpipeSignal` option.");
|
|
6576
6575
|
throw createNonCommandError({
|
|
6577
6576
|
error,
|
|
6578
6577
|
fileDescriptors,
|
|
@@ -7783,7 +7782,7 @@ const selectBucket = async (api) => {
|
|
|
7783
7782
|
await Te([{
|
|
7784
7783
|
title: "Fetching bucket list...",
|
|
7785
7784
|
task: async (message) => {
|
|
7786
|
-
while (retryCount <
|
|
7785
|
+
while (retryCount < 300) try {
|
|
7787
7786
|
if (retryCount === 5) message("Supabase project is not ready yet. This might take a few minutes.");
|
|
7788
7787
|
buckets = await api.listBuckets();
|
|
7789
7788
|
return `Retrieved ${buckets.length} buckets`;
|
|
@@ -7830,19 +7829,20 @@ const selectBucket = async (api) => {
|
|
|
7830
7829
|
}
|
|
7831
7830
|
return JSON.parse(selectedBucketId);
|
|
7832
7831
|
};
|
|
7833
|
-
const linkSupabase = async (workdir, projectId) => {
|
|
7832
|
+
const linkSupabase = async (workdir, { projectId, dbPassword }) => {
|
|
7834
7833
|
const spinner = Y();
|
|
7835
|
-
spinner.start("Linking Supabase...");
|
|
7836
7834
|
try {
|
|
7837
7835
|
await fs.writeFile(path$1.join(workdir, "supabase", "config.toml"), transformTemplate(SUPABASE_CONFIG_TEMPLATE, { projectId }));
|
|
7836
|
+
spinner.start("Linking Supabase...");
|
|
7838
7837
|
await execa("npx", [
|
|
7839
7838
|
"supabase",
|
|
7840
7839
|
"link",
|
|
7841
7840
|
"--project-ref",
|
|
7842
7841
|
projectId,
|
|
7843
7842
|
"--workdir",
|
|
7844
|
-
workdir
|
|
7845
|
-
|
|
7843
|
+
workdir,
|
|
7844
|
+
dbPassword ? ["--password", dbPassword] : []
|
|
7845
|
+
].flat(), {
|
|
7846
7846
|
cwd: workdir,
|
|
7847
7847
|
input: "",
|
|
7848
7848
|
stdio: [
|
|
@@ -7859,14 +7859,15 @@ const linkSupabase = async (workdir, projectId) => {
|
|
|
7859
7859
|
process.exit(1);
|
|
7860
7860
|
}
|
|
7861
7861
|
};
|
|
7862
|
-
const pushDB = async (workdir) => {
|
|
7862
|
+
const pushDB = async (workdir, { dbPassword }) => {
|
|
7863
7863
|
try {
|
|
7864
7864
|
const dbPush = await execa("npx", [
|
|
7865
7865
|
"supabase",
|
|
7866
7866
|
"db",
|
|
7867
7867
|
"push",
|
|
7868
|
-
"--include-all"
|
|
7869
|
-
|
|
7868
|
+
"--include-all",
|
|
7869
|
+
dbPassword ? ["--password", dbPassword] : []
|
|
7870
|
+
].flat(), {
|
|
7870
7871
|
cwd: workdir,
|
|
7871
7872
|
stdio: "inherit",
|
|
7872
7873
|
shell: true
|
|
@@ -7953,8 +7954,13 @@ const runInit = async ({ build }) => {
|
|
|
7953
7954
|
const content = await fs.readFile(filePath, "utf-8");
|
|
7954
7955
|
await fs.writeFile(filePath, transformTemplate(content, { BUCKET_NAME: bucket.name }));
|
|
7955
7956
|
}
|
|
7956
|
-
await
|
|
7957
|
-
|
|
7957
|
+
const dbPassword = await ge({ message: "Enter your Supabase database password (press Enter to skip if none)" });
|
|
7958
|
+
if (BD(dbPassword)) process.exit(0);
|
|
7959
|
+
await linkSupabase(tmpDir, {
|
|
7960
|
+
projectId: project.id,
|
|
7961
|
+
dbPassword
|
|
7962
|
+
});
|
|
7963
|
+
await pushDB(tmpDir, { dbPassword });
|
|
7958
7964
|
await deployEdgeFunction(tmpDir, project.id);
|
|
7959
7965
|
await removeTmpDir();
|
|
7960
7966
|
await fs.writeFile("hot-updater.config.ts", getConfigTemplate(build));
|
|
@@ -7963,10 +7969,10 @@ const runInit = async ({ build }) => {
|
|
|
7963
7969
|
HOT_UPDATER_SUPABASE_BUCKET_NAME: bucket.name,
|
|
7964
7970
|
HOT_UPDATER_SUPABASE_URL: `https://${project.id}.supabase.co`
|
|
7965
7971
|
});
|
|
7966
|
-
f.success("Generated '.env' file with Supabase settings.");
|
|
7972
|
+
f.success("Generated '.env.hotupdater' file with Supabase settings.");
|
|
7967
7973
|
f.success("Generated 'hot-updater.config.ts' file with Supabase settings.");
|
|
7968
7974
|
Me(transformTemplate(SOURCE_TEMPLATE, { source: `https://${project.id}.supabase.co/functions/v1/update-server` }));
|
|
7969
|
-
f.message(`Next step: ${link("https://
|
|
7975
|
+
f.message(`Next step: ${link("https://hot-updater.dev/guide/getting-started/quick-start-with-supabase.html#step-4-add-hotupdater-to-your-project")}`);
|
|
7970
7976
|
f.success("Done! 🎉");
|
|
7971
7977
|
};
|
|
7972
7978
|
|
package/dist/index.cjs
CHANGED
|
@@ -1461,11 +1461,12 @@ var src_default = new Mime_default(standard_default, other_default)._freeze();
|
|
|
1461
1461
|
const supabaseStorage = (config, hooks) => (_) => {
|
|
1462
1462
|
const supabase = (0, __supabase_supabase_js.createClient)(config.supabaseUrl, config.supabaseAnonKey);
|
|
1463
1463
|
const bucket = supabase.storage.from(config.bucketName);
|
|
1464
|
+
const getStorageKey = (0, __hot_updater_plugin_core.createStorageKeyBuilder)(config.basePath);
|
|
1464
1465
|
return {
|
|
1465
1466
|
name: "supabaseStorage",
|
|
1466
1467
|
async deleteBundle(bundleId) {
|
|
1467
1468
|
const filename = "bundle.zip";
|
|
1468
|
-
const Key =
|
|
1469
|
+
const Key = getStorageKey(bundleId, filename);
|
|
1469
1470
|
const { error } = await bucket.remove([Key]);
|
|
1470
1471
|
if (error) {
|
|
1471
1472
|
if (error.message?.includes("not found")) throw new Error(`Bundle with id ${bundleId} not found`);
|
|
@@ -1477,7 +1478,7 @@ const supabaseStorage = (config, hooks) => (_) => {
|
|
|
1477
1478
|
const Body = await fs_promises.default.readFile(bundlePath);
|
|
1478
1479
|
const ContentType = src_default.getType(bundlePath) ?? void 0;
|
|
1479
1480
|
const filename = path.default.basename(bundlePath);
|
|
1480
|
-
const Key =
|
|
1481
|
+
const Key = getStorageKey(bundleId, filename);
|
|
1481
1482
|
const upload = await bucket.upload(Key, Body, { contentType: ContentType });
|
|
1482
1483
|
if (upload.error) throw upload.error;
|
|
1483
1484
|
const fullPath = upload.data.fullPath;
|
package/dist/index.d.cts
CHANGED
|
@@ -13,6 +13,10 @@ interface SupabaseStorageConfig {
|
|
|
13
13
|
supabaseUrl: string;
|
|
14
14
|
supabaseAnonKey: string;
|
|
15
15
|
bucketName: string;
|
|
16
|
+
/**
|
|
17
|
+
* Base path where bundles will be stored in the bucket
|
|
18
|
+
*/
|
|
19
|
+
basePath?: string;
|
|
16
20
|
}
|
|
17
21
|
declare const supabaseStorage: (config: SupabaseStorageConfig, hooks?: StoragePluginHooks) => (_: BasePluginArgs) => StoragePlugin;
|
|
18
22
|
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ interface SupabaseStorageConfig {
|
|
|
13
13
|
supabaseUrl: string;
|
|
14
14
|
supabaseAnonKey: string;
|
|
15
15
|
bucketName: string;
|
|
16
|
+
/**
|
|
17
|
+
* Base path where bundles will be stored in the bucket
|
|
18
|
+
*/
|
|
19
|
+
basePath?: string;
|
|
16
20
|
}
|
|
17
21
|
declare const supabaseStorage: (config: SupabaseStorageConfig, hooks?: StoragePluginHooks) => (_: BasePluginArgs) => StoragePlugin;
|
|
18
22
|
//#endregion
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { calculatePagination, createDatabasePlugin } from "@hot-updater/plugin-core";
|
|
1
|
+
import { calculatePagination, createDatabasePlugin, createStorageKeyBuilder } from "@hot-updater/plugin-core";
|
|
2
2
|
import { createClient } from "@supabase/supabase-js";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import fs from "fs/promises";
|
|
@@ -1438,11 +1438,12 @@ var src_default = new Mime_default(standard_default, other_default)._freeze();
|
|
|
1438
1438
|
const supabaseStorage = (config, hooks) => (_) => {
|
|
1439
1439
|
const supabase = createClient(config.supabaseUrl, config.supabaseAnonKey);
|
|
1440
1440
|
const bucket = supabase.storage.from(config.bucketName);
|
|
1441
|
+
const getStorageKey = createStorageKeyBuilder(config.basePath);
|
|
1441
1442
|
return {
|
|
1442
1443
|
name: "supabaseStorage",
|
|
1443
1444
|
async deleteBundle(bundleId) {
|
|
1444
1445
|
const filename = "bundle.zip";
|
|
1445
|
-
const Key =
|
|
1446
|
+
const Key = getStorageKey(bundleId, filename);
|
|
1446
1447
|
const { error } = await bucket.remove([Key]);
|
|
1447
1448
|
if (error) {
|
|
1448
1449
|
if (error.message?.includes("not found")) throw new Error(`Bundle with id ${bundleId} not found`);
|
|
@@ -1454,7 +1455,7 @@ const supabaseStorage = (config, hooks) => (_) => {
|
|
|
1454
1455
|
const Body = await fs.readFile(bundlePath);
|
|
1455
1456
|
const ContentType = src_default.getType(bundlePath) ?? void 0;
|
|
1456
1457
|
const filename = path.basename(bundlePath);
|
|
1457
|
-
const Key =
|
|
1458
|
+
const Key = getStorageKey(bundleId, filename);
|
|
1458
1459
|
const upload = await bucket.upload(Key, Body, { contentType: ContentType });
|
|
1459
1460
|
if (upload.error) throw upload.error;
|
|
1460
1461
|
const fullPath = upload.data.fullPath;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/supabase",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.20.
|
|
4
|
+
"version": "0.20.1",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@supabase/supabase-js": "^2.47.10",
|
|
43
|
-
"@hot-updater/core": "0.20.
|
|
44
|
-
"@hot-updater/plugin-core": "0.20.
|
|
43
|
+
"@hot-updater/core": "0.20.1",
|
|
44
|
+
"@hot-updater/plugin-core": "0.20.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@clack/prompts": "0.10.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"execa": "^9.5.2",
|
|
51
51
|
"mime": "^4.0.4",
|
|
52
52
|
"picocolors": "^1.0.0",
|
|
53
|
-
"@hot-updater/postgres": "0.20.
|
|
53
|
+
"@hot-updater/postgres": "0.20.1"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "tsdown",
|