workos 0.14.0 → 0.15.0

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/bin.js CHANGED
@@ -188,7 +188,20 @@ yargs(rawArgs)
188
188
  // Excluded: auth/claim/install/dashboard handle their own credential flows;
189
189
  // skills/doctor/env/debug are utility commands where the warning is unnecessary.
190
190
  const command = String(argv._?.[0] ?? '');
191
- if (['auth', 'skills', 'doctor', 'env', 'claim', 'install', 'debug', 'dashboard', 'emulate', 'dev', ''].includes(command))
191
+ if ([
192
+ 'auth',
193
+ 'skills',
194
+ 'doctor',
195
+ 'env',
196
+ 'claim',
197
+ 'install',
198
+ 'debug',
199
+ 'dashboard',
200
+ 'emulate',
201
+ 'dev',
202
+ 'migrations',
203
+ '',
204
+ ].includes(command))
192
205
  return;
193
206
  await applyInsecureStorage(argv.insecureStorage);
194
207
  await maybeWarnUnclaimed();
@@ -1405,6 +1418,21 @@ yargs(rawArgs)
1405
1418
  await runDebugToken();
1406
1419
  });
1407
1420
  return yargs.demandCommand(1, 'Run "workos debug <command>" for debug tools.').strict();
1421
+ })
1422
+ .command('migrations', 'Migrate users from identity providers (Auth0, Cognito, Clerk, Firebase) to WorkOS', (yargs) => yargs
1423
+ .strictCommands(false)
1424
+ .strict(false)
1425
+ .help(false)
1426
+ .version(false)
1427
+ .options({
1428
+ ...insecureStorageOption,
1429
+ 'api-key': { type: 'string', describe: 'WorkOS API key' },
1430
+ }), async (argv) => {
1431
+ await applyInsecureStorage(argv.insecureStorage);
1432
+ const { resolveApiKey } = await import('./lib/api-key.js');
1433
+ const { getMigrationsPassthroughArgs, runMigrations } = await import('./commands/migrations.js');
1434
+ const passthrough = getMigrationsPassthroughArgs(rawArgs);
1435
+ await runMigrations(passthrough, resolveApiKey({ apiKey: argv.apiKey }));
1408
1436
  })
1409
1437
  .command('dashboard', false, // hidden from help
1410
1438
  (yargs) => yargs.options(installerOptions), async (argv) => {