everything-dev 1.15.0 → 1.16.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 +6 -18
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.d.cts.map +1 -1
- package/dist/cli/init.d.mts.map +1 -1
- package/dist/cli/init.mjs +6 -18
- package/dist/cli/init.mjs.map +1 -1
- package/dist/cli/prompts.cjs +8 -8
- package/dist/cli/prompts.cjs.map +1 -1
- package/dist/cli/prompts.mjs +8 -8
- package/dist/cli/prompts.mjs.map +1 -1
- package/dist/cli/upgrade.cjs +75 -7
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs +74 -8
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/cli.cjs +2 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +2 -0
- package/dist/cli.mjs.map +1 -1
- package/dist/config.cjs +2 -24
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +3 -25
- package/dist/config.mjs.map +1 -1
- package/dist/contract.cjs +2 -0
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +10 -6
- package/dist/contract.d.cts.map +1 -1
- package/dist/contract.d.mts +10 -6
- package/dist/contract.d.mts.map +1 -1
- package/dist/contract.meta.cjs +2 -2
- package/dist/contract.meta.cjs.map +1 -1
- package/dist/contract.meta.d.cts +2 -2
- package/dist/contract.meta.d.mts +2 -2
- package/dist/contract.meta.mjs +2 -2
- package/dist/contract.meta.mjs.map +1 -1
- package/dist/contract.mjs +2 -0
- package/dist/contract.mjs.map +1 -1
- package/dist/fastkv.cjs +0 -45
- package/dist/fastkv.cjs.map +1 -1
- package/dist/fastkv.d.cts +1 -19
- package/dist/fastkv.d.cts.map +1 -1
- package/dist/fastkv.d.mts +1 -19
- package/dist/fastkv.d.mts.map +1 -1
- package/dist/fastkv.mjs +1 -44
- package/dist/fastkv.mjs.map +1 -1
- package/dist/index.cjs +0 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/merge.cjs +6 -11
- 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 +6 -11
- package/dist/merge.mjs.map +1 -1
- package/dist/near-cli.cjs +29 -52
- package/dist/near-cli.cjs.map +1 -1
- package/dist/near-cli.mjs +29 -52
- package/dist/near-cli.mjs.map +1 -1
- package/dist/plugin.cjs +36 -38
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +6 -4
- package/dist/plugin.d.mts +6 -4
- package/dist/plugin.mjs +36 -38
- package/dist/plugin.mjs.map +1 -1
- package/dist/types.d.cts +2 -2
- package/dist/types.d.mts +2 -2
- package/package.json +2 -1
- package/src/cli/init.ts +4 -24
- package/src/cli/prompts.ts +12 -8
- package/src/cli/upgrade.ts +117 -6
- package/src/cli.ts +6 -0
- package/src/config.ts +5 -34
- package/src/contract.meta.ts +2 -2
- package/src/contract.ts +2 -0
- package/src/fastkv.ts +0 -72
- package/src/merge.ts +8 -19
- package/src/near-cli.ts +42 -69
- package/src/plugin.ts +53 -47
package/src/plugin.ts
CHANGED
|
@@ -711,32 +711,19 @@ export default createPlugin({
|
|
|
711
711
|
pluginDomain = `${input.key}.${deps.bosConfig.domain ?? "everything.dev"}`;
|
|
712
712
|
}
|
|
713
713
|
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
const registryEntries: Record<string, string> = {
|
|
717
|
-
[`plugins/${account}/${input.key}/manifest.json`]: JSON.stringify(manifest),
|
|
718
|
-
[`plugins/${account}/${input.key}/metadata`]: JSON.stringify({
|
|
719
|
-
title: null,
|
|
720
|
-
description: null,
|
|
721
|
-
repoUrl: deps.bosConfig.repository ?? null,
|
|
722
|
-
version,
|
|
723
|
-
publishedAt: new Date().toISOString(),
|
|
724
|
-
cdnUrl: publishedUrl,
|
|
725
|
-
integrity,
|
|
726
|
-
}),
|
|
727
|
-
[`plugins/${account}/${input.key}/versions/${version}/manifest.json`]:
|
|
728
|
-
JSON.stringify(manifest),
|
|
729
|
-
};
|
|
714
|
+
try {
|
|
715
|
+
const registryEntries: Record<string, string> = {};
|
|
730
716
|
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
717
|
+
if (existsSync(pluginConfigPath)) {
|
|
718
|
+
try {
|
|
719
|
+
const publishedPluginConfig = JSON.parse(readFileSync(pluginConfigPath, "utf-8"));
|
|
720
|
+
delete publishedPluginConfig.development;
|
|
721
|
+
registryEntries[`apps/${account}/${pluginDomain}/bos.config.json`] =
|
|
722
|
+
JSON.stringify(publishedPluginConfig);
|
|
723
|
+
} catch {}
|
|
724
|
+
}
|
|
739
725
|
|
|
726
|
+
if (Object.keys(registryEntries).length > 0) {
|
|
740
727
|
const payload = JSON.stringify(registryEntries);
|
|
741
728
|
const argsBase64 = Buffer.from(payload).toString("base64");
|
|
742
729
|
const privateKey = process.env.NEAR_PRIVATE_KEY || process.env.BOS_NEAR_PRIVATE_KEY;
|
|
@@ -763,11 +750,11 @@ export default createPlugin({
|
|
|
763
750
|
);
|
|
764
751
|
}
|
|
765
752
|
}
|
|
766
|
-
} catch (registryError) {
|
|
767
|
-
console.warn(
|
|
768
|
-
`[publish] Plugin registry write skipped: ${registryError instanceof Error ? registryError.message : registryError}`,
|
|
769
|
-
);
|
|
770
753
|
}
|
|
754
|
+
} catch (registryError) {
|
|
755
|
+
console.warn(
|
|
756
|
+
`[publish] Plugin registry write skipped: ${registryError instanceof Error ? registryError.message : registryError}`,
|
|
757
|
+
);
|
|
771
758
|
}
|
|
772
759
|
|
|
773
760
|
await generateCodeArtifacts(deps.configDir, deps.bosConfig);
|
|
@@ -1321,6 +1308,18 @@ export default createPlugin({
|
|
|
1321
1308
|
}
|
|
1322
1309
|
}
|
|
1323
1310
|
|
|
1311
|
+
extendsAccount = extendsAccount || "dev.everything.near";
|
|
1312
|
+
extendsGateway = extendsGateway || "everything.dev";
|
|
1313
|
+
|
|
1314
|
+
let parentPluginKeys: string[] = [];
|
|
1315
|
+
let parentConfig: BosConfig | null = null;
|
|
1316
|
+
try {
|
|
1317
|
+
parentConfig = await fetchParentConfig(extendsAccount, extendsGateway);
|
|
1318
|
+
if (parentConfig?.plugins && typeof parentConfig.plugins === "object") {
|
|
1319
|
+
parentPluginKeys = Object.keys(parentConfig.plugins);
|
|
1320
|
+
}
|
|
1321
|
+
} catch {}
|
|
1322
|
+
|
|
1324
1323
|
if (!input.noInteractive) {
|
|
1325
1324
|
const prompted = await promptInitOptions({
|
|
1326
1325
|
extendsAccount,
|
|
@@ -1331,6 +1330,7 @@ export default createPlugin({
|
|
|
1331
1330
|
domain,
|
|
1332
1331
|
plugins,
|
|
1333
1332
|
withHost,
|
|
1333
|
+
parentPluginKeys,
|
|
1334
1334
|
});
|
|
1335
1335
|
extendsAccount = prompted.extendsAccount;
|
|
1336
1336
|
extendsGateway = prompted.extendsGateway;
|
|
@@ -1341,34 +1341,40 @@ export default createPlugin({
|
|
|
1341
1341
|
plugins = prompted.plugins;
|
|
1342
1342
|
}
|
|
1343
1343
|
|
|
1344
|
-
extendsAccount = extendsAccount || "dev.everything.near";
|
|
1345
|
-
extendsGateway = extendsGateway || "everything.dev";
|
|
1346
1344
|
directory = directory || domain || extendsGateway;
|
|
1347
|
-
plugins = plugins
|
|
1345
|
+
plugins = plugins ?? [];
|
|
1348
1346
|
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1347
|
+
if (!parentConfig) {
|
|
1348
|
+
try {
|
|
1349
|
+
parentConfig = await fetchParentConfig(extendsAccount, extendsGateway);
|
|
1350
|
+
} catch {
|
|
1351
|
+
return {
|
|
1352
|
+
status: "error" as const,
|
|
1353
|
+
directory,
|
|
1354
|
+
extendsAccount,
|
|
1355
|
+
extendsGateway,
|
|
1356
|
+
account,
|
|
1357
|
+
domain,
|
|
1358
|
+
extends: `bos://${extendsAccount}/${extendsGateway}`,
|
|
1359
|
+
plugins: plugins ?? [],
|
|
1360
|
+
filesCopied: 0,
|
|
1361
|
+
error: `No config found at bos://${extendsAccount}/${extendsGateway} — are you sure this is the right parent?`,
|
|
1362
|
+
};
|
|
1363
|
+
}
|
|
1364
1364
|
}
|
|
1365
1365
|
|
|
1366
|
-
const {
|
|
1366
|
+
const {
|
|
1367
|
+
sourceDir,
|
|
1368
|
+
parentConfig: resolvedParentConfig,
|
|
1369
|
+
cleanup,
|
|
1370
|
+
} = await resolveSourceDir({
|
|
1367
1371
|
extendsAccount,
|
|
1368
1372
|
extendsGateway,
|
|
1369
1373
|
source: input.source,
|
|
1370
1374
|
});
|
|
1371
1375
|
|
|
1376
|
+
parentConfig = resolvedParentConfig;
|
|
1377
|
+
|
|
1372
1378
|
try {
|
|
1373
1379
|
const patterns = await readTemplatekeep(sourceDir);
|
|
1374
1380
|
if (patterns.length === 0) {
|