everything-dev 0.0.11 → 0.0.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "everything-dev",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -13,25 +13,6 @@
13
13
  "publishConfig": {
14
14
  "access": "public"
15
15
  },
16
- "catalog": {
17
- "react": "^19.2.3",
18
- "react-dom": "^19.2.3",
19
- "@tanstack/react-query": "^5.90.11",
20
- "@tanstack/react-router": "^1.153.2",
21
- "@hot-labs/near-connect": "^0.8.2",
22
- "near-kit": "^0.10.0",
23
- "better-auth": "^1.4.6",
24
- "better-near-auth": "^0.3.4",
25
- "every-plugin": "0.8.9",
26
- "drizzle-orm": "^0.45.1",
27
- "drizzle-kit": "^0.31.8",
28
- "@libsql/client": "^0.17.0",
29
- "typescript": "^5.9.3",
30
- "vitest": "^4.0.17",
31
- "@types/node": "^25.0.3",
32
- "@types/react": "^19.2.7",
33
- "@types/react-dom": "^19.2.3"
34
- },
35
16
  "bin": {
36
17
  "bos": "./src/cli.ts"
37
18
  },
@@ -40,33 +21,36 @@
40
21
  "typecheck": "tsc --noEmit"
41
22
  },
42
23
  "dependencies": {
43
- "@clack/prompts": "^0.10.1",
44
- "@effect/platform": "^0.82.8",
45
- "@effect/platform-bun": "^0.58.1",
24
+ "@clack/prompts": "^1.0.0",
25
+ "@effect/platform": "^0.94.2",
26
+ "@effect/platform-bun": "^0.87.1",
27
+ "effect": "3.19.15",
28
+ "zod": "4.3.5",
46
29
  "@hono/node-server": "^1.19.9",
47
- "@module-federation/enhanced": "^0.13.0",
48
- "@module-federation/runtime-core": "^0.13.0",
49
30
  "@inquirer/prompts": "^8.2.0",
50
31
  "@libsql/client": "^0.17.0",
32
+ "@module-federation/enhanced": "^0.23.0",
33
+ "@module-federation/runtime-core": "^0.23.0",
51
34
  "borsh": "^2.0.0",
52
35
  "boxen": "^8.0.1",
53
36
  "chalk": "^5.6.2",
54
37
  "commander": "^14.0.2",
55
38
  "degit": "^2.8.4",
56
- "effect": "^3.19.14",
57
- "every-plugin": "0.8.9",
39
+ "every-plugin": "0.9.0",
58
40
  "execa": "^9.6.1",
59
41
  "gradient-string": "^3.0.0",
60
42
  "ink": "^5.2.1",
61
- "near-kit": "^0.7.0",
62
- "near-social-js": "^2.0.3",
63
- "nova-sdk-js": "^1.0.1",
43
+ "near-kit": "^0.10.0",
44
+ "near-social-js": "^2.0.4",
45
+ "nova-sdk-js": "^1.0.3",
64
46
  "open": "^11.0.0",
65
- "react": "^18.3.1"
47
+ "react": "18.3.1",
48
+ "react-dom": "18.3.1"
66
49
  },
67
50
  "devDependencies": {
68
51
  "@types/bun": "latest",
69
52
  "@types/react": "^18.3.0",
53
+ "@types/react-dom": "^18.3.0",
70
54
  "@types/gradient-string": "^1.1.6",
71
55
  "typescript": "^5.9.3"
72
56
  }
package/src/cli.ts CHANGED
@@ -701,6 +701,88 @@ Zephyr Configuration:
701
701
  console.log();
702
702
  });
703
703
 
