everything-dev 0.0.12 → 0.0.13

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/plugin.ts +7 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "everything-dev",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
package/src/plugin.ts CHANGED
@@ -15,8 +15,8 @@ import {
15
15
  getRemotes,
16
16
  loadConfig,
17
17
  type RemoteConfig,
18
- setConfig,
19
- type SourceMode
18
+ type SourceMode,
19
+ setConfig
20
20
  } from "./config";
21
21
  import { bosContract } from "./contract";
22
22
  import { getBuildEnv, hasZephyrConfig, loadBosEnv, ZEPHYR_DOCS_URL } from "./lib/env";
@@ -401,16 +401,15 @@ export default createPlugin({
401
401
  const bosEnv = yield* loadBosEnv;
402
402
  const privateKey = nearPrivateKey || bosEnv.NEAR_PRIVATE_KEY;
403
403
 
404
- const rootPkgPath = `${configDir}/package.json`;
405
- const rootPkg = yield* Effect.tryPromise({
406
- try: () => Bun.file(rootPkgPath).json() as Promise<{ version: string }>,
407
- catch: (e) => new Error(`Failed to read root package.json: ${e}`),
408
- });
404
+ const cliVersion = bosConfig.cli?.version;
405
+ if (!cliVersion) {
406
+ return yield* Effect.fail(new Error("bos.config.json is missing 'cli.version'. Add it before publishing."));
407
+ }
409
408
 
410
409
  const configToPublish = {
411
410
  ...bosConfig,
412
411
  cli: {
413
- version: rootPkg.version,
412
+ version: cliVersion,
414
413
  },
415
414
  };
416
415