@secondlayer/cli 16.3.0 → 16.3.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/cli.js +24 -4
- package/dist/cli.js.map +3 -3
- package/dist/index.js +22 -2
- package/dist/index.js.map +3 -3
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -16250,7 +16250,25 @@ function parseContractId(contractId) {
|
|
|
16250
16250
|
// src/plugins/clarinet/index.ts
|
|
16251
16251
|
import { toCamelCase } from "@secondlayer/stacks/clarity";
|
|
16252
16252
|
import { normalizeAbi as normalizeAbi2 } from "@secondlayer/stacks/clarity";
|
|
16253
|
-
|
|
16253
|
+
function isModuleNotFoundError(error, moduleName) {
|
|
16254
|
+
if (!(error instanceof Error))
|
|
16255
|
+
return false;
|
|
16256
|
+
const code = error.code;
|
|
16257
|
+
if (code !== "MODULE_NOT_FOUND" && code !== "ERR_MODULE_NOT_FOUND") {
|
|
16258
|
+
return false;
|
|
16259
|
+
}
|
|
16260
|
+
return error.message.includes(moduleName);
|
|
16261
|
+
}
|
|
16262
|
+
async function importClarinetSdk() {
|
|
16263
|
+
try {
|
|
16264
|
+
return await import("@stacks/clarinet-sdk");
|
|
16265
|
+
} catch (error) {
|
|
16266
|
+
if (isModuleNotFoundError(error, "@stacks/clarinet-sdk")) {
|
|
16267
|
+
throw new Error(CLARINET_SDK_INSTALL_HINT);
|
|
16268
|
+
}
|
|
16269
|
+
throw error;
|
|
16270
|
+
}
|
|
16271
|
+
}
|
|
16254
16272
|
function sanitizeContractName(name) {
|
|
16255
16273
|
return toCamelCase(name);
|
|
16256
16274
|
}
|
|
@@ -16317,6 +16335,7 @@ function classifyContract(contractId, manifest) {
|
|
|
16317
16335
|
async function loadClarinetContracts(options = {}) {
|
|
16318
16336
|
const manifestPath = options.path || "./Clarinet.toml";
|
|
16319
16337
|
try {
|
|
16338
|
+
const { initSimnet } = await importClarinetSdk();
|
|
16320
16339
|
const simnet = await initSimnet(manifestPath);
|
|
16321
16340
|
const contractInterfaces = simnet.getContractsInterfaces();
|
|
16322
16341
|
const contracts = [];
|
|
@@ -16364,6 +16383,7 @@ async function hasClarinetProject(path = "./Clarinet.toml") {
|
|
|
16364
16383
|
return false;
|
|
16365
16384
|
}
|
|
16366
16385
|
}
|
|
16386
|
+
var CLARINET_SDK_INSTALL_HINT = "This command needs @stacks/clarinet-sdk. Install it in your project: bun add -d @stacks/clarinet-sdk";
|
|
16367
16387
|
var init_clarinet = () => {};
|
|
16368
16388
|
|
|
16369
16389
|
// src/utils/config.ts
|
|
@@ -204312,7 +204332,7 @@ var {
|
|
|
204312
204332
|
// package.json
|
|
204313
204333
|
var package_default = {
|
|
204314
204334
|
name: "@secondlayer/cli",
|
|
204315
|
-
version: "16.3.
|
|
204335
|
+
version: "16.3.1",
|
|
204316
204336
|
description: "Run a Stacks index on your own hardware — set it up, restore verified history, and keep it current.",
|
|
204317
204337
|
repository: {
|
|
204318
204338
|
type: "git",
|
|
@@ -204347,7 +204367,7 @@ var package_default = {
|
|
|
204347
204367
|
dependencies: {
|
|
204348
204368
|
"@biomejs/js-api": "^0.7.0",
|
|
204349
204369
|
"@biomejs/wasm-nodejs": "^1.9.0",
|
|
204350
|
-
"@dsnp/parquetjs": "
|
|
204370
|
+
"@dsnp/parquetjs": "~1.8.8",
|
|
204351
204371
|
"@inquirer/prompts": "^8.2.0",
|
|
204352
204372
|
"@opentui/core": "^0.5.3",
|
|
204353
204373
|
"@opentui/react": "^0.5.3",
|
|
@@ -209690,5 +209710,5 @@ registerCreditsCommand(program);
|
|
|
209690
209710
|
registerArchiveCommand(program);
|
|
209691
209711
|
program.parse();
|
|
209692
209712
|
|
|
209693
|
-
//# debugId=
|
|
209713
|
+
//# debugId=29D0F1BFB142444864756E2164756E21
|
|
209694
209714
|
//# sourceMappingURL=cli.js.map
|