everything-dev 1.30.0 → 1.31.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/init.cjs +1 -0
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.d.cts +1 -1
- package/dist/cli/init.d.cts.map +1 -1
- package/dist/cli/init.d.mts +1 -1
- package/dist/cli/init.d.mts.map +1 -1
- package/dist/cli/init.mjs +1 -0
- package/dist/cli/init.mjs.map +1 -1
- package/dist/cli/sync.cjs +3 -1
- package/dist/cli/sync.cjs.map +1 -1
- package/dist/cli/sync.mjs +3 -1
- package/dist/cli/sync.mjs.map +1 -1
- package/dist/cli/upgrade.cjs +1 -1
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs +1 -1
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/cli.cjs +32 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +32 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/contract.cjs +32 -1
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +80 -1
- package/dist/contract.d.cts.map +1 -1
- package/dist/contract.d.mts +80 -1
- package/dist/contract.d.mts.map +1 -1
- package/dist/contract.meta.cjs +18 -1
- package/dist/contract.meta.cjs.map +1 -1
- package/dist/contract.meta.d.cts +33 -0
- package/dist/contract.meta.d.mts +33 -0
- package/dist/contract.meta.mjs +18 -1
- package/dist/contract.meta.mjs.map +1 -1
- package/dist/contract.mjs +31 -2
- package/dist/contract.mjs.map +1 -1
- package/dist/index.cjs +4 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/merge.cjs +1 -0
- package/dist/merge.cjs.map +1 -1
- package/dist/merge.d.cts +1 -1
- package/dist/merge.d.cts.map +1 -1
- package/dist/merge.d.mts +1 -1
- package/dist/merge.d.mts.map +1 -1
- package/dist/merge.mjs +1 -0
- package/dist/merge.mjs.map +1 -1
- package/dist/mf.cjs +1 -0
- package/dist/mf.cjs.map +1 -1
- package/dist/mf.d.cts.map +1 -1
- package/dist/mf.d.mts.map +1 -1
- package/dist/mf.mjs +1 -0
- package/dist/mf.mjs.map +1 -1
- package/dist/near-cli.cjs +20 -4
- package/dist/near-cli.cjs.map +1 -1
- package/dist/near-cli.mjs +20 -4
- package/dist/near-cli.mjs.map +1 -1
- package/dist/plugin.cjs +243 -76
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +43 -0
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +43 -0
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +243 -76
- package/dist/plugin.mjs.map +1 -1
- package/dist/types.cjs +7 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +17 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +17 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +6 -2
- package/dist/types.mjs.map +1 -1
- package/dist/ui/types.d.cts +2 -0
- package/dist/ui/types.d.cts.map +1 -1
- package/dist/ui/types.d.mts +2 -0
- package/dist/ui/types.d.mts.map +1 -1
- package/package.json +1 -1
package/dist/plugin.mjs
CHANGED
|
@@ -14,6 +14,7 @@ import { getStatus } from "./cli/status.mjs";
|
|
|
14
14
|
import { syncTemplate } from "./cli/sync.mjs";
|
|
15
15
|
import { syncAndGenerateSharedUi } from "./shared.mjs";
|
|
16
16
|
import { upgradeTemplate } from "./cli/upgrade.mjs";
|
|
17
|
+
import { colors } from "./utils/theme.mjs";
|
|
17
18
|
import { addFunctionCallAccessKey, ensureNearCli, executeTransaction } from "./near-cli.mjs";
|
|
18
19
|
import { buildDescription, buildServiceDescriptorMap } from "./service-descriptor.mjs";
|
|
19
20
|
import { run } from "./utils/run.mjs";
|
|
@@ -248,8 +249,9 @@ async function buildEverythingDevQuietly(cwd) {
|
|
|
248
249
|
async function fetchPublishedConfig(accountId, gatewayId) {
|
|
249
250
|
try {
|
|
250
251
|
return await fetchBosConfigFromFastKv(`bos://${accountId}/${gatewayId}`);
|
|
251
|
-
} catch {
|
|
252
|
-
return null;
|
|
252
|
+
} catch (error) {
|
|
253
|
+
if (error instanceof Error && error.message.startsWith("No config found")) return null;
|
|
254
|
+
throw error;
|
|
253
255
|
}
|
|
254
256
|
}
|
|
255
257
|
function selectWorkspaceTargets(packages, bosConfig) {
|
|
@@ -610,20 +612,31 @@ var plugin_default = createPlugin({
|
|
|
610
612
|
phase: "config",
|
|
611
613
|
status: "running"
|
|
612
614
|
});
|
|
615
|
+
const bosEnv = input.env ?? (process.env.BOS_ENV === "staging" ? "staging" : "production");
|
|
613
616
|
const account = input.account ?? process.env.BOS_ACCOUNT;
|
|
614
617
|
const domain = input.domain ?? process.env.BOS_GATEWAY;
|
|
615
618
|
let config = null;
|
|
616
619
|
let remoteConfig = null;
|
|
617
|
-
if (account && domain) {
|
|
620
|
+
if (account && domain) try {
|
|
618
621
|
remoteConfig = await fetchPublishedConfig(account, domain);
|
|
619
622
|
if (remoteConfig) config = remoteConfig;
|
|
620
|
-
else
|
|
623
|
+
else return {
|
|
624
|
+
status: "error",
|
|
625
|
+
url: "",
|
|
626
|
+
error: `No config found at bos://${account}/${domain}. Verify the account and gateway are correct and the config has been published.\nExpected URL: ${buildRegistryConfigUrl(account, domain)}`
|
|
627
|
+
};
|
|
628
|
+
} catch (error) {
|
|
629
|
+
return {
|
|
630
|
+
status: "error",
|
|
631
|
+
url: "",
|
|
632
|
+
error: `Failed to fetch config for bos://${account}/${domain}: ${error instanceof Error ? error.message : "Unknown error"}\nExpected URL: ${buildRegistryConfigUrl(account, domain)}`
|
|
633
|
+
};
|
|
621
634
|
}
|
|
622
|
-
|
|
635
|
+
else config = deps.bosConfig;
|
|
623
636
|
if (!config) return {
|
|
624
637
|
status: "error",
|
|
625
638
|
url: "",
|
|
626
|
-
error: "No configuration found.
|
|
639
|
+
error: "No configuration found. Provide --account and --gateway flags, or create a local bos.config.json."
|
|
627
640
|
};
|
|
628
641
|
if (account) config = {
|
|
629
642
|
...config,
|
|
@@ -634,7 +647,7 @@ var plugin_default = createPlugin({
|
|
|
634
647
|
domain
|
|
635
648
|
};
|
|
636
649
|
const port = input.port ?? getHostDevelopmentPort(config.app.host.development);
|
|
637
|
-
const isStaging =
|
|
650
|
+
const isStaging = bosEnv === "staging";
|
|
638
651
|
const runtimePlugins = await buildRuntimePluginsForConfig(config, deps.configDir, "production");
|
|
639
652
|
suppressWarnings();
|
|
640
653
|
const runtimeConfig = buildRuntimeConfig(config, {
|
|
@@ -647,6 +660,8 @@ var plugin_default = createPlugin({
|
|
|
647
660
|
});
|
|
648
661
|
drainConfigWarnings();
|
|
649
662
|
resumeWarnings();
|
|
663
|
+
if (isStaging && config.staging?.domain) runtimeConfig.domain = config.staging.domain;
|
|
664
|
+
if (isStaging) runtimeConfig.env = "staging";
|
|
650
665
|
syncGeneratedInfra(deps.configDir, runtimeConfig);
|
|
651
666
|
if (!existsSync(join(deps.configDir, ".env"))) {
|
|
652
667
|
ensureEnvFile(deps.configDir);
|
|
@@ -667,12 +682,13 @@ var plugin_default = createPlugin({
|
|
|
667
682
|
const productionEnv = {};
|
|
668
683
|
const warnings = [];
|
|
669
684
|
if (!process.env.CORS_ORIGIN && config.domain) {
|
|
670
|
-
const defaultOrigin = `https://${config.domain}`;
|
|
685
|
+
const defaultOrigin = `https://${isStaging ? config.staging?.domain ?? config.domain : config.domain}`;
|
|
671
686
|
productionEnv.CORS_ORIGIN = defaultOrigin;
|
|
672
687
|
warnings.push(`CORS_ORIGIN defaulting to ${defaultOrigin}`);
|
|
673
688
|
}
|
|
674
689
|
const requiredSecrets = /* @__PURE__ */ new Set();
|
|
675
690
|
const missingSecrets = [];
|
|
691
|
+
if (runtimeConfig.host.secrets) for (const s of runtimeConfig.host.secrets) requiredSecrets.add(s);
|
|
676
692
|
if (runtimeConfig.auth?.secrets) for (const s of runtimeConfig.auth.secrets) requiredSecrets.add(s);
|
|
677
693
|
if (runtimeConfig.api?.secrets) for (const s of runtimeConfig.api.secrets) requiredSecrets.add(s);
|
|
678
694
|
for (const plugin of Object.values(runtimeConfig.plugins ?? {})) if (plugin.secrets) for (const s of plugin.secrets) requiredSecrets.add(s);
|
|
@@ -775,89 +791,134 @@ var plugin_default = createPlugin({
|
|
|
775
791
|
registryUrl: "",
|
|
776
792
|
error: "No bos.config.json found"
|
|
777
793
|
};
|
|
778
|
-
const
|
|
779
|
-
|
|
780
|
-
|
|
794
|
+
const result = await publishToFastKv({
|
|
795
|
+
bosConfig: deps.bosConfig,
|
|
796
|
+
runtimeConfig: deps.runtimeConfig,
|
|
797
|
+
configDir: deps.configDir,
|
|
798
|
+
env: input.env,
|
|
799
|
+
build: input.deploy,
|
|
800
|
+
dryRun: input.dryRun,
|
|
801
|
+
packages: input.packages,
|
|
802
|
+
network: input.network,
|
|
803
|
+
privateKey: input.privateKey
|
|
804
|
+
});
|
|
805
|
+
if (result.publishConfig) {
|
|
806
|
+
const refreshed = await loadResolvedConfig({ cwd: deps.configDir });
|
|
807
|
+
if (refreshed?.config) {
|
|
808
|
+
deps.bosConfig = refreshed.config;
|
|
809
|
+
deps.runtimeConfig = refreshed.runtime;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
return {
|
|
813
|
+
status: result.status,
|
|
814
|
+
registryUrl: result.registryUrl,
|
|
815
|
+
txHash: result.txHash,
|
|
816
|
+
error: result.error,
|
|
817
|
+
built: result.built,
|
|
818
|
+
skipped: result.skipped
|
|
819
|
+
};
|
|
820
|
+
}),
|
|
821
|
+
deploy: builder.deploy.handler(async ({ input }) => {
|
|
822
|
+
if (!deps.bosConfig) return {
|
|
781
823
|
status: "error",
|
|
782
824
|
registryUrl: "",
|
|
783
|
-
|
|
825
|
+
redeployed: false,
|
|
826
|
+
error: "No bos.config.json found"
|
|
784
827
|
};
|
|
785
|
-
const
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
828
|
+
const result = await publishToFastKv({
|
|
829
|
+
bosConfig: deps.bosConfig,
|
|
830
|
+
runtimeConfig: deps.runtimeConfig,
|
|
831
|
+
configDir: deps.configDir,
|
|
832
|
+
env: input.env,
|
|
833
|
+
build: input.build,
|
|
834
|
+
dryRun: input.dryRun,
|
|
835
|
+
packages: input.packages,
|
|
836
|
+
network: input.network,
|
|
837
|
+
privateKey: input.privateKey
|
|
838
|
+
});
|
|
839
|
+
if (result.status === "error") return {
|
|
840
|
+
status: "error",
|
|
841
|
+
registryUrl: result.registryUrl,
|
|
842
|
+
txHash: result.txHash,
|
|
843
|
+
built: result.built,
|
|
844
|
+
skipped: result.skipped,
|
|
845
|
+
redeployed: false,
|
|
846
|
+
error: result.error
|
|
847
|
+
};
|
|
848
|
+
if (result.status === "dry-run") return {
|
|
793
849
|
status: "dry-run",
|
|
794
|
-
registryUrl,
|
|
795
|
-
built,
|
|
796
|
-
skipped
|
|
850
|
+
registryUrl: result.registryUrl,
|
|
851
|
+
built: result.built,
|
|
852
|
+
skipped: result.skipped,
|
|
853
|
+
redeployed: false
|
|
797
854
|
};
|
|
798
|
-
if (
|
|
799
|
-
await generateCodeArtifacts(deps.configDir, deps.bosConfig, {
|
|
800
|
-
env: "production",
|
|
801
|
-
runtimeConfig: deps.runtimeConfig ?? void 0
|
|
802
|
-
});
|
|
803
|
-
const result = await buildWorkspaceTargets({
|
|
804
|
-
configDir: deps.configDir,
|
|
805
|
-
bosConfig: deps.bosConfig,
|
|
806
|
-
runtimeConfig: deps.runtimeConfig,
|
|
807
|
-
targets,
|
|
808
|
-
deploy: true
|
|
809
|
-
});
|
|
810
|
-
built = result.built;
|
|
811
|
-
skipped = result.skipped;
|
|
855
|
+
if (result.publishConfig) {
|
|
812
856
|
const refreshed = await loadResolvedConfig({ cwd: deps.configDir });
|
|
813
857
|
if (refreshed?.config) {
|
|
814
858
|
deps.bosConfig = refreshed.config;
|
|
815
859
|
deps.runtimeConfig = refreshed.runtime;
|
|
816
|
-
publishConfig = refreshed.config;
|
|
817
860
|
}
|
|
818
861
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
862
|
+
let redeployed = false;
|
|
863
|
+
let service;
|
|
864
|
+
if (process.env.RAILWAY_TOKEN) {
|
|
865
|
+
const railwayService = input.service ?? deps.bosConfig.ci?.railway?.service;
|
|
866
|
+
if (!railwayService) {
|
|
867
|
+
console.log();
|
|
868
|
+
console.log(colors.yellow(" Railway redeploy skipped: ci.railway.service is not configured in bos.config.json"));
|
|
869
|
+
return {
|
|
870
|
+
status: "published",
|
|
871
|
+
registryUrl: result.registryUrl,
|
|
872
|
+
txHash: result.txHash,
|
|
873
|
+
built: result.built,
|
|
874
|
+
skipped: result.skipped,
|
|
875
|
+
redeployed: false,
|
|
876
|
+
error: "Config published but Railway redeploy failed: ci.railway.service is not configured in bos.config.json"
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
service = railwayService;
|
|
880
|
+
console.log();
|
|
881
|
+
console.log(` Redeploying Railway service ${colors.cyan(railwayService)}...`);
|
|
826
882
|
try {
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
883
|
+
const railResult = await run("railway", [
|
|
884
|
+
"redeploy",
|
|
885
|
+
"--service",
|
|
886
|
+
railwayService,
|
|
887
|
+
"--yes"
|
|
888
|
+
], { capture: true });
|
|
889
|
+
if (railResult?.stdout) {
|
|
890
|
+
for (const line of railResult.stdout.split("\n")) if (line.trim()) console.log(` ${colors.dim(line.trim())}`);
|
|
891
|
+
}
|
|
892
|
+
redeployed = true;
|
|
893
|
+
console.log(colors.green(` Railway redeploy complete`));
|
|
837
894
|
} catch (error) {
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
895
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
896
|
+
const railError = message.includes("not found") || message.includes("ENOENT") ? "Railway CLI not found. Install it: npm i -g @railway/cli" : `Railway redeploy failed: ${message}`;
|
|
897
|
+
console.log(colors.yellow(` ${railError}`));
|
|
898
|
+
return {
|
|
899
|
+
status: "published",
|
|
900
|
+
registryUrl: result.registryUrl,
|
|
901
|
+
txHash: result.txHash,
|
|
902
|
+
built: result.built,
|
|
903
|
+
skipped: result.skipped,
|
|
904
|
+
redeployed: false,
|
|
905
|
+
service,
|
|
906
|
+
error: `Config published but ${railError}`
|
|
907
|
+
};
|
|
844
908
|
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
txHash,
|
|
849
|
-
built,
|
|
850
|
-
skipped
|
|
851
|
-
};
|
|
852
|
-
} catch (error) {
|
|
853
|
-
return {
|
|
854
|
-
status: "error",
|
|
855
|
-
registryUrl,
|
|
856
|
-
error: error instanceof Error ? error.message : "Unknown error",
|
|
857
|
-
built,
|
|
858
|
-
skipped
|
|
859
|
-
};
|
|
909
|
+
} else {
|
|
910
|
+
console.log();
|
|
911
|
+
console.log(colors.yellow(" Railway redeploy skipped (RAILWAY_TOKEN not set)"));
|
|
860
912
|
}
|
|
913
|
+
return {
|
|
914
|
+
status: "deployed",
|
|
915
|
+
registryUrl: result.registryUrl,
|
|
916
|
+
txHash: result.txHash,
|
|
917
|
+
built: result.built,
|
|
918
|
+
skipped: result.skipped,
|
|
919
|
+
redeployed,
|
|
920
|
+
service
|
|
921
|
+
};
|
|
861
922
|
}),
|
|
862
923
|
keyPublish: builder.keyPublish.handler(async ({ input }) => {
|
|
863
924
|
if (!deps.bosConfig) return {
|
|
@@ -1210,6 +1271,112 @@ var plugin_default = createPlugin({
|
|
|
1210
1271
|
})
|
|
1211
1272
|
})
|
|
1212
1273
|
});
|
|
1274
|
+
async function publishToFastKv(input) {
|
|
1275
|
+
const { env, dryRun, configDir } = input;
|
|
1276
|
+
let bosConfig = input.bosConfig;
|
|
1277
|
+
const runtimeConfig = input.runtimeConfig;
|
|
1278
|
+
const isStaging = env === "staging";
|
|
1279
|
+
const account = bosConfig.account;
|
|
1280
|
+
const gateway = isStaging ? bosConfig.staging?.domain ?? bosConfig.domain : bosConfig.domain;
|
|
1281
|
+
if (!gateway) return {
|
|
1282
|
+
status: "error",
|
|
1283
|
+
registryUrl: "",
|
|
1284
|
+
error: "bos.config.json must define domain to publish"
|
|
1285
|
+
};
|
|
1286
|
+
const network = input.network ?? getNetworkIdForAccount(account);
|
|
1287
|
+
const registryUrl = buildRegistryConfigUrlForNetwork(network, account, gateway);
|
|
1288
|
+
const targets = selectWorkspaceTargets(input.packages, bosConfig);
|
|
1289
|
+
let publishConfig = isStaging ? {
|
|
1290
|
+
...bosConfig,
|
|
1291
|
+
domain: gateway
|
|
1292
|
+
} : bosConfig;
|
|
1293
|
+
let built;
|
|
1294
|
+
let skipped;
|
|
1295
|
+
if (dryRun) return {
|
|
1296
|
+
status: "dry-run",
|
|
1297
|
+
registryUrl,
|
|
1298
|
+
built,
|
|
1299
|
+
skipped
|
|
1300
|
+
};
|
|
1301
|
+
if (input.build) {
|
|
1302
|
+
await generateCodeArtifacts(configDir, bosConfig, {
|
|
1303
|
+
env: "production",
|
|
1304
|
+
runtimeConfig: runtimeConfig ?? void 0
|
|
1305
|
+
});
|
|
1306
|
+
const result = await buildWorkspaceTargets({
|
|
1307
|
+
configDir,
|
|
1308
|
+
bosConfig,
|
|
1309
|
+
runtimeConfig,
|
|
1310
|
+
targets,
|
|
1311
|
+
deploy: true
|
|
1312
|
+
});
|
|
1313
|
+
built = result.built;
|
|
1314
|
+
skipped = result.skipped;
|
|
1315
|
+
const refreshed = await loadResolvedConfig({ cwd: configDir });
|
|
1316
|
+
if (refreshed?.config) {
|
|
1317
|
+
bosConfig = refreshed.config;
|
|
1318
|
+
publishConfig = isStaging ? {
|
|
1319
|
+
...refreshed.config,
|
|
1320
|
+
domain: gateway
|
|
1321
|
+
} : refreshed.config;
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
const registryEntries = { [`apps/${account}/${gateway}/bos.config.json`]: JSON.stringify(publishConfig) };
|
|
1325
|
+
const payload = JSON.stringify(registryEntries);
|
|
1326
|
+
const argsBase64 = Buffer.from(payload).toString("base64");
|
|
1327
|
+
const privateKey = input.privateKey || process.env.NEAR_PRIVATE_KEY || process.env.BOS_NEAR_PRIVATE_KEY;
|
|
1328
|
+
if (!privateKey) {
|
|
1329
|
+
if (!process.stdin.isTTY) return {
|
|
1330
|
+
status: "error",
|
|
1331
|
+
registryUrl,
|
|
1332
|
+
error: "No private key provided and no TTY available for keychain signing. Set NEAR_PRIVATE_KEY environment variable to sign locally."
|
|
1333
|
+
};
|
|
1334
|
+
console.log(colors.yellow(" Warning: No NEAR_PRIVATE_KEY set — falling back to interactive keychain signing."));
|
|
1335
|
+
}
|
|
1336
|
+
console.log();
|
|
1337
|
+
console.log(` Publishing to ${colors.cyan(registryUrl)}...`);
|
|
1338
|
+
try {
|
|
1339
|
+
await Effect.runPromise(ensureNearCli);
|
|
1340
|
+
let txHash;
|
|
1341
|
+
console.log(` Submitting transaction on ${network}...`);
|
|
1342
|
+
try {
|
|
1343
|
+
txHash = (await Effect.runPromise(executeTransaction({
|
|
1344
|
+
account,
|
|
1345
|
+
contract: getRegistryNamespaceForNetwork(network),
|
|
1346
|
+
method: "__fastdata_kv",
|
|
1347
|
+
argsBase64,
|
|
1348
|
+
network,
|
|
1349
|
+
privateKey,
|
|
1350
|
+
gas: "300Tgas",
|
|
1351
|
+
deposit: "0NEAR"
|
|
1352
|
+
}))).txHash;
|
|
1353
|
+
if (txHash) console.log(` Transaction submitted: ${colors.dim(txHash)}`);
|
|
1354
|
+
} catch (error) {
|
|
1355
|
+
txHash = extractTransactionHash(error);
|
|
1356
|
+
if (!txHash) throw error;
|
|
1357
|
+
try {
|
|
1358
|
+
const verifiedConfig = await fetchBosConfigFromFastKv(`bos://${account}/${gateway}`);
|
|
1359
|
+
if (JSON.stringify(verifiedConfig) !== JSON.stringify(publishConfig)) throw error;
|
|
1360
|
+
} catch {}
|
|
1361
|
+
}
|
|
1362
|
+
return {
|
|
1363
|
+
status: "published",
|
|
1364
|
+
registryUrl,
|
|
1365
|
+
txHash,
|
|
1366
|
+
built,
|
|
1367
|
+
skipped,
|
|
1368
|
+
publishConfig
|
|
1369
|
+
};
|
|
1370
|
+
} catch (error) {
|
|
1371
|
+
return {
|
|
1372
|
+
status: "error",
|
|
1373
|
+
registryUrl,
|
|
1374
|
+
error: error instanceof Error ? error.message : "Unknown error",
|
|
1375
|
+
built,
|
|
1376
|
+
skipped
|
|
1377
|
+
};
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1213
1380
|
function extractTransactionHash(error) {
|
|
1214
1381
|
return (error instanceof Error ? error.message : String(error)).match(/Transaction ID:\s*([A-Za-z0-9]+)/i)?.[1];
|
|
1215
1382
|
}
|