berget 2.2.12 → 2.2.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.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "berget",
3
- "version": "2.2.12",
3
+ "version": "2.2.13",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "berget": "dist/index.js"
@@ -51,7 +51,7 @@ function makeJwt(payload) {
51
51
  const written = files.getWrittenFiles();
52
52
  (0, vitest_1.expect)(written.has('/home/user/project/opencode.json')).toBe(true);
53
53
  const config = JSON.parse(written.get('/home/user/project/opencode.json'));
54
- (0, vitest_1.expect)(config.plugin).toContain('@bergetai/opencode-auth@1.0.21');
54
+ (0, vitest_1.expect)(config.plugin).toContain('@bergetai/opencode-auth@1.0.22');
55
55
  });
56
56
  (0, vitest_1.it)('sets up opencode globally without existing config', async () => {
57
57
  const deps = makeDeps({
@@ -179,7 +179,7 @@ function makeJwt(payload) {
179
179
  const config = JSON.parse(written.get('/home/user/project/opencode.json'));
180
180
  (0, vitest_1.expect)(config.customField).toBe('should-preserve');
181
181
  (0, vitest_1.expect)(config.plugin).toContain('other-plugin');
182
- (0, vitest_1.expect)(config.plugin).toContain('@bergetai/opencode-auth@1.0.21');
182
+ (0, vitest_1.expect)(config.plugin).toContain('@bergetai/opencode-auth@1.0.22');
183
183
  });
184
184
  (0, vitest_1.it)('preserves jsonc comments when updating', async () => {
185
185
  const deps = makeDeps({
@@ -213,14 +213,14 @@ function makeJwt(payload) {
213
213
  // Already has the exact same plugin version
214
214
  files.seed('/home/user/project/opencode.json', JSON.stringify({
215
215
  $schema: 'https://opencode.ai/config.json',
216
- plugin: ['@bergetai/opencode-auth@1.0.21'],
216
+ plugin: ['@bergetai/opencode-auth@1.0.22'],
217
217
  }, null, 2) + '\n');
218
218
  await (0, init_1.runInit)(deps);
219
219
  // Check that no write happened — content should be unchanged
220
220
  const written = files.getWrittenFiles();
221
221
  const content = written.get('/home/user/project/opencode.json');
222
222
  const config = JSON.parse(content);
223
- (0, vitest_1.expect)(config.plugin).toEqual(['@bergetai/opencode-auth@1.0.21']);
223
+ (0, vitest_1.expect)(config.plugin).toEqual(['@bergetai/opencode-auth@1.0.22']);
224
224
  (0, vitest_1.expect)(content).toContain('$schema');
225
225
  });
226
226
  (0, vitest_1.it)('preserves existing Pi settings when setting defaultProvider', async () => {
@@ -38,7 +38,7 @@ const fs_file_store_js_1 = require("./adapters/fs-file-store.js");
38
38
  const spawn_command_runner_js_1 = require("./adapters/spawn-command-runner.js");
39
39
  const auth_sync_js_1 = require("./auth-sync.js");
40
40
  const errors_1 = require("./errors");
41
- const OPENCODE_PLUGIN = '@bergetai/opencode-auth@1.0.21';
41
+ const OPENCODE_PLUGIN = '@bergetai/opencode-auth@1.0.22';
42
42
  const PI_PROVIDER = 'npm:@bergetai/pi-provider';
43
43
  const OPENCODE_PLUGIN_NAME = '@bergetai/opencode-auth';
44
44
  const PI_PROVIDER_NAME = '@bergetai/pi-provider';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "berget",
3
- "version": "2.2.12",
3
+ "version": "2.2.13",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "berget": "dist/index.js"
@@ -67,7 +67,7 @@ describe('runInit', () => {
67
67
  const written = files.getWrittenFiles();
68
68
  expect(written.has('/home/user/project/opencode.json')).toBe(true);
69
69
  const config = JSON.parse(written.get('/home/user/project/opencode.json')!);
70
- expect(config.plugin).toContain('@bergetai/opencode-auth@1.0.21');
70
+ expect(config.plugin).toContain('@bergetai/opencode-auth@1.0.22');
71
71
  });
72
72
 
73
73
  it('sets up opencode globally without existing config', async () => {
@@ -221,7 +221,7 @@ describe('runInit', () => {
221
221
  const config = JSON.parse(written.get('/home/user/project/opencode.json')!);
222
222
  expect(config.customField).toBe('should-preserve');
223
223
  expect(config.plugin).toContain('other-plugin');
224
- expect(config.plugin).toContain('@bergetai/opencode-auth@1.0.21');
224
+ expect(config.plugin).toContain('@bergetai/opencode-auth@1.0.22');
225
225
  });
226
226
 
227
227
  it('preserves jsonc comments when updating', async () => {
@@ -267,7 +267,7 @@ describe('runInit', () => {
267
267
  JSON.stringify(
268
268
  {
269
269
  $schema: 'https://opencode.ai/config.json',
270
- plugin: ['@bergetai/opencode-auth@1.0.21'],
270
+ plugin: ['@bergetai/opencode-auth@1.0.22'],
271
271
  },
272
272
  null,
273
273
  2,
@@ -280,7 +280,7 @@ describe('runInit', () => {
280
280
  const written = files.getWrittenFiles();
281
281
  const content = written.get('/home/user/project/opencode.json')!;
282
282
  const config = JSON.parse(content);
283
- expect(config.plugin).toEqual(['@bergetai/opencode-auth@1.0.21']);
283
+ expect(config.plugin).toEqual(['@bergetai/opencode-auth@1.0.22']);
284
284
  expect(content).toContain('$schema');
285
285
  });
286
286
 
@@ -16,7 +16,7 @@ import { SpawnCommandRunner } from './adapters/spawn-command-runner.js';
16
16
  import { configureAuth } from './auth-sync.js';
17
17
  import { CancelledError, CommandFailedError, PrerequisiteError } from './errors';
18
18
 
19
- const OPENCODE_PLUGIN = '@bergetai/opencode-auth@1.0.21';
19
+ const OPENCODE_PLUGIN = '@bergetai/opencode-auth@1.0.22';
20
20
  const PI_PROVIDER = 'npm:@bergetai/pi-provider';
21
21
  const OPENCODE_PLUGIN_NAME = '@bergetai/opencode-auth';
22
22
  const PI_PROVIDER_NAME = '@bergetai/pi-provider';