@settlemint/sdk-cli 0.6.42 → 0.6.43-prfe5b377
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/cli.js +114 -86
- package/dist/cli.js.map +7 -7
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -221597,8 +221597,8 @@ var require_posix = __commonJS((exports) => {
|
|
|
221597
221597
|
}
|
|
221598
221598
|
};
|
|
221599
221599
|
exports.sync = sync3;
|
|
221600
|
-
var checkStat = (
|
|
221601
|
-
var checkMode = (
|
|
221600
|
+
var checkStat = (stat7, options) => stat7.isFile() && checkMode(stat7, options);
|
|
221601
|
+
var checkMode = (stat7, options) => {
|
|
221602
221602
|
const myUid = options.uid ?? process.getuid?.();
|
|
221603
221603
|
const myGroups = options.groups ?? process.getgroups?.() ?? [];
|
|
221604
221604
|
const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];
|
|
@@ -221606,9 +221606,9 @@ var require_posix = __commonJS((exports) => {
|
|
|
221606
221606
|
throw new Error("cannot get uid or gid");
|
|
221607
221607
|
}
|
|
221608
221608
|
const groups = new Set([myGid, ...myGroups]);
|
|
221609
|
-
const mod =
|
|
221610
|
-
const uid =
|
|
221611
|
-
const gid =
|
|
221609
|
+
const mod = stat7.mode;
|
|
221610
|
+
const uid = stat7.uid;
|
|
221611
|
+
const gid = stat7.gid;
|
|
221612
221612
|
const u6 = parseInt("100", 8);
|
|
221613
221613
|
const g6 = parseInt("010", 8);
|
|
221614
221614
|
const o7 = parseInt("001", 8);
|
|
@@ -221662,7 +221662,7 @@ var require_win32 = __commonJS((exports) => {
|
|
|
221662
221662
|
}
|
|
221663
221663
|
return false;
|
|
221664
221664
|
};
|
|
221665
|
-
var checkStat = (
|
|
221665
|
+
var checkStat = (stat7, path5, options) => stat7.isFile() && checkPathExt(path5, options);
|
|
221666
221666
|
});
|
|
221667
221667
|
|
|
221668
221668
|
// ../../node_modules/isexe/dist/cjs/options.js
|
|
@@ -225272,8 +225272,8 @@ var require_clone = __commonJS((exports, module) => {
|
|
|
225272
225272
|
|
|
225273
225273
|
// ../../node_modules/@npmcli/git/lib/is.js
|
|
225274
225274
|
var require_is = __commonJS((exports, module) => {
|
|
225275
|
-
var { stat:
|
|
225276
|
-
module.exports = ({ cwd = process.cwd() } = {}) =>
|
|
225275
|
+
var { stat: stat7 } = __require("fs/promises");
|
|
225276
|
+
module.exports = ({ cwd = process.cwd() } = {}) => stat7(cwd + "/.git").then(() => true, () => false);
|
|
225277
225277
|
});
|
|
225278
225278
|
|
|
225279
225279
|
// ../../node_modules/@npmcli/git/lib/find.js
|
|
@@ -230270,21 +230270,21 @@ var require_write_entry = __commonJS((exports, module) => {
|
|
|
230270
230270
|
return super.emit(ev, ...data);
|
|
230271
230271
|
}
|
|
230272
230272
|
[LSTAT]() {
|
|
230273
|
-
fs3.lstat(this.absolute, (er2,
|
|
230273
|
+
fs3.lstat(this.absolute, (er2, stat8) => {
|
|
230274
230274
|
if (er2) {
|
|
230275
230275
|
return this.emit("error", er2);
|
|
230276
230276
|
}
|
|
230277
|
-
this[ONLSTAT](
|
|
230277
|
+
this[ONLSTAT](stat8);
|
|
230278
230278
|
});
|
|
230279
230279
|
}
|
|
230280
|
-
[ONLSTAT](
|
|
230281
|
-
this.statCache.set(this.absolute,
|
|
230282
|
-
this.stat =
|
|
230283
|
-
if (!
|
|
230284
|
-
|
|
230280
|
+
[ONLSTAT](stat8) {
|
|
230281
|
+
this.statCache.set(this.absolute, stat8);
|
|
230282
|
+
this.stat = stat8;
|
|
230283
|
+
if (!stat8.isFile()) {
|
|
230284
|
+
stat8.size = 0;
|
|
230285
230285
|
}
|
|
230286
|
-
this.type = getType(
|
|
230287
|
-
this.emit("stat",
|
|
230286
|
+
this.type = getType(stat8);
|
|
230287
|
+
this.emit("stat", stat8);
|
|
230288
230288
|
this[PROCESS2]();
|
|
230289
230289
|
}
|
|
230290
230290
|
[PROCESS2]() {
|
|
@@ -230616,7 +230616,7 @@ var require_write_entry = __commonJS((exports, module) => {
|
|
|
230616
230616
|
});
|
|
230617
230617
|
WriteEntry.Sync = WriteEntrySync;
|
|
230618
230618
|
WriteEntry.Tar = WriteEntryTar;
|
|
230619
|
-
var getType = (
|
|
230619
|
+
var getType = (stat8) => stat8.isFile() ? "File" : stat8.isDirectory() ? "Directory" : stat8.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
|
|
230620
230620
|
module.exports = WriteEntry;
|
|
230621
230621
|
});
|
|
230622
230622
|
|
|
@@ -231148,21 +231148,21 @@ var require_pack = __commonJS((exports, module) => {
|
|
|
231148
231148
|
[STAT](job) {
|
|
231149
231149
|
job.pending = true;
|
|
231150
231150
|
this[JOBS] += 1;
|
|
231151
|
-
const
|
|
231152
|
-
fs3[
|
|
231151
|
+
const stat8 = this.follow ? "stat" : "lstat";
|
|
231152
|
+
fs3[stat8](job.absolute, (er2, stat9) => {
|
|
231153
231153
|
job.pending = false;
|
|
231154
231154
|
this[JOBS] -= 1;
|
|
231155
231155
|
if (er2) {
|
|
231156
231156
|
this.emit("error", er2);
|
|
231157
231157
|
} else {
|
|
231158
|
-
this[ONSTAT](job,
|
|
231158
|
+
this[ONSTAT](job, stat9);
|
|
231159
231159
|
}
|
|
231160
231160
|
});
|
|
231161
231161
|
}
|
|
231162
|
-
[ONSTAT](job,
|
|
231163
|
-
this.statCache.set(job.absolute,
|
|
231164
|
-
job.stat =
|
|
231165
|
-
if (!this.filter(job.path,
|
|
231162
|
+
[ONSTAT](job, stat8) {
|
|
231163
|
+
this.statCache.set(job.absolute, stat8);
|
|
231164
|
+
job.stat = stat8;
|
|
231165
|
+
if (!this.filter(job.path, stat8)) {
|
|
231166
231166
|
job.ignore = true;
|
|
231167
231167
|
}
|
|
231168
231168
|
this[PROCESS2]();
|
|
@@ -231330,10 +231330,10 @@ var require_pack = __commonJS((exports, module) => {
|
|
|
231330
231330
|
resume() {
|
|
231331
231331
|
}
|
|
231332
231332
|
[STAT](job) {
|
|
231333
|
-
const
|
|
231334
|
-
this[ONSTAT](job, fs3[
|
|
231333
|
+
const stat8 = this.follow ? "statSync" : "lstatSync";
|
|
231334
|
+
this[ONSTAT](job, fs3[stat8](job.absolute));
|
|
231335
231335
|
}
|
|
231336
|
-
[READDIR](job,
|
|
231336
|
+
[READDIR](job, stat8) {
|
|
231337
231337
|
this[ONREADDIR](job, fs3.readdirSync(job.absolute));
|
|
231338
231338
|
}
|
|
231339
231339
|
[PIPE](job) {
|
|
@@ -232717,15 +232717,15 @@ var require_list = __commonJS((exports, module) => {
|
|
|
232717
232717
|
let threw = true;
|
|
232718
232718
|
let fd;
|
|
232719
232719
|
try {
|
|
232720
|
-
const
|
|
232720
|
+
const stat8 = fs3.statSync(file);
|
|
232721
232721
|
const readSize = opt2.maxReadSize || 16 * 1024 * 1024;
|
|
232722
|
-
if (
|
|
232722
|
+
if (stat8.size < readSize) {
|
|
232723
232723
|
p5.end(fs3.readFileSync(file));
|
|
232724
232724
|
} else {
|
|
232725
232725
|
let pos = 0;
|
|
232726
232726
|
const buf = Buffer.allocUnsafe(readSize);
|
|
232727
232727
|
fd = fs3.openSync(file, "r");
|
|
232728
|
-
while (pos <
|
|
232728
|
+
while (pos < stat8.size) {
|
|
232729
232729
|
const bytesRead = fs3.readSync(fd, buf, 0, readSize, pos);
|
|
232730
232730
|
pos += bytesRead;
|
|
232731
232731
|
p5.write(buf.slice(0, bytesRead));
|
|
@@ -232749,13 +232749,13 @@ var require_list = __commonJS((exports, module) => {
|
|
|
232749
232749
|
const p5 = new Promise((resolve5, reject) => {
|
|
232750
232750
|
parse5.on("error", reject);
|
|
232751
232751
|
parse5.on("end", resolve5);
|
|
232752
|
-
fs3.stat(file, (er2,
|
|
232752
|
+
fs3.stat(file, (er2, stat8) => {
|
|
232753
232753
|
if (er2) {
|
|
232754
232754
|
reject(er2);
|
|
232755
232755
|
} else {
|
|
232756
232756
|
const stream2 = new fsm.ReadStream(file, {
|
|
232757
232757
|
readSize,
|
|
232758
|
-
size:
|
|
232758
|
+
size: stat8.size
|
|
232759
232759
|
});
|
|
232760
232760
|
stream2.on("error", reject);
|
|
232761
232761
|
stream2.pipe(parse5);
|
|
@@ -233082,7 +233082,7 @@ var require_update = __commonJS((exports, module) => {
|
|
|
233082
233082
|
if (!opt2.mtimeCache) {
|
|
233083
233083
|
opt2.mtimeCache = new Map;
|
|
233084
233084
|
}
|
|
233085
|
-
opt2.filter = filter4 ? (path5,
|
|
233085
|
+
opt2.filter = filter4 ? (path5, stat8) => filter4(path5, stat8) && !(opt2.mtimeCache.get(path5) > stat8.mtime) : (path5, stat8) => !(opt2.mtimeCache.get(path5) > stat8.mtime);
|
|
233086
233086
|
};
|
|
233087
233087
|
});
|
|
233088
233088
|
|
|
@@ -234470,11 +234470,11 @@ var require_extract = __commonJS((exports, module) => {
|
|
|
234470
234470
|
var extractFileSync = (opt2) => {
|
|
234471
234471
|
const u6 = new Unpack.Sync(opt2);
|
|
234472
234472
|
const file = opt2.file;
|
|
234473
|
-
const
|
|
234473
|
+
const stat8 = fs3.statSync(file);
|
|
234474
234474
|
const readSize = opt2.maxReadSize || 16 * 1024 * 1024;
|
|
234475
234475
|
const stream2 = new fsm.ReadStreamSync(file, {
|
|
234476
234476
|
readSize,
|
|
234477
|
-
size:
|
|
234477
|
+
size: stat8.size
|
|
234478
234478
|
});
|
|
234479
234479
|
stream2.pipe(u6);
|
|
234480
234480
|
};
|
|
@@ -234485,13 +234485,13 @@ var require_extract = __commonJS((exports, module) => {
|
|
|
234485
234485
|
const p5 = new Promise((resolve5, reject) => {
|
|
234486
234486
|
u6.on("error", reject);
|
|
234487
234487
|
u6.on("close", resolve5);
|
|
234488
|
-
fs3.stat(file, (er2,
|
|
234488
|
+
fs3.stat(file, (er2, stat8) => {
|
|
234489
234489
|
if (er2) {
|
|
234490
234490
|
reject(er2);
|
|
234491
234491
|
} else {
|
|
234492
234492
|
const stream2 = new fsm.ReadStream(file, {
|
|
234493
234493
|
readSize,
|
|
234494
|
-
size:
|
|
234494
|
+
size: stat8.size
|
|
234495
234495
|
});
|
|
234496
234496
|
stream2.on("error", reject);
|
|
234497
234497
|
stream2.pipe(u6);
|
|
@@ -234543,15 +234543,15 @@ var require_windows = __commonJS((exports, module) => {
|
|
|
234543
234543
|
}
|
|
234544
234544
|
return false;
|
|
234545
234545
|
}
|
|
234546
|
-
function checkStat(
|
|
234547
|
-
if (!
|
|
234546
|
+
function checkStat(stat8, path6, options) {
|
|
234547
|
+
if (!stat8.isSymbolicLink() && !stat8.isFile()) {
|
|
234548
234548
|
return false;
|
|
234549
234549
|
}
|
|
234550
234550
|
return checkPathExt(path6, options);
|
|
234551
234551
|
}
|
|
234552
234552
|
function isexe(path6, options, cb) {
|
|
234553
|
-
fs3.stat(path6, function(er2,
|
|
234554
|
-
cb(er2, er2 ? false : checkStat(
|
|
234553
|
+
fs3.stat(path6, function(er2, stat8) {
|
|
234554
|
+
cb(er2, er2 ? false : checkStat(stat8, path6, options));
|
|
234555
234555
|
});
|
|
234556
234556
|
}
|
|
234557
234557
|
function sync3(path6, options) {
|
|
@@ -234565,20 +234565,20 @@ var require_mode = __commonJS((exports, module) => {
|
|
|
234565
234565
|
isexe.sync = sync3;
|
|
234566
234566
|
var fs3 = __require("fs");
|
|
234567
234567
|
function isexe(path6, options, cb) {
|
|
234568
|
-
fs3.stat(path6, function(er2,
|
|
234569
|
-
cb(er2, er2 ? false : checkStat(
|
|
234568
|
+
fs3.stat(path6, function(er2, stat8) {
|
|
234569
|
+
cb(er2, er2 ? false : checkStat(stat8, options));
|
|
234570
234570
|
});
|
|
234571
234571
|
}
|
|
234572
234572
|
function sync3(path6, options) {
|
|
234573
234573
|
return checkStat(fs3.statSync(path6), options);
|
|
234574
234574
|
}
|
|
234575
|
-
function checkStat(
|
|
234576
|
-
return
|
|
234575
|
+
function checkStat(stat8, options) {
|
|
234576
|
+
return stat8.isFile() && checkMode(stat8, options);
|
|
234577
234577
|
}
|
|
234578
|
-
function checkMode(
|
|
234579
|
-
var mod =
|
|
234580
|
-
var uid =
|
|
234581
|
-
var gid =
|
|
234578
|
+
function checkMode(stat8, options) {
|
|
234579
|
+
var mod = stat8.mode;
|
|
234580
|
+
var uid = stat8.uid;
|
|
234581
|
+
var gid = stat8.gid;
|
|
234582
234582
|
var myUid = options.uid !== undefined ? options.uid : process.getuid && process.getuid();
|
|
234583
234583
|
var myGid = options.gid !== undefined ? options.gid : process.getgid && process.getgid();
|
|
234584
234584
|
var u6 = parseInt("100", 8);
|
|
@@ -239919,10 +239919,10 @@ Content-Type: ${R6.type || "application/octet-stream"}\r
|
|
|
239919
239919
|
}
|
|
239920
239920
|
var nodeDomexception = globalThis.DOMException;
|
|
239921
239921
|
var DOMException2 = _commonjsHelpers.getDefaultExportFromCjs(nodeDomexception);
|
|
239922
|
-
var { stat:
|
|
239922
|
+
var { stat: stat8 } = node_fs.promises;
|
|
239923
239923
|
var blobFromSync = u6((c3, l4) => fromBlob(node_fs.statSync(c3), c3, l4), "blobFromSync");
|
|
239924
|
-
var blobFrom = u6((c3, l4) =>
|
|
239925
|
-
var fileFrom = u6((c3, l4) =>
|
|
239924
|
+
var blobFrom = u6((c3, l4) => stat8(c3).then((d6) => fromBlob(d6, c3, l4)), "blobFrom");
|
|
239925
|
+
var fileFrom = u6((c3, l4) => stat8(c3).then((d6) => fromFile(d6, c3, l4)), "fileFrom");
|
|
239926
239926
|
var fileFromSync = u6((c3, l4) => fromFile(node_fs.statSync(c3), c3, l4), "fileFromSync");
|
|
239927
239927
|
var fromBlob = u6((c3, l4, d6 = "") => new r$1([new BlobDataItem({ path: l4, size: c3.size, lastModified: c3.mtimeMs, start: 0 })], { type: d6 }), "fromBlob");
|
|
239928
239928
|
var fromFile = u6((c3, l4, d6 = "") => new File$1([new BlobDataItem({ path: l4, size: c3.size, lastModified: c3.mtimeMs, start: 0 })], node_path.basename(l4), { type: d6, lastModified: c3.mtimeMs }), "fromFile");
|
|
@@ -239936,7 +239936,7 @@ Content-Type: ${R6.type || "application/octet-stream"}\r
|
|
|
239936
239936
|
return new Xt3({ path: D4(this, Me3), lastModified: this.lastModified, size: d6 - l4, start: D4(this, xe3) + l4 });
|
|
239937
239937
|
}
|
|
239938
239938
|
async* stream() {
|
|
239939
|
-
const { mtimeMs: l4 } = await
|
|
239939
|
+
const { mtimeMs: l4 } = await stat8(D4(this, Me3));
|
|
239940
239940
|
if (l4 > this.lastModified)
|
|
239941
239941
|
throw new DOMException2("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.", "NotReadableError");
|
|
239942
239942
|
yield* node_fs.createReadStream(D4(this, Me3), { start: D4(this, xe3), end: D4(this, xe3) + this.size - 1 });
|
|
@@ -261807,9 +261807,9 @@ var z4 = /* @__PURE__ */ Object.freeze({
|
|
|
261807
261807
|
|
|
261808
261808
|
// ../utils/dist/environment.mjs
|
|
261809
261809
|
var import_dotenvx = __toESM(require_main2(), 1);
|
|
261810
|
-
import { existsSync } from "node:fs";
|
|
261811
261810
|
import { readFile as readFile3, writeFile as writeFile4 } from "node:fs/promises";
|
|
261812
261811
|
import { dirname as dirname32, join as join3 } from "node:path";
|
|
261812
|
+
import { stat as stat6 } from "node:fs/promises";
|
|
261813
261813
|
import { dirname as dirname22 } from "node:path";
|
|
261814
261814
|
var import_dotenvx2 = __toESM(require_main2(), 1);
|
|
261815
261815
|
|
|
@@ -268040,6 +268040,10 @@ var DotEnvSchema = z4.object({
|
|
|
268040
268040
|
SETTLEMINT_HASURA: IdSchema.optional(),
|
|
268041
268041
|
SETTLEMINT_HASURA_ENDPOINT: UrlSchema.optional(),
|
|
268042
268042
|
SETTLEMINT_HASURA_ADMIN_SECRET: z4.string().optional(),
|
|
268043
|
+
SETTLEMINT_HASURA_DATABASE_URL: z4.string().optional(),
|
|
268044
|
+
SETTLEMINT_HASURA_DATABASE_USERNAME: z4.string().optional(),
|
|
268045
|
+
SETTLEMINT_HASURA_DATABASE_PASSWORD: z4.string().optional(),
|
|
268046
|
+
SETTLEMINT_HASURA_DATABASE_DB_NAME: z4.string().optional(),
|
|
268043
268047
|
SETTLEMINT_THEGRAPH: IdSchema.optional(),
|
|
268044
268048
|
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT: UrlSchema.optional(),
|
|
268045
268049
|
SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z4.string().optional(),
|
|
@@ -268099,6 +268103,14 @@ async function loadEnvironmentEnv(validateEnv, prod) {
|
|
|
268099
268103
|
return {};
|
|
268100
268104
|
}
|
|
268101
268105
|
}
|
|
268106
|
+
async function exists2(path4) {
|
|
268107
|
+
try {
|
|
268108
|
+
await stat6(path4);
|
|
268109
|
+
return true;
|
|
268110
|
+
} catch {
|
|
268111
|
+
return false;
|
|
268112
|
+
}
|
|
268113
|
+
}
|
|
268102
268114
|
async function projectRoot2() {
|
|
268103
268115
|
const packageJsonPath = await findUp("package.json");
|
|
268104
268116
|
if (!packageJsonPath) {
|
|
@@ -268110,7 +268122,7 @@ async function findMonoRepoRoot(startDir) {
|
|
|
268110
268122
|
let currentDir = startDir;
|
|
268111
268123
|
while (currentDir !== "/") {
|
|
268112
268124
|
const packageJsonPath = join3(currentDir, "package.json");
|
|
268113
|
-
if (
|
|
268125
|
+
if (await exists2(packageJsonPath)) {
|
|
268114
268126
|
try {
|
|
268115
268127
|
const packageJson = JSON.parse(await readFile3(packageJsonPath, "utf-8"));
|
|
268116
268128
|
if (packageJson.workspaces && Array.isArray(packageJson.workspaces) && packageJson.workspaces.length > 0) {
|
|
@@ -268154,11 +268166,11 @@ async function writeEnv(prod, env2, secrets) {
|
|
|
268154
268166
|
const targetDirs = await findMonoRepoPackages(projectDir);
|
|
268155
268167
|
await Promise.all(targetDirs.map(async (dir) => {
|
|
268156
268168
|
const envFile = join3(dir, secrets ? `.env${prod ? ".production" : ""}.local` : `.env${prod ? ".production" : ""}`);
|
|
268157
|
-
let { parsed: currentEnv } = import_dotenvx2.config({
|
|
268169
|
+
let { parsed: currentEnv } = await exists2(envFile) ? import_dotenvx2.config({
|
|
268158
268170
|
path: envFile,
|
|
268159
268171
|
logLevel: "error",
|
|
268160
268172
|
quiet: true
|
|
268161
|
-
});
|
|
268173
|
+
}) : { parsed: {} };
|
|
268162
268174
|
if (!currentEnv) {
|
|
268163
268175
|
currentEnv = {};
|
|
268164
268176
|
}
|
|
@@ -268529,13 +268541,17 @@ async function writeEnvSpinner(prod, env2) {
|
|
|
268529
268541
|
SETTLEMINT_BLOCKSCOUT: env2.SETTLEMINT_BLOCKSCOUT,
|
|
268530
268542
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT,
|
|
268531
268543
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT,
|
|
268544
|
+
SETTLEMINT_HASURA_DATABASE_URL: env2.SETTLEMINT_HASURA_DATABASE_URL,
|
|
268545
|
+
SETTLEMINT_HASURA_DATABASE_USERNAME: env2.SETTLEMINT_HASURA_DATABASE_USERNAME,
|
|
268546
|
+
SETTLEMINT_HASURA_DATABASE_DB_NAME: env2.SETTLEMINT_HASURA_DATABASE_DB_NAME,
|
|
268532
268547
|
SETTLEMINT_SMART_CONTRACT_ADDRESS: env2.SETTLEMINT_SMART_CONTRACT_ADDRESS,
|
|
268533
268548
|
SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: env2.SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID
|
|
268534
268549
|
}, false);
|
|
268535
268550
|
await writeEnv(prod, {
|
|
268536
268551
|
SETTLEMINT_ACCESS_TOKEN: env2.SETTLEMINT_ACCESS_TOKEN,
|
|
268537
268552
|
SETTLEMINT_HASURA_ADMIN_SECRET: env2.SETTLEMINT_HASURA_ADMIN_SECRET,
|
|
268538
|
-
SETTLEMINT_MINIO_SECRET_KEY: env2.SETTLEMINT_MINIO_SECRET_KEY
|
|
268553
|
+
SETTLEMINT_MINIO_SECRET_KEY: env2.SETTLEMINT_MINIO_SECRET_KEY,
|
|
268554
|
+
SETTLEMINT_HASURA_DATABASE_PASSWORD: env2.SETTLEMINT_HASURA_DATABASE_PASSWORD
|
|
268539
268555
|
}, true);
|
|
268540
268556
|
}
|
|
268541
268557
|
});
|
|
@@ -268660,7 +268676,11 @@ function getHasuraEndpoints(service) {
|
|
|
268660
268676
|
}
|
|
268661
268677
|
return {
|
|
268662
268678
|
SETTLEMINT_HASURA_ENDPOINT: service.endpoints.find((endpoint) => endpoint.id.includes("graphql"))?.displayValue,
|
|
268663
|
-
SETTLEMINT_HASURA_ADMIN_SECRET: service.credentials.find((credential) => credential.id.includes("admin-secret"))?.displayValue
|
|
268679
|
+
SETTLEMINT_HASURA_ADMIN_SECRET: service.credentials.find((credential) => credential.id.includes("admin-secret"))?.displayValue,
|
|
268680
|
+
SETTLEMINT_HASURA_DATABASE_URL: service.endpoints.find((endpoint) => endpoint.id.includes("postgresql"))?.displayValue,
|
|
268681
|
+
SETTLEMINT_HASURA_DATABASE_USERNAME: service.credentials.find((credential) => credential.id.includes("pg-user"))?.displayValue,
|
|
268682
|
+
SETTLEMINT_HASURA_DATABASE_PASSWORD: service.credentials.find((credential) => credential.id.includes("pg-password"))?.displayValue,
|
|
268683
|
+
SETTLEMINT_HASURA_DATABASE_DB_NAME: service.credentials.find((credential) => credential.id.includes("pg-database"))?.displayValue
|
|
268664
268684
|
};
|
|
268665
268685
|
}
|
|
268666
268686
|
function getBlockscoutEndpoints(service) {
|
|
@@ -268724,6 +268744,10 @@ var DotEnvSchema2 = z4.object({
|
|
|
268724
268744
|
SETTLEMINT_HASURA: IdSchema2.optional(),
|
|
268725
268745
|
SETTLEMINT_HASURA_ENDPOINT: UrlSchema2.optional(),
|
|
268726
268746
|
SETTLEMINT_HASURA_ADMIN_SECRET: z4.string().optional(),
|
|
268747
|
+
SETTLEMINT_HASURA_DATABASE_URL: z4.string().optional(),
|
|
268748
|
+
SETTLEMINT_HASURA_DATABASE_USERNAME: z4.string().optional(),
|
|
268749
|
+
SETTLEMINT_HASURA_DATABASE_PASSWORD: z4.string().optional(),
|
|
268750
|
+
SETTLEMINT_HASURA_DATABASE_DB_NAME: z4.string().optional(),
|
|
268727
268751
|
SETTLEMINT_THEGRAPH: IdSchema2.optional(),
|
|
268728
268752
|
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT: UrlSchema2.optional(),
|
|
268729
268753
|
SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z4.string().optional(),
|
|
@@ -272334,7 +272358,7 @@ function connectCommand() {
|
|
|
272334
272358
|
var package_default = {
|
|
272335
272359
|
name: "@settlemint/sdk-cli",
|
|
272336
272360
|
description: "SettleMint SDK, integrate SettleMint into your application with ease.",
|
|
272337
|
-
version: "0.6.
|
|
272361
|
+
version: "0.6.43-prfe5b377",
|
|
272338
272362
|
type: "module",
|
|
272339
272363
|
private: false,
|
|
272340
272364
|
license: "FSL-1.1-MIT",
|
|
@@ -272385,8 +272409,8 @@ var package_default = {
|
|
|
272385
272409
|
"@inquirer/input": "4.1.0",
|
|
272386
272410
|
"@inquirer/password": "4.0.3",
|
|
272387
272411
|
"@inquirer/select": "4.0.3",
|
|
272388
|
-
"@settlemint/sdk-js": "0.6.
|
|
272389
|
-
"@settlemint/sdk-utils": "0.6.
|
|
272412
|
+
"@settlemint/sdk-js": "0.6.43-prfe5b377",
|
|
272413
|
+
"@settlemint/sdk-utils": "0.6.43-prfe5b377",
|
|
272390
272414
|
"get-tsconfig": "4.8.1",
|
|
272391
272415
|
giget: "1.2.3"
|
|
272392
272416
|
},
|
|
@@ -272449,7 +272473,7 @@ async function templatePrompt(templates, argument) {
|
|
|
272449
272473
|
// ../utils/dist/package-manager.mjs
|
|
272450
272474
|
import { readdir as readdir3, rm as rm2 } from "node:fs/promises";
|
|
272451
272475
|
import { resolve as resolve4 } from "node:path";
|
|
272452
|
-
import { stat as
|
|
272476
|
+
import { stat as stat7 } from "node:fs/promises";
|
|
272453
272477
|
import { dirname as dirname23 } from "node:path";
|
|
272454
272478
|
|
|
272455
272479
|
// ../../node_modules/package-manager-detector/dist/detect.mjs
|
|
@@ -272547,9 +272571,9 @@ async function fileExists(filePath) {
|
|
|
272547
272571
|
// ../utils/dist/package-manager.mjs
|
|
272548
272572
|
var import_package_json = __toESM(require_lib13(), 1);
|
|
272549
272573
|
var import_package_json2 = __toESM(require_lib13(), 1);
|
|
272550
|
-
async function
|
|
272574
|
+
async function exists3(path5) {
|
|
272551
272575
|
try {
|
|
272552
|
-
await
|
|
272576
|
+
await stat7(path5);
|
|
272553
272577
|
return true;
|
|
272554
272578
|
} catch {
|
|
272555
272579
|
return false;
|
|
@@ -272573,7 +272597,7 @@ async function isEmpty(path5) {
|
|
|
272573
272597
|
return files.length === 0 || files.length === 1 && files[0] === ".git";
|
|
272574
272598
|
}
|
|
272575
272599
|
async function emptyDir(dir) {
|
|
272576
|
-
if (!await
|
|
272600
|
+
if (!await exists3(dir))
|
|
272577
272601
|
return;
|
|
272578
272602
|
for (const file of await readdir3(dir)) {
|
|
272579
272603
|
if (file === ".git")
|
|
@@ -272595,7 +272619,7 @@ import { mkdir as mkdir5 } from "node:fs/promises";
|
|
|
272595
272619
|
// ../../node_modules/giget/dist/index.mjs
|
|
272596
272620
|
var import_tar = __toESM(require_tar(), 1);
|
|
272597
272621
|
import { readFile as readFile6, writeFile as writeFile7, mkdir as mkdir4, rm as rm3 } from "node:fs/promises";
|
|
272598
|
-
import { existsSync as
|
|
272622
|
+
import { existsSync as existsSync2, createWriteStream as createWriteStream2, readdirSync as readdirSync2 } from "node:fs";
|
|
272599
272623
|
|
|
272600
272624
|
// ../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
272601
272625
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
@@ -272816,7 +272840,7 @@ var defuArrayFn = createDefu((object, key2, currentValue) => {
|
|
|
272816
272840
|
});
|
|
272817
272841
|
|
|
272818
272842
|
// ../../node_modules/nypm/dist/index.mjs
|
|
272819
|
-
import { existsSync
|
|
272843
|
+
import { existsSync } from "node:fs";
|
|
272820
272844
|
import { readFile as readFile5 } from "node:fs/promises";
|
|
272821
272845
|
async function findup(cwd2, match2, options = {}) {
|
|
272822
272846
|
const segments = normalize3(cwd2).split("/");
|
|
@@ -272910,7 +272934,7 @@ async function detectPackageManager(cwd2, options = {}) {
|
|
|
272910
272934
|
const detected = await findup(resolve5(cwd2 || "."), async (path8) => {
|
|
272911
272935
|
if (!options.ignorePackageJSON) {
|
|
272912
272936
|
const packageJSONPath = join5(path8, "package.json");
|
|
272913
|
-
if (
|
|
272937
|
+
if (existsSync(packageJSONPath)) {
|
|
272914
272938
|
const packageJSON = JSON.parse(await readFile5(packageJSONPath, "utf8"));
|
|
272915
272939
|
if (packageJSON?.packageManager) {
|
|
272916
272940
|
const [name2, version = "0.0.0"] = packageJSON.packageManager.split("@");
|
|
@@ -272932,7 +272956,7 @@ async function detectPackageManager(cwd2, options = {}) {
|
|
|
272932
272956
|
packageManager.lockFile,
|
|
272933
272957
|
packageManager.files
|
|
272934
272958
|
].flat().filter(Boolean);
|
|
272935
|
-
if (detectionsFiles.some((file) =>
|
|
272959
|
+
if (detectionsFiles.some((file) => existsSync(resolve5(path8, file)))) {
|
|
272936
272960
|
return {
|
|
272937
272961
|
...packageManager
|
|
272938
272962
|
};
|
|
@@ -272985,7 +273009,7 @@ async function download(url, filePath, options = {}) {
|
|
|
272985
273009
|
return;
|
|
272986
273010
|
});
|
|
272987
273011
|
const etag = headResponse?.headers.get("etag");
|
|
272988
|
-
if (info.etag === etag &&
|
|
273012
|
+
if (info.etag === etag && existsSync2(filePath)) {
|
|
272989
273013
|
return;
|
|
272990
273014
|
}
|
|
272991
273015
|
if (typeof etag === "string") {
|
|
@@ -273208,7 +273232,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
273208
273232
|
template.defaultDir = (template.defaultDir || template.name).replace(/[^\da-z-]/gi, "-");
|
|
273209
273233
|
const temporaryDirectory = resolve5(cacheDirectory(), providerName, template.name);
|
|
273210
273234
|
const tarPath = resolve5(temporaryDirectory, (template.version || template.name) + ".tar.gz");
|
|
273211
|
-
if (options.preferOffline &&
|
|
273235
|
+
if (options.preferOffline && existsSync2(tarPath)) {
|
|
273212
273236
|
options.offline = true;
|
|
273213
273237
|
}
|
|
273214
273238
|
if (!options.offline) {
|
|
@@ -273220,7 +273244,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
273220
273244
|
...normalizeHeaders(template.headers)
|
|
273221
273245
|
}
|
|
273222
273246
|
}).catch((error5) => {
|
|
273223
|
-
if (!
|
|
273247
|
+
if (!existsSync2(tarPath)) {
|
|
273224
273248
|
throw error5;
|
|
273225
273249
|
}
|
|
273226
273250
|
debug2("Download error. Using cached version:", error5);
|
|
@@ -273228,7 +273252,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
273228
273252
|
});
|
|
273229
273253
|
debug2(`Downloaded ${template.tar} to ${tarPath} in ${Date.now() - s22}ms`);
|
|
273230
273254
|
}
|
|
273231
|
-
if (!
|
|
273255
|
+
if (!existsSync2(tarPath)) {
|
|
273232
273256
|
throw new Error(`Tarball not found: ${tarPath} (offline: ${options.offline})`);
|
|
273233
273257
|
}
|
|
273234
273258
|
const cwd2 = resolve5(options.cwd || ".");
|
|
@@ -273236,7 +273260,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
273236
273260
|
if (options.forceClean) {
|
|
273237
273261
|
await rm3(extractPath, { recursive: true, force: true });
|
|
273238
273262
|
}
|
|
273239
|
-
if (!options.force &&
|
|
273263
|
+
if (!options.force && existsSync2(extractPath) && readdirSync2(extractPath).length > 0) {
|
|
273240
273264
|
throw new Error(`Destination ${extractPath} already exists.`);
|
|
273241
273265
|
}
|
|
273242
273266
|
await mkdir4(extractPath, { recursive: true });
|
|
@@ -273487,7 +273511,7 @@ var SETTLEMINT_CLIENT_MAP = {
|
|
|
273487
273511
|
// ../utils/dist/index.mjs
|
|
273488
273512
|
import { spawn as spawn2 } from "node:child_process";
|
|
273489
273513
|
var import_dotenvx3 = __toESM(require_main2(), 1);
|
|
273490
|
-
import { stat as
|
|
273514
|
+
import { stat as stat8 } from "node:fs/promises";
|
|
273491
273515
|
var import_dotenvx4 = __toESM(require_main2(), 1);
|
|
273492
273516
|
var import_package_json3 = __toESM(require_lib13(), 1);
|
|
273493
273517
|
var import_package_json4 = __toESM(require_lib13(), 1);
|
|
@@ -273549,6 +273573,10 @@ var DotEnvSchema3 = z4.object({
|
|
|
273549
273573
|
SETTLEMINT_HASURA: IdSchema3.optional(),
|
|
273550
273574
|
SETTLEMINT_HASURA_ENDPOINT: UrlSchema3.optional(),
|
|
273551
273575
|
SETTLEMINT_HASURA_ADMIN_SECRET: z4.string().optional(),
|
|
273576
|
+
SETTLEMINT_HASURA_DATABASE_URL: z4.string().optional(),
|
|
273577
|
+
SETTLEMINT_HASURA_DATABASE_USERNAME: z4.string().optional(),
|
|
273578
|
+
SETTLEMINT_HASURA_DATABASE_PASSWORD: z4.string().optional(),
|
|
273579
|
+
SETTLEMINT_HASURA_DATABASE_DB_NAME: z4.string().optional(),
|
|
273552
273580
|
SETTLEMINT_THEGRAPH: IdSchema3.optional(),
|
|
273553
273581
|
SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT: UrlSchema3.optional(),
|
|
273554
273582
|
SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z4.string().optional(),
|
|
@@ -273608,9 +273636,9 @@ async function loadEnvironmentEnv2(validateEnv, prod) {
|
|
|
273608
273636
|
return {};
|
|
273609
273637
|
}
|
|
273610
273638
|
}
|
|
273611
|
-
async function
|
|
273639
|
+
async function exists4(path8) {
|
|
273612
273640
|
try {
|
|
273613
|
-
await
|
|
273641
|
+
await stat8(path8);
|
|
273614
273642
|
return true;
|
|
273615
273643
|
} catch {
|
|
273616
273644
|
return false;
|
|
@@ -275065,7 +275093,7 @@ function createCommand4() {
|
|
|
275065
275093
|
const name2 = await namePrompt(env2, projectName);
|
|
275066
275094
|
const targetDir = formatTargetDir(name2);
|
|
275067
275095
|
const projectDir = join7(process.cwd(), targetDir);
|
|
275068
|
-
if (await
|
|
275096
|
+
if (await exists4(projectDir) && !await isEmpty(projectDir)) {
|
|
275069
275097
|
const confirmEmpty = await esm_default2({
|
|
275070
275098
|
message: `The folder ${projectDir} already exists. Do you want to delete it?`,
|
|
275071
275099
|
default: false
|
|
@@ -275387,7 +275415,7 @@ function hardhatTestCommand() {
|
|
|
275387
275415
|
}
|
|
275388
275416
|
|
|
275389
275417
|
// src/commands/smart-contract-set/subgraph/utils/is-generated.ts
|
|
275390
|
-
var isGenerated = () =>
|
|
275418
|
+
var isGenerated = () => exists4("subgraph/subgraph.config.json");
|
|
275391
275419
|
|
|
275392
275420
|
// src/commands/smart-contract-set/subgraph/utils/setup.ts
|
|
275393
275421
|
import { rm as rm4, writeFile as writeFile9 } from "node:fs/promises";
|
|
@@ -275483,16 +275511,16 @@ async function subgraphSetup({ env: env2, instance, accessToken, isGenerated: is
|
|
|
275483
275511
|
cancel2("No Graph Middleware selected. Please select one to continue.");
|
|
275484
275512
|
}
|
|
275485
275513
|
await executeCommand2("forge", ["build"]);
|
|
275486
|
-
if (await
|
|
275514
|
+
if (await exists4("./generated")) {
|
|
275487
275515
|
await rm4("./generated", { recursive: true, force: true });
|
|
275488
275516
|
}
|
|
275489
|
-
if (await
|
|
275517
|
+
if (await exists4("./subgraph/generated")) {
|
|
275490
275518
|
await rm4("./subgraph/generated", { recursive: true, force: true });
|
|
275491
275519
|
}
|
|
275492
|
-
if (await
|
|
275520
|
+
if (await exists4("./build")) {
|
|
275493
275521
|
await rm4("./build", { recursive: true, force: true });
|
|
275494
275522
|
}
|
|
275495
|
-
if (await
|
|
275523
|
+
if (await exists4("./subgraph/build")) {
|
|
275496
275524
|
await rm4("./subgraph/build", { recursive: true, force: true });
|
|
275497
275525
|
}
|
|
275498
275526
|
const isFixedNetwork = (theGraphMiddleware.entityVersion ?? 4) >= 4;
|
|
@@ -275731,4 +275759,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
|
|
|
275731
275759
|
cancel2(reason);
|
|
275732
275760
|
});
|
|
275733
275761
|
|
|
275734
|
-
//# debugId=
|
|
275762
|
+
//# debugId=93D194D056FCFAA664756E2164756E21
|