704
+ const depsCmd = program
705
+ .command("deps")
706
+ .description("Manage shared dependencies");
707
+
708
+ depsCmd
709
+ .command("update")
710
+ .description("Interactive update of shared dependencies (bun update -i style)")
711
+ .argument("[category]", "Dependency category (ui | api)", "ui")
712
+ .action(async (category: string) => {
713
+ console.log();
714
+ console.log(` ${icons.pkg} Updating shared.${category} dependencies...`);
715
+
716
+ const result = await client.depsUpdate({
717
+ category: category as "ui" | "api",
718
+ });
719
+
720
+ if (result.status === "error") {
721
+ console.error(colors.error(`${icons.err} ${result.error || "Update failed"}`));
722
+ process.exit(1);
723
+ }
724
+
725
+ if (result.status === "cancelled") {
726
+ console.log();
727
+ console.log(colors.dim(" No updates selected"));
728
+ console.log();
729
+ return;
730
+ }
731
+
732
+ console.log();
733
+ console.log(colors.cyan(frames.top(52)));
734
+ console.log(` ${icons.ok} ${gradients.cyber("DEPENDENCIES UPDATED")}`);
735
+ console.log(colors.cyan(frames.bottom(52)));
736
+ console.log();
737
+
738
+ for (const { name, from, to } of result.updated) {
739
+ console.log(` ${colors.dim("•")} ${colors.white(name)}`);
740
+ console.log(` ${colors.dim(from)} → ${colors.green(to)}`);
741
+ }
742
+
743
+ if (result.syncStatus === "synced") {
744
+ console.log();
745
+ console.log(colors.green(` ${icons.ok} Catalog synced & bun install complete`));
746
+ }
747
+ console.log();
748
+ });
749
+
750
+ depsCmd
751
+ .command("sync")
752
+ .description("Sync bos.config.json shared deps to package.json catalog")
753
+ .argument("[category]", "Dependency category (ui | api)", "ui")
754
+ .option("--no-install", "Skip running bun install")
755
+ .action(async (category: string, options: { install: boolean }) => {
756
+ console.log();
757
+ console.log(` ${icons.pkg} Syncing shared.${category} to catalog...`);
758
+
759
+ const result = await client.depsSync({
760
+ category: category as "ui" | "api",
761
+ install: options.install,
762
+ });
763
+
764
+ if (result.status === "error") {
765
+ console.error(colors.error(`${icons.err} ${result.error || "Sync failed"}`));
766
+ process.exit(1);
767
+ }
768
+
769
+ console.log();
770
+ console.log(colors.green(`${icons.ok} Synced ${result.synced.length} dependencies to catalog`));
771
+
772
+ if (result.synced.length > 0) {
773
+ for (const name of result.synced) {
774
+ console.log(` ${colors.dim("•")} ${name}`);
775
+ }
776
+ }
777
+
778
+ if (options.install) {
779
+ console.log(colors.dim(" bun install complete"));
780
+ } else {
781
+ console.log(colors.dim(" Run 'bun install' to update lockfile"));
782
+ }
783
+ console.log();
784
+ });
785
+
704
786
  program
705
787
  .command("login")
706
788
  .description("Login to NOVA for encrypted secrets management")
package/src/contract.ts CHANGED
@@ -229,6 +229,33 @@ const SyncResultSchema = z.object({
229
229
  error: z.string().optional(),
230
230
  });
231
231
 
