signet-auth 1.2.2 → 1.2.3

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.
@@ -132,8 +132,21 @@ export class SyncEngine {
132
132
  const remoteYaml = await this.transport.readRemoteConfig(this.remote);
133
133
  let doc;
134
134
  if (remoteYaml === null) {
135
- // Create a minimal config with only providers
136
- doc = new YAML.Document({ providers: localProviders });
135
+ // Create a full config so the remote passes validation
136
+ doc = new YAML.Document({
137
+ mode: 'browserless',
138
+ browser: {
139
+ browserDataDir: '~/.signet/browser-data',
140
+ channel: 'chrome',
141
+ headlessTimeout: 30000,
142
+ visibleTimeout: 120000,
143
+ waitUntil: 'load',
144
+ },
145
+ storage: {
146
+ credentialsDir: '~/.signet/credentials',
147
+ },
148
+ providers: localProviders,
149
+ });
137
150
  }
138
151
  else {
139
152
  // Parse with Document to preserve comments
@@ -142,6 +155,24 @@ export class SyncEngine {
142
155
  // Merge: local wins on push
143
156
  const merged = { ...remoteProviders, ...localProviders };
144
157
  doc.setIn(['providers'], doc.createNode(merged));
158
+ // Ensure required sections exist so remote passes validation
159
+ if (!doc.getIn(['mode'])) {
160
+ doc.setIn(['mode'], 'browserless');
161
+ }
162
+ if (!doc.getIn(['browser'])) {
163
+ doc.setIn(['browser'], doc.createNode({
164
+ browserDataDir: '~/.signet/browser-data',
165
+ channel: 'chrome',
166
+ headlessTimeout: 30000,
167
+ visibleTimeout: 120000,
168
+ waitUntil: 'load',
169
+ }));
170
+ }
171
+ if (!doc.getIn(['storage'])) {
172
+ doc.setIn(['storage'], doc.createNode({
173
+ credentialsDir: '~/.signet/credentials',
174
+ }));
175
+ }
145
176
  }
146
177
  await this.transport.writeRemoteConfig(this.remote, doc.toString());
147
178
  return { providers: Object.keys(localProviders) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signet-auth",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "General-purpose authentication CLI with pluggable strategies and browser adapters",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",