232
+ const DepsUpdateOptionsSchema = z.object({
233
+ category: z.enum(["ui", "api"]).default("ui"),
234
+ packages: z.array(z.string()).optional(),
235
+ });
236
+
237
+ const DepsUpdateResultSchema = z.object({
238
+ status: z.enum(["updated", "cancelled", "error"]),
239
+ updated: z.array(z.object({
240
+ name: z.string(),
241
+ from: z.string(),
242
+ to: z.string(),
243
+ })),
244
+ syncStatus: z.enum(["synced", "skipped", "error"]).optional(),
245
+ error: z.string().optional(),
246
+ });
247
+
248
+ const DepsSyncOptionsSchema = z.object({
249
+ category: z.enum(["ui", "api"]).default("ui"),
250
+ install: z.boolean().default(true),
251
+ });
252
+
253
+ const DepsSyncResultSchema = z.object({
254
+ status: z.enum(["synced", "error"]),
255
+ synced: z.array(z.string()),
256
+ error: z.string().optional(),
257
+ });
258
+
232
259
  export const bosContract = oc.router({
233
260
  dev: oc
234
261
  .route({ method: "POST", path: "/dev" })
@@ -325,6 +352,16 @@ export const bosContract = oc.router({
325
352
  .route({ method: "POST", path: "/sync" })
326
353
  .input(SyncOptionsSchema)
327
354
  .output(SyncResultSchema),
355
+
356
+ depsUpdate: oc
357
+ .route({ method: "POST", path: "/deps/update" })
358
+ .input(DepsUpdateOptionsSchema)
359
+ .output(DepsUpdateResultSchema),
360
+
361
+ depsSync: oc
362
+ .route({ method: "POST", path: "/deps/sync" })
363
+ .input(DepsSyncOptionsSchema)
364
+ .output(DepsSyncResultSchema),
328
365
  });
329
366
 
330
367
  export type BosContract = typeof bosContract;
@@ -359,3 +396,7 @@ export type LoginResult = z.infer<typeof LoginResultSchema>;
359
396
  export type LogoutResult = z.infer<typeof LogoutResultSchema>;
360
397
  export type SyncOptions = z.infer<typeof SyncOptionsSchema>;
361
398
  export type SyncResult = z.infer<typeof SyncResultSchema>;
399
+ export type DepsUpdateOptions = z.infer<typeof DepsUpdateOptionsSchema>;
400
+ export type DepsUpdateResult = z.infer<typeof DepsUpdateResultSchema>;
401
+ export type DepsSyncOptions = z.infer<typeof DepsSyncOptionsSchema>;
402
+ export type DepsSyncResult = z.infer<typeof DepsSyncResultSchema>;
@@ -1,6 +1,6 @@
1
1
  import { appendFile } from "node:fs/promises";
2
2
  import { BunContext, BunRuntime } from "@effect/platform-bun";
3
- import { Effect } from "effect";
3
+ import { Effect } from "every-plugin/effect";
4
4
  import path from "path";
5
5
  import type { AppConfig } from "../config";
6
6
  import {
@@ -1,6 +1,6 @@
1
1
  import { resolve } from "node:path";
2
2
  import { Command } from "@effect/platform";
3
- import { Deferred, Effect, Fiber, Ref, Stream } from "effect";
3
+ import { Deferred, Effect, Fiber, Ref, Stream } from "every-plugin/effect";
4
4
  import { getConfigDir, getPortsFromConfig, type SourceMode } from "../config";
5
5
  import type { ProcessStatus } from "../components/dev-view";
6
6
  import { loadSecretsFor } from "./secrets";
package/src/plugin.ts CHANGED
@@ -1036,6 +1036,197 @@ export default createPlugin({
1036
1036
  }
1037
1037
  }),
1038
1038
 
1039
+ depsUpdate: builder.depsUpdate.handler(async ({ input }) => {
1040
+ const { configDir, bosConfig } = deps;
1041
+
1042
+ if (!bosConfig) {
1043
+ return {
1044
+ status: "error" as const,
1045
+ updated: [],
1046
+ error: "No bos.config.json found. Run from a BOS project directory.",
1047
+ };
1048
+ }
1049
+
1050
+ const category = input.category;
1051
+ const sharedDeps = bosConfig.shared?.[category];
1052
+
1053
+ if (!sharedDeps || Object.keys(sharedDeps).length === 0) {
1054
+ return {
1055
+ status: "error" as const,
1056
+ updated: [],
1057
+ error: `No shared.${category} dependencies found in bos.config.json`,
1058
+ };
1059
+ }
1060
+
1061
+ const { mkdtemp, rm } = await import("fs/promises");
1062
+ const { tmpdir } = await import("os");
1063
+ const { join } = await import("path");
1064
+ const { execa } = await import("execa");
1065
+
1066
+ const tempDir = await mkdtemp(join(tmpdir(), "bos-deps-"));
1067
+
1068
+ try {
1069
+ const tempDeps: Record<string, string> = {};
1070
+ for (const [name, config] of Object.entries(sharedDeps)) {
1071
+ const version = (config as { requiredVersion?: string }).requiredVersion || "*";
1072
+ tempDeps[name] = version.replace(/^[\^~]/, "");
1073
+ }
1074
+
1075
+ const tempPkg = {
1076
+ name: "bos-deps-update",
1077
+ private: true,
1078
+ dependencies: tempDeps,
1079
+ };
1080
+
1081
+ await Bun.write(join(tempDir, "package.json"), JSON.stringify(tempPkg, null, 2));
1082
+
1083
+ await execa("bun", ["install"], {
1084
+ cwd: tempDir,
1085
+ stdio: "inherit",
1086
+ });
1087
+
1088
+ await execa("bun", ["update", "-i"], {
1089
+ cwd: tempDir,
1090
+ stdio: "inherit",
1091
+ });
1092
+
1093
+ const updatedPkg = await Bun.file(join(tempDir, "package.json")).json() as {
1094
+ dependencies: Record<string, string>;
1095
+ };
1096
+
1097
+ const updated: { name: string; from: string; to: string }[] = [];
1098
+ const updatedConfig = { ...bosConfig };
1099
+
1100
+ if (!updatedConfig.shared) {
1101
+ updatedConfig.shared = {};
1102
+ }
1103
+ if (!updatedConfig.shared[category]) {
1104
+ updatedConfig.shared[category] = {};
1105
+ }
1106
+
1107
+ for (const [name, newVersion] of Object.entries(updatedPkg.dependencies)) {
1108
+ const oldVersion = (sharedDeps[name] as { requiredVersion?: string })?.requiredVersion || "";
1109
+ if (newVersion !== oldVersion) {
1110
+ updated.push({ name, from: oldVersion, to: newVersion });
1111
+ updatedConfig.shared[category][name] = {
1112
+ ...(sharedDeps[name] as object),
1113
+ requiredVersion: newVersion,
1114
+ };
1115
+ }
1116
+ }
1117
+
1118
+ if (updated.length > 0) {
1119
+ const bosConfigPath = `${configDir}/bos.config.json`;
1120
+ await Bun.write(bosConfigPath, JSON.stringify(updatedConfig, null, 2));
1121
+
1122
+ const rootPkgPath = `${configDir}/package.json`;
1123
+ const rootPkg = await Bun.file(rootPkgPath).json() as {
1124
+ workspaces?: { catalog?: Record<string, string> };
1125
+ };
1126
+
1127
+ if (rootPkg.workspaces?.catalog) {
1128
+ for (const { name, to } of updated) {
1129
+ rootPkg.workspaces.catalog[name] = to;
1130
+ }
1131
+ await Bun.write(rootPkgPath, JSON.stringify(rootPkg, null, 2));
1132
+ }
1133
+
1134
+ await execa("bun", ["install"], {
1135
+ cwd: configDir,
1136
+ stdio: "inherit",
1137
+ });
1138
+
1139
+ return {
1140
+ status: "updated" as const,
1141
+ updated,
1142
+ syncStatus: "synced" as const,
1143
+ };
1144
+ }
1145
+
1146
+ return {
1147
+ status: "cancelled" as const,
1148
+ updated: [],
1149
+ };
1150
+ } catch (error) {
1151
+ return {
1152
+ status: "error" as const,
1153
+ updated: [],
1154
+ error: error instanceof Error ? error.message : "Unknown error",
1155
+ };
1156
+ } finally {
1157
+ await rm(tempDir, { recursive: true, force: true });
1158
+ }
1159
+ }),
1160
+
1161
+ depsSync: builder.depsSync.handler(async ({ input }) => {
1162
+ const { configDir, bosConfig } = deps;
1163
+
1164
+ if (!bosConfig) {
1165
+ return {
1166
+ status: "error" as const,
1167
+ synced: [],
1168
+ error: "No bos.config.json found. Run from a BOS project directory.",
1169
+ };
1170
+ }
1171
+
1172
+ const category = input.category;
1173
+ const sharedDeps = bosConfig.shared?.[category];
1174
+
1175
+ if (!sharedDeps || Object.keys(sharedDeps).length === 0) {
1176
+ return {
1177
+ status: "error" as const,
1178
+ synced: [],
1179
+ error: `No shared.${category} dependencies found in bos.config.json`,
1180
+ };
1181
+ }
1182
+
1183
+ try {
1184
+ const rootPkgPath = `${configDir}/package.json`;
1185
+ const rootPkg = await Bun.file(rootPkgPath).json() as {
1186
+ workspaces?: { packages?: string[]; catalog?: Record<string, string> };
1187
+ };
1188
+
1189
+ if (!rootPkg.workspaces) {
1190
+ rootPkg.workspaces = {};
1191
+ }
1192
+ if (!rootPkg.workspaces.catalog) {
1193
+ rootPkg.workspaces.catalog = {};
1194
+ }
1195
+
1196
+ const synced: string[] = [];
1197
+
1198
+ for (const [name, config] of Object.entries(sharedDeps)) {
1199
+ const version = (config as { requiredVersion?: string }).requiredVersion;
1200
+ if (version) {
1201
+ const cleanVersion = version.replace(/^[\^~]/, "");
1202
+ rootPkg.workspaces.catalog[name] = cleanVersion;
1203
+ synced.push(name);
1204
+ }
1205
+ }
1206
+
1207
+ await Bun.write(rootPkgPath, JSON.stringify(rootPkg, null, 2));
1208
+
1209
+ if (input.install) {
1210
+ const { execa } = await import("execa");
1211
+ await execa("bun", ["install"], {
1212
+ cwd: configDir,
1213
+ stdio: "inherit",
1214
+ });
1215
+ }
1216
+
1217
+ return {
1218
+ status: "synced" as const,
1219
+ synced,
1220
+ };
1221
+ } catch (error) {
1222
+ return {
1223
+ status: "error" as const,
1224
+ synced: [],
1225
+ error: error instanceof Error ? error.message : "Unknown error",
1226
+ };
1227
+ }
1228
+ }),
1229
+
1039
1230
  sync: builder.sync.handler(async ({ input }) => {
1040
1231
  const { configDir, bosConfig } = deps;
1041
1232
 
package/src/types.ts CHANGED
@@ -30,6 +30,14 @@ export const GatewayConfigSchema = z.object({
30
30
  });
31
31
  export type GatewayConfig = z.infer<typeof GatewayConfigSchema>;
32
32
 
33
+ export const SharedDepConfigSchema = z.object({
34
+ requiredVersion: z.string().optional(),
35
+ singleton: z.boolean().optional(),
36
+ eager: z.boolean().optional(),
37
+ strictVersion: z.boolean().optional(),
38
+ });
39
+ export type SharedDepConfig = z.infer<typeof SharedDepConfigSchema>;
40
+
33
41
  export const BosConfigSchema = z.object({
34
42
  account: z.string(),
35
43
  gateway: GatewayConfigSchema,
@@ -38,6 +46,7 @@ export const BosConfigSchema = z.object({
38
46
  cli: z.object({
39
47
  version: z.string().optional(),
40
48
  }).optional(),
49
+ shared: z.record(z.string(), z.record(z.string(), SharedDepConfigSchema)).optional(),
41
50
  app: z.object({
42
51
  host: HostConfigSchema,
43
52
  }).catchall(z.union([HostConfigSchema, RemoteConfigSchema])),