drizzle-kit 0.30.4-c7c31ad → 0.30.4-dc3b366

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 (4) hide show
  1. package/api.js +2381 -3414
  2. package/api.mjs +2381 -3414
  3. package/bin.cjs +2492 -574
  4. package/package.json +1 -1
package/bin.cjs CHANGED
@@ -25072,7 +25072,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
25072
25072
  }
25073
25073
  convert(statement) {
25074
25074
  const { tableName, oldColumnName, newColumnName } = statement;
25075
- return `ALTER TABLE \`${tableName}\` RENAME COLUMN "${oldColumnName}" TO "${newColumnName}";`;
25075
+ return `ALTER TABLE \`${tableName}\` RENAME COLUMN \`${oldColumnName}\` TO \`${newColumnName}\`;`;
25076
25076
  }
25077
25077
  };
25078
25078
  PgAlterTableDropColumnConvertor = class extends Convertor {
@@ -25499,14 +25499,6 @@ WITH ${withCheckOption} CHECK OPTION` : "";
25499
25499
  let columnDefault = "";
25500
25500
  let columnNotNull = "";
25501
25501
  const sqlStatements = [];
25502
- const indexes = [];
25503
- for (const table5 of Object.values(json2.tables)) {
25504
- for (const index5 of Object.values(table5.indexes)) {
25505
- const unsquashed = SQLiteSquasher.unsquashIdx(index5);
25506
- sqlStatements.push(`DROP INDEX "${unsquashed.name}";`);
25507
- indexes.push({ ...unsquashed, tableName: table5.name });
25508
- }
25509
- }
25510
25502
  switch (statement.type) {
25511
25503
  case "alter_table_alter_column_set_type":
25512
25504
  columnType = ` ${statement.newDataType}`;
@@ -25536,17 +25528,8 @@ WITH ${withCheckOption} CHECK OPTION` : "";
25536
25528
  }
25537
25529
  columnDefault = columnDefault instanceof Date ? columnDefault.toISOString() : columnDefault;
25538
25530
  sqlStatements.push(
25539
- `ALTER TABLE \`${tableName}\` ALTER COLUMN "${columnName}" TO "${columnName}"${columnType}${columnNotNull}${columnDefault};`
25531
+ `ALTER TABLE \`${tableName}\` ALTER COLUMN \`${columnName}\` TO \`${columnName}\`${columnType}${columnNotNull}${columnDefault};`
25540
25532
  );
25541
- for (const index5 of indexes) {
25542
- const indexPart = index5.isUnique ? "UNIQUE INDEX" : "INDEX";
25543
- const whereStatement = index5.where ? ` WHERE ${index5.where}` : "";
25544
- const uniqueString = index5.columns.map((it) => `\`${it}\``).join(",");
25545
- const tableName2 = index5.tableName;
25546
- sqlStatements.push(
25547
- `CREATE ${indexPart} \`${index5.name}\` ON \`${tableName2}\` (${uniqueString})${whereStatement};`
25548
- );
25549
- }
25550
25533
  return sqlStatements;
25551
25534
  }
25552
25535
  };
@@ -26037,7 +26020,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
26037
26020
  const columnTypeValue = columnType ? ` ${columnType}` : "";
26038
26021
  const columnFrom = columnsFrom[0];
26039
26022
  const columnTo = columnsTo[0];
26040
- return `ALTER TABLE \`${tableFrom}\` ALTER COLUMN "${columnFrom}" TO "${columnFrom}"${columnTypeValue}${columnNotNullValue}${columnsDefaultValue} REFERENCES ${tableTo}(${columnTo})${onDeleteStatement}${onUpdateStatement};`;
26023
+ return `ALTER TABLE \`${tableFrom}\` ALTER COLUMN \`${columnFrom}\` TO \`${columnFrom}\`${columnTypeValue}${columnNotNullValue}${columnsDefaultValue} REFERENCES ${tableTo}(${columnTo})${onDeleteStatement}${onUpdateStatement};`;
26041
26024
  }
26042
26025
  };
26043
26026
  MySqlCreateForeignKeyConvertor = class extends Convertor {
@@ -26290,12 +26273,14 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
26290
26273
  can(statement, dialect6) {
26291
26274
  return statement.type === "recreate_table" && dialect6 === "sqlite";
26292
26275
  }
26293
- convert(statement) {
26294
- const { tableName, columns, compositePKs, referenceData, checkConstraints } = statement;
26295
- const columnNames = columns.map((it) => `"${it.name}"`).join(", ");
26276
+ convert(statement, json2, action, dataLoss) {
26277
+ const { tableName, columns, compositePKs, referenceData, checkConstraints, columnsToTransfer } = statement;
26278
+ const columnNames = columnsToTransfer.map((it) => `\`${it}\``).join(", ");
26296
26279
  const newTableName = `__new_${tableName}`;
26297
26280
  const sqlStatements = [];
26298
- sqlStatements.push(`PRAGMA foreign_keys=OFF;`);
26281
+ if (action !== "push") {
26282
+ sqlStatements.push(`PRAGMA foreign_keys=OFF;`);
26283
+ }
26299
26284
  const mappedCheckConstraints = checkConstraints.map(
26300
26285
  (it) => it.replaceAll(`"${tableName}".`, `"${newTableName}".`).replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`).replaceAll(`${tableName}.`, `${newTableName}.`).replaceAll(`'${tableName}'.`, `'${newTableName}'.`)
26301
26286
  );
@@ -26309,9 +26294,11 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
26309
26294
  checkConstraints: mappedCheckConstraints
26310
26295
  })
26311
26296
  );
26312
- sqlStatements.push(
26313
- `INSERT INTO \`${newTableName}\`(${columnNames}) SELECT ${columnNames} FROM \`${tableName}\`;`
26314
- );
26297
+ if (!dataLoss) {
26298
+ sqlStatements.push(
26299
+ `INSERT INTO \`${newTableName}\`(${columnNames}) SELECT ${columnNames} FROM \`${tableName}\`;`
26300
+ );
26301
+ }
26315
26302
  sqlStatements.push(
26316
26303
  new SQLiteDropTableConvertor().convert({
26317
26304
  type: "drop_table",
@@ -26328,7 +26315,9 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
26328
26315
  type: "rename_table"
26329
26316
  })
26330
26317
  );
26331
- sqlStatements.push(`PRAGMA foreign_keys=ON;`);
26318
+ if (action !== "push") {
26319
+ sqlStatements.push(`PRAGMA foreign_keys=ON;`);
26320
+ }
26332
26321
  return sqlStatements;
26333
26322
  }
26334
26323
  };
@@ -26336,15 +26325,16 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
26336
26325
  can(statement, dialect6) {
26337
26326
  return statement.type === "recreate_table" && dialect6 === "turso";
26338
26327
  }
26339
- convert(statement) {
26340
- const { tableName, columns, compositePKs, referenceData, checkConstraints } = statement;
26341
- const columnNames = columns.map((it) => `"${it.name}"`).join(", ");
26328
+ convert(statement, json2, action, dataLoss) {
26329
+ const { tableName, columns, compositePKs, referenceData, checkConstraints, columnsToTransfer } = statement;
26330
+ const columnNames = columnsToTransfer.map((it) => `\`${it}\``).join(", ");
26342
26331
  const newTableName = `__new_${tableName}`;
26343
26332
  const sqlStatements = [];
26344
26333
  const mappedCheckConstraints = checkConstraints.map(
26345
26334
  (it) => it.replaceAll(`"${tableName}".`, `"${newTableName}".`).replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`).replaceAll(`${tableName}.`, `${newTableName}.`).replaceAll(`'${tableName}'.`, `\`${newTableName}\`.`)
26346
26335
  );
26347
- sqlStatements.push(`PRAGMA foreign_keys=OFF;`);
26336
+ if (action !== "push")
26337
+ sqlStatements.push(`PRAGMA foreign_keys=OFF;`);
26348
26338
  sqlStatements.push(
26349
26339
  new SQLiteCreateTableConvertor().convert({
26350
26340
  type: "sqlite_create_table",
@@ -26355,9 +26345,11 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
26355
26345
  checkConstraints: mappedCheckConstraints
26356
26346
  })
26357
26347
  );
26358
- sqlStatements.push(
26359
- `INSERT INTO \`${newTableName}\`(${columnNames}) SELECT ${columnNames} FROM \`${tableName}\`;`
26360
- );
26348
+ if (!dataLoss) {
26349
+ sqlStatements.push(
26350
+ `INSERT INTO \`${newTableName}\`(${columnNames}) SELECT ${columnNames} FROM \`${tableName}\`;`
26351
+ );
26352
+ }
26361
26353
  sqlStatements.push(
26362
26354
  new SQLiteDropTableConvertor().convert({
26363
26355
  type: "drop_table",
@@ -26374,7 +26366,8 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
26374
26366
  type: "rename_table"
26375
26367
  })
26376
26368
  );
26377
- sqlStatements.push(`PRAGMA foreign_keys=ON;`);
26369
+ if (action !== "push")
26370
+ sqlStatements.push(`PRAGMA foreign_keys=ON;`);
26378
26371
  return sqlStatements;
26379
26372
  }
26380
26373
  };
@@ -26382,9 +26375,9 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
26382
26375
  can(statement, dialect6) {
26383
26376
  return statement.type === "singlestore_recreate_table" && dialect6 === "singlestore";
26384
26377
  }
26385
- convert(statement) {
26386
- const { tableName, columns, compositePKs, uniqueConstraints } = statement;
26387
- const columnNames = columns.map((it) => `\`${it.name}\``).join(", ");
26378
+ convert(statement, json2, action, dataLoss) {
26379
+ const { tableName, columns, compositePKs, uniqueConstraints, columnsToTransfer } = statement;
26380
+ const columnNames = columnsToTransfer.map((it) => `\`${it}\``).join(", ");
26388
26381
  const newTableName = `__new_${tableName}`;
26389
26382
  const sqlStatements = [];
26390
26383
  sqlStatements.push(
@@ -26397,9 +26390,11 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
26397
26390
  schema: ""
26398
26391
  })
26399
26392
  );
26400
- sqlStatements.push(
26401
- `INSERT INTO \`${newTableName}\`(${columnNames}) SELECT ${columnNames} FROM \`${tableName}\`;`
26402
- );
26393
+ if (!dataLoss) {
26394
+ sqlStatements.push(
26395
+ `INSERT INTO \`${newTableName}\`(${columnNames}) SELECT ${columnNames} FROM \`${tableName}\`;`
26396
+ );
26397
+ }
26403
26398
  sqlStatements.push(
26404
26399
  new SingleStoreDropTableConvertor().convert({
26405
26400
  type: "drop_table",
@@ -26575,7 +26570,7 @@ drop type __venum;
26575
26570
  });
26576
26571
 
26577
26572
  // src/cli/commands/sqlitePushUtils.ts
26578
- var _moveDataStatements, getOldTableName, getNewTableName, logSuggestionsAndReturn;
26573
+ var getOldTableName, getNewTableName, logSuggestionsAndReturn;
26579
26574
  var init_sqlitePushUtils = __esm({
26580
26575
  "src/cli/commands/sqlitePushUtils.ts"() {
26581
26576
  "use strict";
@@ -26583,67 +26578,6 @@ var init_sqlitePushUtils = __esm({
26583
26578
  init_sqliteSchema();
26584
26579
  init_sqlgenerator();
26585
26580
  init_utils2();
26586
- _moveDataStatements = (tableName, json, dataLoss = false) => {
26587
- const statements = [];
26588
- const newTableName = `__new_${tableName}`;
26589
- const tableColumns = Object.values(json.tables[tableName].columns);
26590
- const referenceData = Object.values(json.tables[tableName].foreignKeys);
26591
- const compositePKs = Object.values(
26592
- json.tables[tableName].compositePrimaryKeys
26593
- ).map((it) => SQLiteSquasher.unsquashPK(it));
26594
- const checkConstraints = Object.values(json.tables[tableName].checkConstraints);
26595
- const mappedCheckConstraints = checkConstraints.map(
26596
- (it) => it.replaceAll(`"${tableName}".`, `"${newTableName}".`).replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`).replaceAll(`${tableName}.`, `${newTableName}.`).replaceAll(`'${tableName}'.`, `\`${newTableName}\`.`)
26597
- );
26598
- const fks = referenceData.map((it) => SQLiteSquasher.unsquashPushFK(it));
26599
- statements.push(
26600
- new SQLiteCreateTableConvertor().convert({
26601
- type: "sqlite_create_table",
26602
- tableName: newTableName,
26603
- columns: tableColumns,
26604
- referenceData: fks,
26605
- compositePKs,
26606
- checkConstraints: mappedCheckConstraints
26607
- })
26608
- );
26609
- if (!dataLoss) {
26610
- const columns = Object.keys(json.tables[tableName].columns).map(
26611
- (c) => `"${c}"`
26612
- );
26613
- statements.push(
26614
- `INSERT INTO \`${newTableName}\`(${columns.join(
26615
- ", "
26616
- )}) SELECT ${columns.join(", ")} FROM \`${tableName}\`;`
26617
- );
26618
- }
26619
- statements.push(
26620
- new SQLiteDropTableConvertor().convert({
26621
- type: "drop_table",
26622
- tableName,
26623
- schema: ""
26624
- })
26625
- );
26626
- statements.push(
26627
- new SqliteRenameTableConvertor().convert({
26628
- fromSchema: "",
26629
- tableNameFrom: newTableName,
26630
- tableNameTo: tableName,
26631
- toSchema: "",
26632
- type: "rename_table"
26633
- })
26634
- );
26635
- for (const idx of Object.values(json.tables[tableName].indexes)) {
26636
- statements.push(
26637
- new CreateSqliteIndexConvertor().convert({
26638
- type: "create_index",
26639
- tableName,
26640
- schema: "",
26641
- data: idx
26642
- })
26643
- );
26644
- }
26645
- return statements;
26646
- };
26647
26581
  getOldTableName = (tableName, meta) => {
26648
26582
  for (const key of Object.keys(meta.tables)) {
26649
26583
  const value = meta.tables[key];
@@ -26783,14 +26717,18 @@ var init_sqlitePushUtils = __esm({
26783
26717
  tablesReferencingCurrent.push(...tablesRefs);
26784
26718
  }
26785
26719
  if (!tablesReferencingCurrent.length) {
26786
- statementsToExecute.push(..._moveDataStatements(tableName, json2, dataLoss));
26720
+ statementsToExecute.push(
26721
+ ...new SQLiteRecreateTableConvertor().convert(statement, void 0, "push", dataLoss)
26722
+ );
26787
26723
  continue;
26788
26724
  }
26789
26725
  const [{ foreign_keys: pragmaState }] = await connection.query(`PRAGMA foreign_keys;`);
26790
26726
  if (pragmaState) {
26791
26727
  statementsToExecute.push(`PRAGMA foreign_keys=OFF;`);
26792
26728
  }
26793
- statementsToExecute.push(..._moveDataStatements(tableName, json2, dataLoss));
26729
+ statementsToExecute.push(
26730
+ ...new SQLiteRecreateTableConvertor().convert(statement, void 0, "push", dataLoss)
26731
+ );
26794
26732
  if (pragmaState) {
26795
26733
  statementsToExecute.push(`PRAGMA foreign_keys=ON;`);
26796
26734
  }
@@ -28438,20 +28376,23 @@ var init_statementCombiner = __esm({
28438
28376
  "use strict";
28439
28377
  init_jsonStatements();
28440
28378
  init_sqliteSchema();
28441
- prepareLibSQLRecreateTable = (table5, action) => {
28442
- const { name, columns, uniqueConstraints, indexes, checkConstraints } = table5;
28443
- const composites = Object.values(table5.compositePrimaryKeys).map(
28379
+ prepareLibSQLRecreateTable = (currTable, prevTable, action) => {
28380
+ const { name, columns, uniqueConstraints, indexes, checkConstraints } = currTable;
28381
+ const composites = Object.values(currTable.compositePrimaryKeys).map(
28444
28382
  (it) => SQLiteSquasher.unsquashPK(it)
28445
28383
  );
28446
- const references2 = Object.values(table5.foreignKeys);
28384
+ const references2 = Object.values(currTable.foreignKeys);
28447
28385
  const fks = references2.map(
28448
28386
  (it) => action === "push" ? SQLiteSquasher.unsquashPushFK(it) : SQLiteSquasher.unsquashFK(it)
28449
28387
  );
28388
+ const prevColumns = prevTable.columns;
28389
+ const columnsToTransfer = Object.keys(currTable.columns).filter((key) => prevColumns[key] !== void 0);
28450
28390
  const statements = [
28451
28391
  {
28452
28392
  type: "recreate_table",
28453
28393
  tableName: name,
28454
28394
  columns: Object.values(columns),
28395
+ columnsToTransfer,
28455
28396
  compositePKs: composites,
28456
28397
  referenceData: fks,
28457
28398
  uniqueConstraints: Object.values(uniqueConstraints),
@@ -28463,20 +28404,23 @@ var init_statementCombiner = __esm({
28463
28404
  }
28464
28405
  return statements;
28465
28406
  };
28466
- prepareSQLiteRecreateTable = (table5, action) => {
28467
- const { name, columns, uniqueConstraints, indexes, checkConstraints } = table5;
28468
- const composites = Object.values(table5.compositePrimaryKeys).map(
28407
+ prepareSQLiteRecreateTable = (currTable, prevTable, action) => {
28408
+ const { name, columns, uniqueConstraints, indexes, checkConstraints } = currTable;
28409
+ const composites = Object.values(currTable.compositePrimaryKeys).map(
28469
28410
  (it) => SQLiteSquasher.unsquashPK(it)
28470
28411
  );
28471
- const references2 = Object.values(table5.foreignKeys);
28412
+ const references2 = Object.values(currTable.foreignKeys);
28472
28413
  const fks = references2.map(
28473
28414
  (it) => action === "push" ? SQLiteSquasher.unsquashPushFK(it) : SQLiteSquasher.unsquashFK(it)
28474
28415
  );
28416
+ const prevColumns = prevTable.columns;
28417
+ const columnsToTransfer = Object.keys(currTable.columns).filter((key) => prevColumns[key] !== void 0);
28475
28418
  const statements = [
28476
28419
  {
28477
28420
  type: "recreate_table",
28478
28421
  tableName: name,
28479
28422
  columns: Object.values(columns),
28423
+ columnsToTransfer,
28480
28424
  compositePKs: composites,
28481
28425
  referenceData: fks,
28482
28426
  uniqueConstraints: Object.values(uniqueConstraints),
@@ -28488,19 +28432,25 @@ var init_statementCombiner = __esm({
28488
28432
  }
28489
28433
  return statements;
28490
28434
  };
28491
- libSQLCombineStatements = (statements, json2, action) => {
28435
+ libSQLCombineStatements = (statements, json2, json1, action) => {
28492
28436
  const newStatements = {};
28493
28437
  for (const statement of statements) {
28494
28438
  if (statement.type === "alter_table_alter_column_drop_autoincrement" || statement.type === "alter_table_alter_column_set_autoincrement" || statement.type === "alter_table_alter_column_drop_pk" || statement.type === "alter_table_alter_column_set_pk" || statement.type === "create_composite_pk" || statement.type === "alter_composite_pk" || statement.type === "delete_composite_pk" || statement.type === "create_check_constraint" || statement.type === "delete_check_constraint") {
28495
28439
  const tableName2 = statement.tableName;
28496
28440
  const statementsForTable2 = newStatements[tableName2];
28497
28441
  if (!statementsForTable2) {
28498
- newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
28442
+ newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], json1.tables[tableName2], action);
28499
28443
  continue;
28500
28444
  }
28501
28445
  if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28502
- const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28503
- const preparedStatements = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
28446
+ const wasRename = statementsForTable2.some(
28447
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28448
+ );
28449
+ const preparedStatements = prepareLibSQLRecreateTable(
28450
+ json2.tables[tableName2],
28451
+ json1.tables[tableName2],
28452
+ action
28453
+ );
28504
28454
  if (wasRename) {
28505
28455
  newStatements[tableName2].push(...preparedStatements);
28506
28456
  } else {
@@ -28520,13 +28470,19 @@ var init_statementCombiner = __esm({
28520
28470
  });
28521
28471
  const statementsForTable2 = newStatements[tableName2];
28522
28472
  if (!statementsForTable2 && (columnIsPartOfForeignKey || columnPk)) {
28523
- newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
28473
+ newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], json1.tables[tableName2], action);
28524
28474
  continue;
28525
28475
  }
28526
28476
  if (statementsForTable2 && (columnIsPartOfForeignKey || columnPk)) {
28527
28477
  if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28528
- const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28529
- const preparedStatements = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
28478
+ const wasRename = statementsForTable2.some(
28479
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28480
+ );
28481
+ const preparedStatements = prepareLibSQLRecreateTable(
28482
+ json2.tables[tableName2],
28483
+ json1.tables[tableName2],
28484
+ action
28485
+ );
28530
28486
  if (wasRename) {
28531
28487
  newStatements[tableName2].push(...preparedStatements);
28532
28488
  } else {
@@ -28549,7 +28505,7 @@ var init_statementCombiner = __esm({
28549
28505
  const data = action === "push" ? SQLiteSquasher.unsquashPushFK(statement.data) : SQLiteSquasher.unsquashFK(statement.data);
28550
28506
  const statementsForTable2 = newStatements[tableName2];
28551
28507
  if (!statementsForTable2) {
28552
- newStatements[tableName2] = statement.isMulticolumn ? prepareLibSQLRecreateTable(json2.tables[tableName2], action) : [statement];
28508
+ newStatements[tableName2] = statement.isMulticolumn ? prepareLibSQLRecreateTable(json2.tables[tableName2], json1.tables[tableName2], action) : [statement];
28553
28509
  continue;
28554
28510
  }
28555
28511
  if (!statement.isMulticolumn && statementsForTable2.some(
@@ -28559,8 +28515,14 @@ var init_statementCombiner = __esm({
28559
28515
  }
28560
28516
  if (statement.isMulticolumn) {
28561
28517
  if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28562
- const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28563
- const preparedStatements = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
28518
+ const wasRename = statementsForTable2.some(
28519
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28520
+ );
28521
+ const preparedStatements = prepareLibSQLRecreateTable(
28522
+ json2.tables[tableName2],
28523
+ json1.tables[tableName2],
28524
+ action
28525
+ );
28564
28526
  if (wasRename) {
28565
28527
  newStatements[tableName2].push(...preparedStatements);
28566
28528
  } else {
@@ -28579,12 +28541,18 @@ var init_statementCombiner = __esm({
28579
28541
  const tableName2 = statement.tableName;
28580
28542
  const statementsForTable2 = newStatements[tableName2];
28581
28543
  if (!statementsForTable2) {
28582
- newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
28544
+ newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], json1.tables[tableName2], action);
28583
28545
  continue;
28584
28546
  }
28585
28547
  if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28586
- const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28587
- const preparedStatements = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
28548
+ const wasRename = statementsForTable2.some(
28549
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28550
+ );
28551
+ const preparedStatements = prepareLibSQLRecreateTable(
28552
+ json2.tables[tableName2],
28553
+ json1.tables[tableName2],
28554
+ action
28555
+ );
28588
28556
  if (wasRename) {
28589
28557
  newStatements[tableName2].push(...preparedStatements);
28590
28558
  } else {
@@ -28598,12 +28566,18 @@ var init_statementCombiner = __esm({
28598
28566
  const tableName2 = statement.tableName;
28599
28567
  const statementsForTable2 = newStatements[tableName2];
28600
28568
  if (!statementsForTable2) {
28601
- newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
28569
+ newStatements[tableName2] = prepareLibSQLRecreateTable(json2.tables[tableName2], json1.tables[tableName2], action);
28602
28570
  continue;
28603
28571
  }
28604
28572
  if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28605
- const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28606
- const preparedStatements = prepareLibSQLRecreateTable(json2.tables[tableName2], action);
28573
+ const wasRename = statementsForTable2.some(
28574
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28575
+ );
28576
+ const preparedStatements = prepareLibSQLRecreateTable(
28577
+ json2.tables[tableName2],
28578
+ json1.tables[tableName2],
28579
+ action
28580
+ );
28607
28581
  if (wasRename) {
28608
28582
  newStatements[tableName2].push(...preparedStatements);
28609
28583
  } else {
@@ -28626,22 +28600,31 @@ var init_statementCombiner = __esm({
28626
28600
  const combinedStatements = Object.values(newStatements).flat();
28627
28601
  const renamedTables = combinedStatements.filter((it) => it.type === "rename_table");
28628
28602
  const renamedColumns = combinedStatements.filter((it) => it.type === "alter_table_rename_column");
28629
- const rest = combinedStatements.filter((it) => it.type !== "rename_table" && it.type !== "alter_table_rename_column");
28630
- return [...renamedTables, ...renamedColumns, ...rest];
28603
+ const dropViews = combinedStatements.filter((it) => it.type === "drop_view");
28604
+ const rest = combinedStatements.filter(
28605
+ (it) => it.type !== "rename_table" && it.type !== "alter_table_rename_column" && it.type !== "drop_view"
28606
+ );
28607
+ return [...dropViews, ...renamedTables, ...renamedColumns, ...rest];
28631
28608
  };
28632
- sqliteCombineStatements = (statements, json2, action) => {
28609
+ sqliteCombineStatements = (statements, json2, json1, action) => {
28633
28610
  const newStatements = {};
28634
28611
  for (const statement of statements) {
28635
28612
  if (statement.type === "alter_table_alter_column_set_type" || statement.type === "alter_table_alter_column_set_default" || statement.type === "alter_table_alter_column_drop_default" || statement.type === "alter_table_alter_column_set_notnull" || statement.type === "alter_table_alter_column_drop_notnull" || statement.type === "alter_table_alter_column_drop_autoincrement" || statement.type === "alter_table_alter_column_set_autoincrement" || statement.type === "alter_table_alter_column_drop_pk" || statement.type === "alter_table_alter_column_set_pk" || statement.type === "delete_reference" || statement.type === "alter_reference" || statement.type === "create_composite_pk" || statement.type === "alter_composite_pk" || statement.type === "delete_composite_pk" || statement.type === "create_unique_constraint" || statement.type === "delete_unique_constraint" || statement.type === "create_check_constraint" || statement.type === "delete_check_constraint") {
28636
28613
  const tableName2 = statement.tableName;
28637
28614
  const statementsForTable2 = newStatements[tableName2];
28638
28615
  if (!statementsForTable2) {
28639
- newStatements[tableName2] = prepareSQLiteRecreateTable(json2.tables[tableName2], action);
28616
+ newStatements[tableName2] = prepareSQLiteRecreateTable(json2.tables[tableName2], json1.tables[tableName2], action);
28640
28617
  continue;
28641
28618
  }
28642
28619
  if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28643
- const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28644
- const preparedStatements = prepareSQLiteRecreateTable(json2.tables[tableName2], action);
28620
+ const wasRename = statementsForTable2.some(
28621
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28622
+ );
28623
+ const preparedStatements = prepareSQLiteRecreateTable(
28624
+ json2.tables[tableName2],
28625
+ json1.tables[tableName2],
28626
+ action
28627
+ );
28645
28628
  if (wasRename) {
28646
28629
  newStatements[tableName2].push(...preparedStatements);
28647
28630
  } else {
@@ -28655,12 +28638,18 @@ var init_statementCombiner = __esm({
28655
28638
  const tableName2 = statement.tableName;
28656
28639
  const statementsForTable2 = newStatements[tableName2];
28657
28640
  if (!statementsForTable2) {
28658
- newStatements[tableName2] = prepareSQLiteRecreateTable(json2.tables[tableName2], action);
28641
+ newStatements[tableName2] = prepareSQLiteRecreateTable(json2.tables[tableName2], json1.tables[tableName2], action);
28659
28642
  continue;
28660
28643
  }
28661
28644
  if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28662
- const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28663
- const preparedStatements = prepareSQLiteRecreateTable(json2.tables[tableName2], action);
28645
+ const wasRename = statementsForTable2.some(
28646
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28647
+ );
28648
+ const preparedStatements = prepareSQLiteRecreateTable(
28649
+ json2.tables[tableName2],
28650
+ json1.tables[tableName2],
28651
+ action
28652
+ );
28664
28653
  if (wasRename) {
28665
28654
  newStatements[tableName2].push(...preparedStatements);
28666
28655
  } else {
@@ -28675,7 +28664,7 @@ var init_statementCombiner = __esm({
28675
28664
  const data = action === "push" ? SQLiteSquasher.unsquashPushFK(statement.data) : SQLiteSquasher.unsquashFK(statement.data);
28676
28665
  const statementsForTable2 = newStatements[tableName2];
28677
28666
  if (!statementsForTable2) {
28678
- newStatements[tableName2] = prepareSQLiteRecreateTable(json2.tables[tableName2], action);
28667
+ newStatements[tableName2] = prepareSQLiteRecreateTable(json2.tables[tableName2], json1.tables[tableName2], action);
28679
28668
  continue;
28680
28669
  }
28681
28670
  if (data.columnsFrom.length === 1 && statementsForTable2.some(
@@ -28684,8 +28673,14 @@ var init_statementCombiner = __esm({
28684
28673
  continue;
28685
28674
  }
28686
28675
  if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28687
- const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28688
- const preparedStatements = prepareSQLiteRecreateTable(json2.tables[tableName2], action);
28676
+ const wasRename = statementsForTable2.some(
28677
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28678
+ );
28679
+ const preparedStatements = prepareSQLiteRecreateTable(
28680
+ json2.tables[tableName2],
28681
+ json1.tables[tableName2],
28682
+ action
28683
+ );
28689
28684
  if (wasRename) {
28690
28685
  newStatements[tableName2].push(...preparedStatements);
28691
28686
  } else {
@@ -28708,17 +28703,23 @@ var init_statementCombiner = __esm({
28708
28703
  const combinedStatements = Object.values(newStatements).flat();
28709
28704
  const renamedTables = combinedStatements.filter((it) => it.type === "rename_table");
28710
28705
  const renamedColumns = combinedStatements.filter((it) => it.type === "alter_table_rename_column");
28711
- const rest = combinedStatements.filter((it) => it.type !== "rename_table" && it.type !== "alter_table_rename_column");
28712
- return [...renamedTables, ...renamedColumns, ...rest];
28706
+ const dropViews = combinedStatements.filter((it) => it.type === "drop_view");
28707
+ const rest = combinedStatements.filter(
28708
+ (it) => it.type !== "rename_table" && it.type !== "alter_table_rename_column" && it.type !== "drop_view"
28709
+ );
28710
+ return [...dropViews, ...renamedTables, ...renamedColumns, ...rest];
28713
28711
  };
28714
- prepareSingleStoreRecreateTable = (table5) => {
28715
- const { name, columns, uniqueConstraints, indexes, compositePrimaryKeys } = table5;
28712
+ prepareSingleStoreRecreateTable = (currTable, prevTable) => {
28713
+ const { name, columns, uniqueConstraints, indexes, compositePrimaryKeys } = currTable;
28716
28714
  const composites = Object.values(compositePrimaryKeys);
28715
+ const prevColumns = prevTable.columns;
28716
+ const columnsToTransfer = Object.keys(currTable.columns).filter((key) => prevColumns[key] !== void 0);
28717
28717
  const statements = [
28718
28718
  {
28719
28719
  type: "singlestore_recreate_table",
28720
28720
  tableName: name,
28721
28721
  columns: Object.values(columns),
28722
+ columnsToTransfer,
28722
28723
  compositePKs: composites,
28723
28724
  uniqueConstraints: Object.values(uniqueConstraints)
28724
28725
  }
@@ -28728,21 +28729,24 @@ var init_statementCombiner = __esm({
28728
28729
  }
28729
28730
  return statements;
28730
28731
  };
28731
- singleStoreCombineStatements = (statements, json2) => {
28732
+ singleStoreCombineStatements = (statements, json2, json1) => {
28732
28733
  const newStatements = {};
28733
28734
  for (const statement of statements) {
28734
28735
  if (statement.type === "alter_table_alter_column_set_type" || statement.type === "alter_table_alter_column_set_notnull" || statement.type === "alter_table_alter_column_drop_notnull" || statement.type === "alter_table_alter_column_drop_autoincrement" || statement.type === "alter_table_alter_column_set_autoincrement" || statement.type === "alter_table_alter_column_drop_pk" || statement.type === "alter_table_alter_column_set_pk" || statement.type === "create_composite_pk" || statement.type === "alter_composite_pk" || statement.type === "delete_composite_pk") {
28735
28736
  const tableName2 = statement.tableName;
28736
28737
  const statementsForTable2 = newStatements[tableName2];
28737
28738
  if (!statementsForTable2) {
28738
- newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28739
+ newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2], json1.tables[tableName2]);
28739
28740
  continue;
28740
28741
  }
28741
- if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28742
+ if (!statementsForTable2.some(({ type }) => type === "singlestore_recreate_table")) {
28742
28743
  const wasRename = statementsForTable2.some(
28743
28744
  ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28744
28745
  );
28745
- const preparedStatements = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28746
+ const preparedStatements = prepareSingleStoreRecreateTable(
28747
+ json2.tables[tableName2],
28748
+ json1.tables[tableName2]
28749
+ );
28746
28750
  if (wasRename) {
28747
28751
  newStatements[tableName2].push(...preparedStatements);
28748
28752
  } else {
@@ -28756,12 +28760,17 @@ var init_statementCombiner = __esm({
28756
28760
  const tableName2 = statement.tableName;
28757
28761
  const statementsForTable2 = newStatements[tableName2];
28758
28762
  if (!statementsForTable2) {
28759
- newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28763
+ newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2], json1.tables[tableName2]);
28760
28764
  continue;
28761
28765
  }
28762
- if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28763
- const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28764
- const preparedStatements = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28766
+ if (!statementsForTable2.some(({ type }) => type === "singlestore_recreate_table")) {
28767
+ const wasRename = statementsForTable2.some(
28768
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28769
+ );
28770
+ const preparedStatements = prepareSingleStoreRecreateTable(
28771
+ json2.tables[tableName2],
28772
+ json1.tables[tableName2]
28773
+ );
28765
28774
  if (wasRename) {
28766
28775
  newStatements[tableName2].push(...preparedStatements);
28767
28776
  } else {
@@ -28775,12 +28784,17 @@ var init_statementCombiner = __esm({
28775
28784
  const tableName2 = statement.tableName;
28776
28785
  const statementsForTable2 = newStatements[tableName2];
28777
28786
  if (!statementsForTable2) {
28778
- newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28787
+ newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2], json1.tables[tableName2]);
28779
28788
  continue;
28780
28789
  }
28781
- if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28782
- const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28783
- const preparedStatements = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28790
+ if (!statementsForTable2.some(({ type }) => type === "singlestore_recreate_table")) {
28791
+ const wasRename = statementsForTable2.some(
28792
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28793
+ );
28794
+ const preparedStatements = prepareSingleStoreRecreateTable(
28795
+ json2.tables[tableName2],
28796
+ json1.tables[tableName2]
28797
+ );
28784
28798
  if (wasRename) {
28785
28799
  newStatements[tableName2].push(...preparedStatements);
28786
28800
  } else {
@@ -28803,8 +28817,11 @@ var init_statementCombiner = __esm({
28803
28817
  const combinedStatements = Object.values(newStatements).flat();
28804
28818
  const renamedTables = combinedStatements.filter((it) => it.type === "rename_table");
28805
28819
  const renamedColumns = combinedStatements.filter((it) => it.type === "alter_table_rename_column");
28806
- const rest = combinedStatements.filter((it) => it.type !== "rename_table" && it.type !== "alter_table_rename_column");
28807
- return [...renamedTables, ...renamedColumns, ...rest];
28820
+ const dropViews = combinedStatements.filter((it) => it.type === "drop_view");
28821
+ const rest = combinedStatements.filter(
28822
+ (it) => it.type !== "rename_table" && it.type !== "alter_table_rename_column" && it.type !== "drop_view"
28823
+ );
28824
+ return [...dropViews, ...renamedTables, ...renamedColumns, ...rest];
28808
28825
  };
28809
28826
  }
28810
28827
  });
@@ -30879,7 +30896,7 @@ var init_snapshotsDiffer = __esm({
30879
30896
  jsonStatements.push(...jsonDropColumnsStatemets);
30880
30897
  jsonStatements.push(...jsonAddedCompositePKs);
30881
30898
  jsonStatements.push(...jsonAlteredUniqueConstraints);
30882
- const combinedJsonStatements = singleStoreCombineStatements(jsonStatements, json2);
30899
+ const combinedJsonStatements = singleStoreCombineStatements(jsonStatements, json2, columnsPatchedSnap1);
30883
30900
  const sqlStatements = fromJson(combinedJsonStatements, "singlestore");
30884
30901
  const uniqueSqlStatements = [];
30885
30902
  sqlStatements.forEach((ss) => {
@@ -31276,7 +31293,7 @@ var init_snapshotsDiffer = __esm({
31276
31293
  jsonStatements.push(...jsonAlteredUniqueConstraints);
31277
31294
  jsonStatements.push(...dropViews);
31278
31295
  jsonStatements.push(...createViews);
31279
- const combinedJsonStatements = sqliteCombineStatements(jsonStatements, json2, action);
31296
+ const combinedJsonStatements = sqliteCombineStatements(jsonStatements, json2, columnsPatchedSnap1, action);
31280
31297
  const sqlStatements = fromJson(combinedJsonStatements, "sqlite");
31281
31298
  const uniqueSqlStatements = [];
31282
31299
  sqlStatements.forEach((ss) => {
@@ -31654,7 +31671,7 @@ var init_snapshotsDiffer = __esm({
31654
31671
  jsonStatements.push(...jsonDropColumnsStatemets);
31655
31672
  jsonStatements.push(...jsonAlteredCompositePKs);
31656
31673
  jsonStatements.push(...jsonAlteredUniqueConstraints);
31657
- const combinedJsonStatements = libSQLCombineStatements(jsonStatements, json2, action);
31674
+ const combinedJsonStatements = libSQLCombineStatements(jsonStatements, json2, columnsPatchedSnap1, action);
31658
31675
  const sqlStatements = fromJson(
31659
31676
  combinedJsonStatements,
31660
31677
  "turso",
@@ -35938,7 +35955,7 @@ var init_utils5 = __esm({
35938
35955
  assertOrmCoreVersion = async () => {
35939
35956
  try {
35940
35957
  const { compatibilityVersion } = await import("drizzle-orm/version");
35941
- await import("drizzle-orm/_relations");
35958
+ await import("drizzle-orm/relations");
35942
35959
  if (compatibilityVersion && compatibilityVersion === requiredApiVersion) {
35943
35960
  return;
35944
35961
  }
@@ -58957,9 +58974,9 @@ var require_dist_cjs46 = __commonJS({
58957
58974
  }
58958
58975
  });
58959
58976
 
58960
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js
58977
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js
58961
58978
  var require_httpAuthSchemeProvider3 = __commonJS({
58962
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
58979
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
58963
58980
  "use strict";
58964
58981
  Object.defineProperty(exports2, "__esModule", { value: true });
58965
58982
  exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOOIDCHttpAuthSchemeProvider = exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;
@@ -59026,9 +59043,9 @@ var require_httpAuthSchemeProvider3 = __commonJS({
59026
59043
  }
59027
59044
  });
59028
59045
 
59029
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
59046
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
59030
59047
  var require_package4 = __commonJS({
59031
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"(exports2, module2) {
59048
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"(exports2, module2) {
59032
59049
  module2.exports = {
59033
59050
  name: "@aws-sdk/client-sso-oidc",
59034
59051
  description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
@@ -59132,9 +59149,9 @@ var require_package4 = __commonJS({
59132
59149
  }
59133
59150
  });
59134
59151
 
59135
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js
59152
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js
59136
59153
  var require_ruleset2 = __commonJS({
59137
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports2) {
59154
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports2) {
59138
59155
  "use strict";
59139
59156
  Object.defineProperty(exports2, "__esModule", { value: true });
59140
59157
  exports2.ruleSet = void 0;
@@ -59167,9 +59184,9 @@ var require_ruleset2 = __commonJS({
59167
59184
  }
59168
59185
  });
59169
59186
 
59170
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js
59187
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js
59171
59188
  var require_endpointResolver2 = __commonJS({
59172
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports2) {
59189
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports2) {
59173
59190
  "use strict";
59174
59191
  Object.defineProperty(exports2, "__esModule", { value: true });
59175
59192
  exports2.defaultEndpointResolver = void 0;
@@ -59187,9 +59204,9 @@ var require_endpointResolver2 = __commonJS({
59187
59204
  }
59188
59205
  });
59189
59206
 
59190
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js
59207
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js
59191
59208
  var require_runtimeConfig_shared2 = __commonJS({
59192
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports2) {
59209
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports2) {
59193
59210
  "use strict";
59194
59211
  Object.defineProperty(exports2, "__esModule", { value: true });
59195
59212
  exports2.getRuntimeConfig = void 0;
@@ -59233,16 +59250,16 @@ var require_runtimeConfig_shared2 = __commonJS({
59233
59250
  }
59234
59251
  });
59235
59252
 
59236
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js
59253
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js
59237
59254
  var require_runtimeConfig2 = __commonJS({
59238
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports2) {
59255
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports2) {
59239
59256
  "use strict";
59240
59257
  Object.defineProperty(exports2, "__esModule", { value: true });
59241
59258
  exports2.getRuntimeConfig = void 0;
59242
59259
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
59243
59260
  var package_json_1 = tslib_1.__importDefault(require_package4());
59244
59261
  var core_1 = require_dist_cjs37();
59245
- var credential_provider_node_1 = require_dist_cjs54();
59262
+ var credential_provider_node_1 = require_dist_cjs59();
59246
59263
  var util_user_agent_node_1 = require_dist_cjs41();
59247
59264
  var config_resolver_1 = require_dist_cjs11();
59248
59265
  var hash_node_1 = require_dist_cjs42();
@@ -59286,9 +59303,9 @@ var require_runtimeConfig2 = __commonJS({
59286
59303
  }
59287
59304
  });
59288
59305
 
59289
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js
59306
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js
59290
59307
  var require_dist_cjs47 = __commonJS({
59291
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports2, module2) {
59308
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports2, module2) {
59292
59309
  "use strict";
59293
59310
  var __defProp3 = Object.defineProperty;
59294
59311
  var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
@@ -60840,56 +60857,219 @@ var require_package5 = __commonJS({
60840
60857
  }
60841
60858
  });
60842
60859
 
60843
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js
60860
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js
60861
+ var require_httpAuthSchemeProvider5 = __commonJS({
60862
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
60863
+ "use strict";
60864
+ Object.defineProperty(exports2, "__esModule", { value: true });
60865
+ exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOOIDCHttpAuthSchemeProvider = exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;
60866
+ var core_1 = require_dist_cjs37();
60867
+ var util_middleware_1 = require_dist_cjs10();
60868
+ var defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
60869
+ return {
60870
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
60871
+ region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
60872
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
60873
+ })()
60874
+ };
60875
+ };
60876
+ exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider;
60877
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
60878
+ return {
60879
+ schemeId: "aws.auth#sigv4",
60880
+ signingProperties: {
60881
+ name: "sso-oauth",
60882
+ region: authParameters.region
60883
+ },
60884
+ propertiesExtractor: (config, context) => ({
60885
+ signingProperties: {
60886
+ config,
60887
+ context
60888
+ }
60889
+ })
60890
+ };
60891
+ }
60892
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
60893
+ return {
60894
+ schemeId: "smithy.api#noAuth"
60895
+ };
60896
+ }
60897
+ var defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {
60898
+ const options = [];
60899
+ switch (authParameters.operation) {
60900
+ case "CreateToken": {
60901
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
60902
+ break;
60903
+ }
60904
+ case "RegisterClient": {
60905
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
60906
+ break;
60907
+ }
60908
+ case "StartDeviceAuthorization": {
60909
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
60910
+ break;
60911
+ }
60912
+ default: {
60913
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
60914
+ }
60915
+ }
60916
+ return options;
60917
+ };
60918
+ exports2.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider;
60919
+ var resolveHttpAuthSchemeConfig = (config) => {
60920
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
60921
+ return {
60922
+ ...config_0
60923
+ };
60924
+ };
60925
+ exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
60926
+ }
60927
+ });
60928
+
60929
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
60930
+ var require_package6 = __commonJS({
60931
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"(exports2, module2) {
60932
+ module2.exports = {
60933
+ name: "@aws-sdk/client-sso-oidc",
60934
+ description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
60935
+ version: "3.583.0",
60936
+ scripts: {
60937
+ build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
60938
+ "build:cjs": "node ../../scripts/compilation/inline client-sso-oidc",
60939
+ "build:es": "tsc -p tsconfig.es.json",
60940
+ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
60941
+ "build:types": "tsc -p tsconfig.types.json",
60942
+ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
60943
+ clean: "rimraf ./dist-* && rimraf *.tsbuildinfo",
60944
+ "extract:docs": "api-extractor run --local",
60945
+ "generate:client": "node ../../scripts/generate-clients/single-service --solo sso-oidc"
60946
+ },
60947
+ main: "./dist-cjs/index.js",
60948
+ types: "./dist-types/index.d.ts",
60949
+ module: "./dist-es/index.js",
60950
+ sideEffects: false,
60951
+ dependencies: {
60952
+ "@aws-crypto/sha256-browser": "3.0.0",
60953
+ "@aws-crypto/sha256-js": "3.0.0",
60954
+ "@aws-sdk/client-sts": "3.583.0",
60955
+ "@aws-sdk/core": "3.582.0",
60956
+ "@aws-sdk/credential-provider-node": "3.583.0",
60957
+ "@aws-sdk/middleware-host-header": "3.577.0",
60958
+ "@aws-sdk/middleware-logger": "3.577.0",
60959
+ "@aws-sdk/middleware-recursion-detection": "3.577.0",
60960
+ "@aws-sdk/middleware-user-agent": "3.583.0",
60961
+ "@aws-sdk/region-config-resolver": "3.577.0",
60962
+ "@aws-sdk/types": "3.577.0",
60963
+ "@aws-sdk/util-endpoints": "3.583.0",
60964
+ "@aws-sdk/util-user-agent-browser": "3.577.0",
60965
+ "@aws-sdk/util-user-agent-node": "3.577.0",
60966
+ "@smithy/config-resolver": "^3.0.0",
60967
+ "@smithy/core": "^2.0.1",
60968
+ "@smithy/fetch-http-handler": "^3.0.1",
60969
+ "@smithy/hash-node": "^3.0.0",
60970
+ "@smithy/invalid-dependency": "^3.0.0",
60971
+ "@smithy/middleware-content-length": "^3.0.0",
60972
+ "@smithy/middleware-endpoint": "^3.0.0",
60973
+ "@smithy/middleware-retry": "^3.0.1",
60974
+ "@smithy/middleware-serde": "^3.0.0",
60975
+ "@smithy/middleware-stack": "^3.0.0",
60976
+ "@smithy/node-config-provider": "^3.0.0",
60977
+ "@smithy/node-http-handler": "^3.0.0",
60978
+ "@smithy/protocol-http": "^4.0.0",
60979
+ "@smithy/smithy-client": "^3.0.1",
60980
+ "@smithy/types": "^3.0.0",
60981
+ "@smithy/url-parser": "^3.0.0",
60982
+ "@smithy/util-base64": "^3.0.0",
60983
+ "@smithy/util-body-length-browser": "^3.0.0",
60984
+ "@smithy/util-body-length-node": "^3.0.0",
60985
+ "@smithy/util-defaults-mode-browser": "^3.0.1",
60986
+ "@smithy/util-defaults-mode-node": "^3.0.1",
60987
+ "@smithy/util-endpoints": "^2.0.0",
60988
+ "@smithy/util-middleware": "^3.0.0",
60989
+ "@smithy/util-retry": "^3.0.0",
60990
+ "@smithy/util-utf8": "^3.0.0",
60991
+ tslib: "^2.6.2"
60992
+ },
60993
+ devDependencies: {
60994
+ "@tsconfig/node16": "16.1.3",
60995
+ "@types/node": "^16.18.96",
60996
+ concurrently: "7.0.0",
60997
+ "downlevel-dts": "0.10.1",
60998
+ rimraf: "3.0.2",
60999
+ typescript: "~4.9.5"
61000
+ },
61001
+ engines: {
61002
+ node: ">=16.0.0"
61003
+ },
61004
+ typesVersions: {
61005
+ "<4.0": {
61006
+ "dist-types/*": [
61007
+ "dist-types/ts3.4/*"
61008
+ ]
61009
+ }
61010
+ },
61011
+ files: [
61012
+ "dist-*/**"
61013
+ ],
61014
+ author: {
61015
+ name: "AWS SDK for JavaScript Team",
61016
+ url: "https://aws.amazon.com/javascript/"
61017
+ },
61018
+ license: "Apache-2.0",
61019
+ browser: {
61020
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
61021
+ },
61022
+ "react-native": {
61023
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
61024
+ },
61025
+ homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",
61026
+ repository: {
61027
+ type: "git",
61028
+ url: "https://github.com/aws/aws-sdk-js-v3.git",
61029
+ directory: "clients/client-sso-oidc"
61030
+ }
61031
+ };
61032
+ }
61033
+ });
61034
+
61035
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js
60844
61036
  var require_ruleset3 = __commonJS({
60845
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) {
61037
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports2) {
60846
61038
  "use strict";
60847
61039
  Object.defineProperty(exports2, "__esModule", { value: true });
60848
61040
  exports2.ruleSet = void 0;
60849
- var F2 = "required";
60850
- var G = "type";
60851
- var H = "fn";
60852
- var I = "argv";
60853
- var J = "ref";
60854
- var a = false;
60855
- var b = true;
61041
+ var u = "required";
61042
+ var v = "fn";
61043
+ var w = "argv";
61044
+ var x2 = "ref";
61045
+ var a = true;
61046
+ var b = "isSet";
60856
61047
  var c = "booleanEquals";
60857
- var d = "stringEquals";
60858
- var e2 = "sigv4";
60859
- var f3 = "sts";
60860
- var g = "us-east-1";
60861
- var h2 = "endpoint";
60862
- var i2 = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
60863
- var j = "tree";
60864
- var k = "error";
60865
- var l = "getAttr";
60866
- var m2 = { [F2]: false, [G]: "String" };
60867
- var n = { [F2]: true, "default": false, [G]: "Boolean" };
60868
- var o = { [J]: "Endpoint" };
60869
- var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
60870
- var q = { [J]: "Region" };
60871
- var r2 = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" };
60872
- var s2 = { [J]: "UseFIPS" };
60873
- var t2 = { [J]: "UseDualStack" };
60874
- var u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e2, "signingName": f3, "signingRegion": g }] }, "headers": {} };
60875
- var v = {};
60876
- var w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h2]: u, [G]: h2 };
60877
- var x2 = { [H]: c, [I]: [s2, true] };
60878
- var y = { [H]: c, [I]: [t2, true] };
60879
- var z2 = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] };
60880
- var A2 = { [J]: "PartitionResult" };
60881
- var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A2, "supportsDualStack"] }] };
60882
- var C = [{ [H]: "isSet", [I]: [o] }];
60883
- var D = [x2];
60884
- var E = [y];
60885
- var _data = { version: "1.0", parameters: { Region: m2, UseDualStack: n, UseFIPS: n, Endpoint: m2, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r2, { [H]: c, [I]: [s2, a] }, { [H]: c, [I]: [t2, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h2 }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h2 }, { endpoint: { url: i2, properties: { authSchemes: [{ name: e2, signingName: f3, signingRegion: "{Region}" }] }, headers: v }, [G]: h2 }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h2 }], [G]: j }, { conditions: [p], rules: [{ conditions: [r2], rules: [{ conditions: [x2, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z2] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z2, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A2, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h2 }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i2, properties: v, headers: v }, [G]: h2 }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
61048
+ var d = "error";
61049
+ var e2 = "endpoint";
61050
+ var f3 = "tree";
61051
+ var g = "PartitionResult";
61052
+ var h2 = "getAttr";
61053
+ var i2 = { [u]: false, "type": "String" };
61054
+ var j = { [u]: true, "default": false, "type": "Boolean" };
61055
+ var k = { [x2]: "Endpoint" };
61056
+ var l = { [v]: c, [w]: [{ [x2]: "UseFIPS" }, true] };
61057
+ var m2 = { [v]: c, [w]: [{ [x2]: "UseDualStack" }, true] };
61058
+ var n = {};
61059
+ var o = { [v]: h2, [w]: [{ [x2]: g }, "supportsFIPS"] };
61060
+ var p = { [x2]: g };
61061
+ var q = { [v]: c, [w]: [true, { [v]: h2, [w]: [p, "supportsDualStack"] }] };
61062
+ var r2 = [l];
61063
+ var s2 = [m2];
61064
+ var t2 = [{ [x2]: "Region" }];
61065
+ var _data = { version: "1.0", parameters: { Region: i2, UseDualStack: j, UseFIPS: j, Endpoint: i2 }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r2, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s2, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e2 }], type: f3 }, { conditions: [{ [v]: b, [w]: t2 }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t2, assign: g }], rules: [{ conditions: [l, m2], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f3 }, { conditions: r2, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h2, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e2 }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f3 }, { conditions: s2, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f3 }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e2 }], type: f3 }], type: f3 }, { error: "Invalid Configuration: Missing Region", type: d }] };
60886
61066
  exports2.ruleSet = _data;
60887
61067
  }
60888
61068
  });
60889
61069
 
60890
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js
61070
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js
60891
61071
  var require_endpointResolver3 = __commonJS({
60892
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) {
61072
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports2) {
60893
61073
  "use strict";
60894
61074
  Object.defineProperty(exports2, "__esModule", { value: true });
60895
61075
  exports2.defaultEndpointResolver = void 0;
@@ -60907,9 +61087,9 @@ var require_endpointResolver3 = __commonJS({
60907
61087
  }
60908
61088
  });
60909
61089
 
60910
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js
61090
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js
60911
61091
  var require_runtimeConfig_shared3 = __commonJS({
60912
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) {
61092
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports2) {
60913
61093
  "use strict";
60914
61094
  Object.defineProperty(exports2, "__esModule", { value: true });
60915
61095
  exports2.getRuntimeConfig = void 0;
@@ -60919,17 +61099,17 @@ var require_runtimeConfig_shared3 = __commonJS({
60919
61099
  var url_parser_1 = require_dist_cjs16();
60920
61100
  var util_base64_1 = require_dist_cjs25();
60921
61101
  var util_utf8_1 = require_dist_cjs24();
60922
- var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4();
61102
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider5();
60923
61103
  var endpointResolver_1 = require_endpointResolver3();
60924
61104
  var getRuntimeConfig = (config) => {
60925
61105
  return {
60926
- apiVersion: "2011-06-15",
61106
+ apiVersion: "2019-06-10",
60927
61107
  base64Decoder: (config == null ? void 0 : config.base64Decoder) ?? util_base64_1.fromBase64,
60928
61108
  base64Encoder: (config == null ? void 0 : config.base64Encoder) ?? util_base64_1.toBase64,
60929
61109
  disableHostPrefix: (config == null ? void 0 : config.disableHostPrefix) ?? false,
60930
61110
  endpointProvider: (config == null ? void 0 : config.endpointProvider) ?? endpointResolver_1.defaultEndpointResolver,
60931
61111
  extensions: (config == null ? void 0 : config.extensions) ?? [],
60932
- httpAuthSchemeProvider: (config == null ? void 0 : config.httpAuthSchemeProvider) ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
61112
+ httpAuthSchemeProvider: (config == null ? void 0 : config.httpAuthSchemeProvider) ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider,
60933
61113
  httpAuthSchemes: (config == null ? void 0 : config.httpAuthSchemes) ?? [
60934
61114
  {
60935
61115
  schemeId: "aws.auth#sigv4",
@@ -60943,7 +61123,7 @@ var require_runtimeConfig_shared3 = __commonJS({
60943
61123
  }
60944
61124
  ],
60945
61125
  logger: (config == null ? void 0 : config.logger) ?? new smithy_client_1.NoOpLogger(),
60946
- serviceId: (config == null ? void 0 : config.serviceId) ?? "STS",
61126
+ serviceId: (config == null ? void 0 : config.serviceId) ?? "SSO OIDC",
60947
61127
  urlParser: (config == null ? void 0 : config.urlParser) ?? url_parser_1.parseUrl,
60948
61128
  utf8Decoder: (config == null ? void 0 : config.utf8Decoder) ?? util_utf8_1.fromUtf8,
60949
61129
  utf8Encoder: (config == null ? void 0 : config.utf8Encoder) ?? util_utf8_1.toUtf8
@@ -60953,19 +61133,18 @@ var require_runtimeConfig_shared3 = __commonJS({
60953
61133
  }
60954
61134
  });
60955
61135
 
60956
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js
61136
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js
60957
61137
  var require_runtimeConfig3 = __commonJS({
60958
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) {
61138
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports2) {
60959
61139
  "use strict";
60960
61140
  Object.defineProperty(exports2, "__esModule", { value: true });
60961
61141
  exports2.getRuntimeConfig = void 0;
60962
61142
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
60963
- var package_json_1 = tslib_1.__importDefault(require_package5());
61143
+ var package_json_1 = tslib_1.__importDefault(require_package6());
60964
61144
  var core_1 = require_dist_cjs37();
60965
- var credential_provider_node_1 = require_dist_cjs54();
61145
+ var credential_provider_node_1 = require_dist_cjs56();
60966
61146
  var util_user_agent_node_1 = require_dist_cjs41();
60967
61147
  var config_resolver_1 = require_dist_cjs11();
60968
- var core_2 = require_dist_cjs34();
60969
61148
  var hash_node_1 = require_dist_cjs42();
60970
61149
  var middleware_retry_1 = require_dist_cjs33();
60971
61150
  var node_config_provider_1 = require_dist_cjs14();
@@ -60976,6 +61155,2015 @@ var require_runtimeConfig3 = __commonJS({
60976
61155
  var smithy_client_1 = require_dist_cjs32();
60977
61156
  var util_defaults_mode_node_1 = require_dist_cjs44();
60978
61157
  var smithy_client_2 = require_dist_cjs32();
61158
+ var getRuntimeConfig = (config) => {
61159
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
61160
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
61161
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
61162
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
61163
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
61164
+ return {
61165
+ ...clientSharedValues,
61166
+ ...config,
61167
+ runtime: "node",
61168
+ defaultsMode,
61169
+ bodyLengthChecker: (config == null ? void 0 : config.bodyLengthChecker) ?? util_body_length_node_1.calculateBodyLength,
61170
+ credentialDefaultProvider: (config == null ? void 0 : config.credentialDefaultProvider) ?? credential_provider_node_1.defaultProvider,
61171
+ defaultUserAgentProvider: (config == null ? void 0 : config.defaultUserAgentProvider) ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
61172
+ maxAttempts: (config == null ? void 0 : config.maxAttempts) ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
61173
+ region: (config == null ? void 0 : config.region) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
61174
+ requestHandler: node_http_handler_1.NodeHttpHandler.create((config == null ? void 0 : config.requestHandler) ?? defaultConfigProvider),
61175
+ retryMode: (config == null ? void 0 : config.retryMode) ?? (0, node_config_provider_1.loadConfig)({
61176
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
61177
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
61178
+ }),
61179
+ sha256: (config == null ? void 0 : config.sha256) ?? hash_node_1.Hash.bind(null, "sha256"),
61180
+ streamCollector: (config == null ? void 0 : config.streamCollector) ?? node_http_handler_1.streamCollector,
61181
+ useDualstackEndpoint: (config == null ? void 0 : config.useDualstackEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
61182
+ useFipsEndpoint: (config == null ? void 0 : config.useFipsEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)
61183
+ };
61184
+ };
61185
+ exports2.getRuntimeConfig = getRuntimeConfig;
61186
+ }
61187
+ });
61188
+
61189
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js
61190
+ var require_dist_cjs50 = __commonJS({
61191
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports2, module2) {
61192
+ "use strict";
61193
+ var __defProp3 = Object.defineProperty;
61194
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
61195
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
61196
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
61197
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
61198
+ var __export2 = (target, all) => {
61199
+ for (var name in all)
61200
+ __defProp3(target, name, { get: all[name], enumerable: true });
61201
+ };
61202
+ var __copyProps3 = (to, from, except, desc) => {
61203
+ if (from && typeof from === "object" || typeof from === "function") {
61204
+ for (let key of __getOwnPropNames3(from))
61205
+ if (!__hasOwnProp3.call(to, key) && key !== except)
61206
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
61207
+ }
61208
+ return to;
61209
+ };
61210
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
61211
+ var src_exports = {};
61212
+ __export2(src_exports, {
61213
+ AccessDeniedException: () => AccessDeniedException,
61214
+ AuthorizationPendingException: () => AuthorizationPendingException,
61215
+ CreateTokenCommand: () => CreateTokenCommand,
61216
+ CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog,
61217
+ CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog,
61218
+ CreateTokenWithIAMCommand: () => CreateTokenWithIAMCommand,
61219
+ CreateTokenWithIAMRequestFilterSensitiveLog: () => CreateTokenWithIAMRequestFilterSensitiveLog,
61220
+ CreateTokenWithIAMResponseFilterSensitiveLog: () => CreateTokenWithIAMResponseFilterSensitiveLog,
61221
+ ExpiredTokenException: () => ExpiredTokenException,
61222
+ InternalServerException: () => InternalServerException,
61223
+ InvalidClientException: () => InvalidClientException,
61224
+ InvalidClientMetadataException: () => InvalidClientMetadataException,
61225
+ InvalidGrantException: () => InvalidGrantException,
61226
+ InvalidRedirectUriException: () => InvalidRedirectUriException,
61227
+ InvalidRequestException: () => InvalidRequestException,
61228
+ InvalidRequestRegionException: () => InvalidRequestRegionException,
61229
+ InvalidScopeException: () => InvalidScopeException,
61230
+ RegisterClientCommand: () => RegisterClientCommand,
61231
+ RegisterClientResponseFilterSensitiveLog: () => RegisterClientResponseFilterSensitiveLog,
61232
+ SSOOIDC: () => SSOOIDC,
61233
+ SSOOIDCClient: () => SSOOIDCClient,
61234
+ SSOOIDCServiceException: () => SSOOIDCServiceException,
61235
+ SlowDownException: () => SlowDownException,
61236
+ StartDeviceAuthorizationCommand: () => StartDeviceAuthorizationCommand,
61237
+ StartDeviceAuthorizationRequestFilterSensitiveLog: () => StartDeviceAuthorizationRequestFilterSensitiveLog,
61238
+ UnauthorizedClientException: () => UnauthorizedClientException,
61239
+ UnsupportedGrantTypeException: () => UnsupportedGrantTypeException,
61240
+ __Client: () => import_smithy_client.Client
61241
+ });
61242
+ module2.exports = __toCommonJS2(src_exports);
61243
+ var import_middleware_host_header = require_dist_cjs3();
61244
+ var import_middleware_logger = require_dist_cjs4();
61245
+ var import_middleware_recursion_detection = require_dist_cjs5();
61246
+ var import_middleware_user_agent = require_dist_cjs8();
61247
+ var import_config_resolver = require_dist_cjs11();
61248
+ var import_core = require_dist_cjs34();
61249
+ var import_middleware_content_length = require_dist_cjs35();
61250
+ var import_middleware_endpoint = require_dist_cjs18();
61251
+ var import_middleware_retry = require_dist_cjs33();
61252
+ var import_httpAuthSchemeProvider = require_httpAuthSchemeProvider5();
61253
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
61254
+ return {
61255
+ ...options,
61256
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
61257
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
61258
+ defaultSigningName: "sso-oauth"
61259
+ };
61260
+ }, "resolveClientEndpointParameters");
61261
+ var commonParams = {
61262
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
61263
+ Endpoint: { type: "builtInParams", name: "endpoint" },
61264
+ Region: { type: "builtInParams", name: "region" },
61265
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
61266
+ };
61267
+ var import_runtimeConfig = require_runtimeConfig3();
61268
+ var import_region_config_resolver = require_dist_cjs45();
61269
+ var import_protocol_http = require_dist_cjs2();
61270
+ var import_smithy_client = require_dist_cjs32();
61271
+ var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
61272
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
61273
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
61274
+ let _credentials = runtimeConfig.credentials;
61275
+ return {
61276
+ setHttpAuthScheme(httpAuthScheme) {
61277
+ const index5 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
61278
+ if (index5 === -1) {
61279
+ _httpAuthSchemes.push(httpAuthScheme);
61280
+ } else {
61281
+ _httpAuthSchemes.splice(index5, 1, httpAuthScheme);
61282
+ }
61283
+ },
61284
+ httpAuthSchemes() {
61285
+ return _httpAuthSchemes;
61286
+ },
61287
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
61288
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
61289
+ },
61290
+ httpAuthSchemeProvider() {
61291
+ return _httpAuthSchemeProvider;
61292
+ },
61293
+ setCredentials(credentials2) {
61294
+ _credentials = credentials2;
61295
+ },
61296
+ credentials() {
61297
+ return _credentials;
61298
+ }
61299
+ };
61300
+ }, "getHttpAuthExtensionConfiguration");
61301
+ var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
61302
+ return {
61303
+ httpAuthSchemes: config.httpAuthSchemes(),
61304
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
61305
+ credentials: config.credentials()
61306
+ };
61307
+ }, "resolveHttpAuthRuntimeConfig");
61308
+ var asPartial = /* @__PURE__ */ __name((t2) => t2, "asPartial");
61309
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
61310
+ const extensionConfiguration = {
61311
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
61312
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
61313
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
61314
+ ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig))
61315
+ };
61316
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
61317
+ return {
61318
+ ...runtimeConfig,
61319
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
61320
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
61321
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
61322
+ ...resolveHttpAuthRuntimeConfig(extensionConfiguration)
61323
+ };
61324
+ }, "resolveRuntimeExtensions");
61325
+ var _SSOOIDCClient = class _SSOOIDCClient extends import_smithy_client.Client {
61326
+ constructor(...[configuration]) {
61327
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
61328
+ const _config_1 = resolveClientEndpointParameters(_config_0);
61329
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
61330
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
61331
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
61332
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
61333
+ const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);
61334
+ const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
61335
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
61336
+ super(_config_8);
61337
+ this.config = _config_8;
61338
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
61339
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
61340
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
61341
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
61342
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
61343
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
61344
+ this.middlewareStack.use(
61345
+ (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
61346
+ httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
61347
+ identityProviderConfigProvider: this.getIdentityProviderConfigProvider()
61348
+ })
61349
+ );
61350
+ this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
61351
+ }
61352
+ /**
61353
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
61354
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
61355
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
61356
+ */
61357
+ destroy() {
61358
+ super.destroy();
61359
+ }
61360
+ getDefaultHttpAuthSchemeParametersProvider() {
61361
+ return import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider;
61362
+ }
61363
+ getIdentityProviderConfigProvider() {
61364
+ return async (config) => new import_core.DefaultIdentityProviderConfig({
61365
+ "aws.auth#sigv4": config.credentials
61366
+ });
61367
+ }
61368
+ };
61369
+ __name(_SSOOIDCClient, "SSOOIDCClient");
61370
+ var SSOOIDCClient = _SSOOIDCClient;
61371
+ var import_middleware_serde = require_dist_cjs17();
61372
+ var import_types = require_dist_cjs();
61373
+ var _SSOOIDCServiceException = class _SSOOIDCServiceException2 extends import_smithy_client.ServiceException {
61374
+ /**
61375
+ * @internal
61376
+ */
61377
+ constructor(options) {
61378
+ super(options);
61379
+ Object.setPrototypeOf(this, _SSOOIDCServiceException2.prototype);
61380
+ }
61381
+ };
61382
+ __name(_SSOOIDCServiceException, "SSOOIDCServiceException");
61383
+ var SSOOIDCServiceException = _SSOOIDCServiceException;
61384
+ var _AccessDeniedException = class _AccessDeniedException2 extends SSOOIDCServiceException {
61385
+ /**
61386
+ * @internal
61387
+ */
61388
+ constructor(opts) {
61389
+ super({
61390
+ name: "AccessDeniedException",
61391
+ $fault: "client",
61392
+ ...opts
61393
+ });
61394
+ this.name = "AccessDeniedException";
61395
+ this.$fault = "client";
61396
+ Object.setPrototypeOf(this, _AccessDeniedException2.prototype);
61397
+ this.error = opts.error;
61398
+ this.error_description = opts.error_description;
61399
+ }
61400
+ };
61401
+ __name(_AccessDeniedException, "AccessDeniedException");
61402
+ var AccessDeniedException = _AccessDeniedException;
61403
+ var _AuthorizationPendingException = class _AuthorizationPendingException2 extends SSOOIDCServiceException {
61404
+ /**
61405
+ * @internal
61406
+ */
61407
+ constructor(opts) {
61408
+ super({
61409
+ name: "AuthorizationPendingException",
61410
+ $fault: "client",
61411
+ ...opts
61412
+ });
61413
+ this.name = "AuthorizationPendingException";
61414
+ this.$fault = "client";
61415
+ Object.setPrototypeOf(this, _AuthorizationPendingException2.prototype);
61416
+ this.error = opts.error;
61417
+ this.error_description = opts.error_description;
61418
+ }
61419
+ };
61420
+ __name(_AuthorizationPendingException, "AuthorizationPendingException");
61421
+ var AuthorizationPendingException = _AuthorizationPendingException;
61422
+ var _ExpiredTokenException = class _ExpiredTokenException2 extends SSOOIDCServiceException {
61423
+ /**
61424
+ * @internal
61425
+ */
61426
+ constructor(opts) {
61427
+ super({
61428
+ name: "ExpiredTokenException",
61429
+ $fault: "client",
61430
+ ...opts
61431
+ });
61432
+ this.name = "ExpiredTokenException";
61433
+ this.$fault = "client";
61434
+ Object.setPrototypeOf(this, _ExpiredTokenException2.prototype);
61435
+ this.error = opts.error;
61436
+ this.error_description = opts.error_description;
61437
+ }
61438
+ };
61439
+ __name(_ExpiredTokenException, "ExpiredTokenException");
61440
+ var ExpiredTokenException = _ExpiredTokenException;
61441
+ var _InternalServerException = class _InternalServerException2 extends SSOOIDCServiceException {
61442
+ /**
61443
+ * @internal
61444
+ */
61445
+ constructor(opts) {
61446
+ super({
61447
+ name: "InternalServerException",
61448
+ $fault: "server",
61449
+ ...opts
61450
+ });
61451
+ this.name = "InternalServerException";
61452
+ this.$fault = "server";
61453
+ Object.setPrototypeOf(this, _InternalServerException2.prototype);
61454
+ this.error = opts.error;
61455
+ this.error_description = opts.error_description;
61456
+ }
61457
+ };
61458
+ __name(_InternalServerException, "InternalServerException");
61459
+ var InternalServerException = _InternalServerException;
61460
+ var _InvalidClientException = class _InvalidClientException2 extends SSOOIDCServiceException {
61461
+ /**
61462
+ * @internal
61463
+ */
61464
+ constructor(opts) {
61465
+ super({
61466
+ name: "InvalidClientException",
61467
+ $fault: "client",
61468
+ ...opts
61469
+ });
61470
+ this.name = "InvalidClientException";
61471
+ this.$fault = "client";
61472
+ Object.setPrototypeOf(this, _InvalidClientException2.prototype);
61473
+ this.error = opts.error;
61474
+ this.error_description = opts.error_description;
61475
+ }
61476
+ };
61477
+ __name(_InvalidClientException, "InvalidClientException");
61478
+ var InvalidClientException = _InvalidClientException;
61479
+ var _InvalidGrantException = class _InvalidGrantException2 extends SSOOIDCServiceException {
61480
+ /**
61481
+ * @internal
61482
+ */
61483
+ constructor(opts) {
61484
+ super({
61485
+ name: "InvalidGrantException",
61486
+ $fault: "client",
61487
+ ...opts
61488
+ });
61489
+ this.name = "InvalidGrantException";
61490
+ this.$fault = "client";
61491
+ Object.setPrototypeOf(this, _InvalidGrantException2.prototype);
61492
+ this.error = opts.error;
61493
+ this.error_description = opts.error_description;
61494
+ }
61495
+ };
61496
+ __name(_InvalidGrantException, "InvalidGrantException");
61497
+ var InvalidGrantException = _InvalidGrantException;
61498
+ var _InvalidRequestException = class _InvalidRequestException2 extends SSOOIDCServiceException {
61499
+ /**
61500
+ * @internal
61501
+ */
61502
+ constructor(opts) {
61503
+ super({
61504
+ name: "InvalidRequestException",
61505
+ $fault: "client",
61506
+ ...opts
61507
+ });
61508
+ this.name = "InvalidRequestException";
61509
+ this.$fault = "client";
61510
+ Object.setPrototypeOf(this, _InvalidRequestException2.prototype);
61511
+ this.error = opts.error;
61512
+ this.error_description = opts.error_description;
61513
+ }
61514
+ };
61515
+ __name(_InvalidRequestException, "InvalidRequestException");
61516
+ var InvalidRequestException = _InvalidRequestException;
61517
+ var _InvalidScopeException = class _InvalidScopeException2 extends SSOOIDCServiceException {
61518
+ /**
61519
+ * @internal
61520
+ */
61521
+ constructor(opts) {
61522
+ super({
61523
+ name: "InvalidScopeException",
61524
+ $fault: "client",
61525
+ ...opts
61526
+ });
61527
+ this.name = "InvalidScopeException";
61528
+ this.$fault = "client";
61529
+ Object.setPrototypeOf(this, _InvalidScopeException2.prototype);
61530
+ this.error = opts.error;
61531
+ this.error_description = opts.error_description;
61532
+ }
61533
+ };
61534
+ __name(_InvalidScopeException, "InvalidScopeException");
61535
+ var InvalidScopeException = _InvalidScopeException;
61536
+ var _SlowDownException = class _SlowDownException2 extends SSOOIDCServiceException {
61537
+ /**
61538
+ * @internal
61539
+ */
61540
+ constructor(opts) {
61541
+ super({
61542
+ name: "SlowDownException",
61543
+ $fault: "client",
61544
+ ...opts
61545
+ });
61546
+ this.name = "SlowDownException";
61547
+ this.$fault = "client";
61548
+ Object.setPrototypeOf(this, _SlowDownException2.prototype);
61549
+ this.error = opts.error;
61550
+ this.error_description = opts.error_description;
61551
+ }
61552
+ };
61553
+ __name(_SlowDownException, "SlowDownException");
61554
+ var SlowDownException = _SlowDownException;
61555
+ var _UnauthorizedClientException = class _UnauthorizedClientException2 extends SSOOIDCServiceException {
61556
+ /**
61557
+ * @internal
61558
+ */
61559
+ constructor(opts) {
61560
+ super({
61561
+ name: "UnauthorizedClientException",
61562
+ $fault: "client",
61563
+ ...opts
61564
+ });
61565
+ this.name = "UnauthorizedClientException";
61566
+ this.$fault = "client";
61567
+ Object.setPrototypeOf(this, _UnauthorizedClientException2.prototype);
61568
+ this.error = opts.error;
61569
+ this.error_description = opts.error_description;
61570
+ }
61571
+ };
61572
+ __name(_UnauthorizedClientException, "UnauthorizedClientException");
61573
+ var UnauthorizedClientException = _UnauthorizedClientException;
61574
+ var _UnsupportedGrantTypeException = class _UnsupportedGrantTypeException2 extends SSOOIDCServiceException {
61575
+ /**
61576
+ * @internal
61577
+ */
61578
+ constructor(opts) {
61579
+ super({
61580
+ name: "UnsupportedGrantTypeException",
61581
+ $fault: "client",
61582
+ ...opts
61583
+ });
61584
+ this.name = "UnsupportedGrantTypeException";
61585
+ this.$fault = "client";
61586
+ Object.setPrototypeOf(this, _UnsupportedGrantTypeException2.prototype);
61587
+ this.error = opts.error;
61588
+ this.error_description = opts.error_description;
61589
+ }
61590
+ };
61591
+ __name(_UnsupportedGrantTypeException, "UnsupportedGrantTypeException");
61592
+ var UnsupportedGrantTypeException = _UnsupportedGrantTypeException;
61593
+ var _InvalidRequestRegionException = class _InvalidRequestRegionException2 extends SSOOIDCServiceException {
61594
+ /**
61595
+ * @internal
61596
+ */
61597
+ constructor(opts) {
61598
+ super({
61599
+ name: "InvalidRequestRegionException",
61600
+ $fault: "client",
61601
+ ...opts
61602
+ });
61603
+ this.name = "InvalidRequestRegionException";
61604
+ this.$fault = "client";
61605
+ Object.setPrototypeOf(this, _InvalidRequestRegionException2.prototype);
61606
+ this.error = opts.error;
61607
+ this.error_description = opts.error_description;
61608
+ this.endpoint = opts.endpoint;
61609
+ this.region = opts.region;
61610
+ }
61611
+ };
61612
+ __name(_InvalidRequestRegionException, "InvalidRequestRegionException");
61613
+ var InvalidRequestRegionException = _InvalidRequestRegionException;
61614
+ var _InvalidClientMetadataException = class _InvalidClientMetadataException2 extends SSOOIDCServiceException {
61615
+ /**
61616
+ * @internal
61617
+ */
61618
+ constructor(opts) {
61619
+ super({
61620
+ name: "InvalidClientMetadataException",
61621
+ $fault: "client",
61622
+ ...opts
61623
+ });
61624
+ this.name = "InvalidClientMetadataException";
61625
+ this.$fault = "client";
61626
+ Object.setPrototypeOf(this, _InvalidClientMetadataException2.prototype);
61627
+ this.error = opts.error;
61628
+ this.error_description = opts.error_description;
61629
+ }
61630
+ };
61631
+ __name(_InvalidClientMetadataException, "InvalidClientMetadataException");
61632
+ var InvalidClientMetadataException = _InvalidClientMetadataException;
61633
+ var _InvalidRedirectUriException = class _InvalidRedirectUriException2 extends SSOOIDCServiceException {
61634
+ /**
61635
+ * @internal
61636
+ */
61637
+ constructor(opts) {
61638
+ super({
61639
+ name: "InvalidRedirectUriException",
61640
+ $fault: "client",
61641
+ ...opts
61642
+ });
61643
+ this.name = "InvalidRedirectUriException";
61644
+ this.$fault = "client";
61645
+ Object.setPrototypeOf(this, _InvalidRedirectUriException2.prototype);
61646
+ this.error = opts.error;
61647
+ this.error_description = opts.error_description;
61648
+ }
61649
+ };
61650
+ __name(_InvalidRedirectUriException, "InvalidRedirectUriException");
61651
+ var InvalidRedirectUriException = _InvalidRedirectUriException;
61652
+ var CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61653
+ ...obj,
61654
+ ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING },
61655
+ ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },
61656
+ ...obj.codeVerifier && { codeVerifier: import_smithy_client.SENSITIVE_STRING }
61657
+ }), "CreateTokenRequestFilterSensitiveLog");
61658
+ var CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61659
+ ...obj,
61660
+ ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING },
61661
+ ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },
61662
+ ...obj.idToken && { idToken: import_smithy_client.SENSITIVE_STRING }
61663
+ }), "CreateTokenResponseFilterSensitiveLog");
61664
+ var CreateTokenWithIAMRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61665
+ ...obj,
61666
+ ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },
61667
+ ...obj.assertion && { assertion: import_smithy_client.SENSITIVE_STRING },
61668
+ ...obj.subjectToken && { subjectToken: import_smithy_client.SENSITIVE_STRING },
61669
+ ...obj.codeVerifier && { codeVerifier: import_smithy_client.SENSITIVE_STRING }
61670
+ }), "CreateTokenWithIAMRequestFilterSensitiveLog");
61671
+ var CreateTokenWithIAMResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61672
+ ...obj,
61673
+ ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING },
61674
+ ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },
61675
+ ...obj.idToken && { idToken: import_smithy_client.SENSITIVE_STRING }
61676
+ }), "CreateTokenWithIAMResponseFilterSensitiveLog");
61677
+ var RegisterClientResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61678
+ ...obj,
61679
+ ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING }
61680
+ }), "RegisterClientResponseFilterSensitiveLog");
61681
+ var StartDeviceAuthorizationRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61682
+ ...obj,
61683
+ ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING }
61684
+ }), "StartDeviceAuthorizationRequestFilterSensitiveLog");
61685
+ var import_core2 = require_dist_cjs37();
61686
+ var se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => {
61687
+ const b = (0, import_core.requestBuilder)(input, context);
61688
+ const headers = {
61689
+ "content-type": "application/json"
61690
+ };
61691
+ b.bp("/token");
61692
+ let body;
61693
+ body = JSON.stringify(
61694
+ (0, import_smithy_client.take)(input, {
61695
+ clientId: [],
61696
+ clientSecret: [],
61697
+ code: [],
61698
+ codeVerifier: [],
61699
+ deviceCode: [],
61700
+ grantType: [],
61701
+ redirectUri: [],
61702
+ refreshToken: [],
61703
+ scope: (_2) => (0, import_smithy_client._json)(_2)
61704
+ })
61705
+ );
61706
+ b.m("POST").h(headers).b(body);
61707
+ return b.build();
61708
+ }, "se_CreateTokenCommand");
61709
+ var se_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (input, context) => {
61710
+ const b = (0, import_core.requestBuilder)(input, context);
61711
+ const headers = {
61712
+ "content-type": "application/json"
61713
+ };
61714
+ b.bp("/token");
61715
+ const query = (0, import_smithy_client.map)({
61716
+ [_ai]: [, "t"]
61717
+ });
61718
+ let body;
61719
+ body = JSON.stringify(
61720
+ (0, import_smithy_client.take)(input, {
61721
+ assertion: [],
61722
+ clientId: [],
61723
+ code: [],
61724
+ codeVerifier: [],
61725
+ grantType: [],
61726
+ redirectUri: [],
61727
+ refreshToken: [],
61728
+ requestedTokenType: [],
61729
+ scope: (_2) => (0, import_smithy_client._json)(_2),
61730
+ subjectToken: [],
61731
+ subjectTokenType: []
61732
+ })
61733
+ );
61734
+ b.m("POST").h(headers).q(query).b(body);
61735
+ return b.build();
61736
+ }, "se_CreateTokenWithIAMCommand");
61737
+ var se_RegisterClientCommand = /* @__PURE__ */ __name(async (input, context) => {
61738
+ const b = (0, import_core.requestBuilder)(input, context);
61739
+ const headers = {
61740
+ "content-type": "application/json"
61741
+ };
61742
+ b.bp("/client/register");
61743
+ let body;
61744
+ body = JSON.stringify(
61745
+ (0, import_smithy_client.take)(input, {
61746
+ clientName: [],
61747
+ clientType: [],
61748
+ entitledApplicationArn: [],
61749
+ grantTypes: (_2) => (0, import_smithy_client._json)(_2),
61750
+ issuerUrl: [],
61751
+ redirectUris: (_2) => (0, import_smithy_client._json)(_2),
61752
+ scopes: (_2) => (0, import_smithy_client._json)(_2)
61753
+ })
61754
+ );
61755
+ b.m("POST").h(headers).b(body);
61756
+ return b.build();
61757
+ }, "se_RegisterClientCommand");
61758
+ var se_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (input, context) => {
61759
+ const b = (0, import_core.requestBuilder)(input, context);
61760
+ const headers = {
61761
+ "content-type": "application/json"
61762
+ };
61763
+ b.bp("/device_authorization");
61764
+ let body;
61765
+ body = JSON.stringify(
61766
+ (0, import_smithy_client.take)(input, {
61767
+ clientId: [],
61768
+ clientSecret: [],
61769
+ startUrl: []
61770
+ })
61771
+ );
61772
+ b.m("POST").h(headers).b(body);
61773
+ return b.build();
61774
+ }, "se_StartDeviceAuthorizationCommand");
61775
+ var de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => {
61776
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
61777
+ return de_CommandError(output, context);
61778
+ }
61779
+ const contents = (0, import_smithy_client.map)({
61780
+ $metadata: deserializeMetadata(output)
61781
+ });
61782
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
61783
+ const doc = (0, import_smithy_client.take)(data, {
61784
+ accessToken: import_smithy_client.expectString,
61785
+ expiresIn: import_smithy_client.expectInt32,
61786
+ idToken: import_smithy_client.expectString,
61787
+ refreshToken: import_smithy_client.expectString,
61788
+ tokenType: import_smithy_client.expectString
61789
+ });
61790
+ Object.assign(contents, doc);
61791
+ return contents;
61792
+ }, "de_CreateTokenCommand");
61793
+ var de_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (output, context) => {
61794
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
61795
+ return de_CommandError(output, context);
61796
+ }
61797
+ const contents = (0, import_smithy_client.map)({
61798
+ $metadata: deserializeMetadata(output)
61799
+ });
61800
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
61801
+ const doc = (0, import_smithy_client.take)(data, {
61802
+ accessToken: import_smithy_client.expectString,
61803
+ expiresIn: import_smithy_client.expectInt32,
61804
+ idToken: import_smithy_client.expectString,
61805
+ issuedTokenType: import_smithy_client.expectString,
61806
+ refreshToken: import_smithy_client.expectString,
61807
+ scope: import_smithy_client._json,
61808
+ tokenType: import_smithy_client.expectString
61809
+ });
61810
+ Object.assign(contents, doc);
61811
+ return contents;
61812
+ }, "de_CreateTokenWithIAMCommand");
61813
+ var de_RegisterClientCommand = /* @__PURE__ */ __name(async (output, context) => {
61814
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
61815
+ return de_CommandError(output, context);
61816
+ }
61817
+ const contents = (0, import_smithy_client.map)({
61818
+ $metadata: deserializeMetadata(output)
61819
+ });
61820
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
61821
+ const doc = (0, import_smithy_client.take)(data, {
61822
+ authorizationEndpoint: import_smithy_client.expectString,
61823
+ clientId: import_smithy_client.expectString,
61824
+ clientIdIssuedAt: import_smithy_client.expectLong,
61825
+ clientSecret: import_smithy_client.expectString,
61826
+ clientSecretExpiresAt: import_smithy_client.expectLong,
61827
+ tokenEndpoint: import_smithy_client.expectString
61828
+ });
61829
+ Object.assign(contents, doc);
61830
+ return contents;
61831
+ }, "de_RegisterClientCommand");
61832
+ var de_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (output, context) => {
61833
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
61834
+ return de_CommandError(output, context);
61835
+ }
61836
+ const contents = (0, import_smithy_client.map)({
61837
+ $metadata: deserializeMetadata(output)
61838
+ });
61839
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
61840
+ const doc = (0, import_smithy_client.take)(data, {
61841
+ deviceCode: import_smithy_client.expectString,
61842
+ expiresIn: import_smithy_client.expectInt32,
61843
+ interval: import_smithy_client.expectInt32,
61844
+ userCode: import_smithy_client.expectString,
61845
+ verificationUri: import_smithy_client.expectString,
61846
+ verificationUriComplete: import_smithy_client.expectString
61847
+ });
61848
+ Object.assign(contents, doc);
61849
+ return contents;
61850
+ }, "de_StartDeviceAuthorizationCommand");
61851
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
61852
+ const parsedOutput = {
61853
+ ...output,
61854
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
61855
+ };
61856
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
61857
+ switch (errorCode) {
61858
+ case "AccessDeniedException":
61859
+ case "com.amazonaws.ssooidc#AccessDeniedException":
61860
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
61861
+ case "AuthorizationPendingException":
61862
+ case "com.amazonaws.ssooidc#AuthorizationPendingException":
61863
+ throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
61864
+ case "ExpiredTokenException":
61865
+ case "com.amazonaws.ssooidc#ExpiredTokenException":
61866
+ throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
61867
+ case "InternalServerException":
61868
+ case "com.amazonaws.ssooidc#InternalServerException":
61869
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
61870
+ case "InvalidClientException":
61871
+ case "com.amazonaws.ssooidc#InvalidClientException":
61872
+ throw await de_InvalidClientExceptionRes(parsedOutput, context);
61873
+ case "InvalidGrantException":
61874
+ case "com.amazonaws.ssooidc#InvalidGrantException":
61875
+ throw await de_InvalidGrantExceptionRes(parsedOutput, context);
61876
+ case "InvalidRequestException":
61877
+ case "com.amazonaws.ssooidc#InvalidRequestException":
61878
+ throw await de_InvalidRequestExceptionRes(parsedOutput, context);
61879
+ case "InvalidScopeException":
61880
+ case "com.amazonaws.ssooidc#InvalidScopeException":
61881
+ throw await de_InvalidScopeExceptionRes(parsedOutput, context);
61882
+ case "SlowDownException":
61883
+ case "com.amazonaws.ssooidc#SlowDownException":
61884
+ throw await de_SlowDownExceptionRes(parsedOutput, context);
61885
+ case "UnauthorizedClientException":
61886
+ case "com.amazonaws.ssooidc#UnauthorizedClientException":
61887
+ throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
61888
+ case "UnsupportedGrantTypeException":
61889
+ case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
61890
+ throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
61891
+ case "InvalidRequestRegionException":
61892
+ case "com.amazonaws.ssooidc#InvalidRequestRegionException":
61893
+ throw await de_InvalidRequestRegionExceptionRes(parsedOutput, context);
61894
+ case "InvalidClientMetadataException":
61895
+ case "com.amazonaws.ssooidc#InvalidClientMetadataException":
61896
+ throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context);
61897
+ case "InvalidRedirectUriException":
61898
+ case "com.amazonaws.ssooidc#InvalidRedirectUriException":
61899
+ throw await de_InvalidRedirectUriExceptionRes(parsedOutput, context);
61900
+ default:
61901
+ const parsedBody = parsedOutput.body;
61902
+ return throwDefaultError({
61903
+ output,
61904
+ parsedBody,
61905
+ errorCode
61906
+ });
61907
+ }
61908
+ }, "de_CommandError");
61909
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(SSOOIDCServiceException);
61910
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61911
+ const contents = (0, import_smithy_client.map)({});
61912
+ const data = parsedOutput.body;
61913
+ const doc = (0, import_smithy_client.take)(data, {
61914
+ error: import_smithy_client.expectString,
61915
+ error_description: import_smithy_client.expectString
61916
+ });
61917
+ Object.assign(contents, doc);
61918
+ const exception = new AccessDeniedException({
61919
+ $metadata: deserializeMetadata(parsedOutput),
61920
+ ...contents
61921
+ });
61922
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61923
+ }, "de_AccessDeniedExceptionRes");
61924
+ var de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61925
+ const contents = (0, import_smithy_client.map)({});
61926
+ const data = parsedOutput.body;
61927
+ const doc = (0, import_smithy_client.take)(data, {
61928
+ error: import_smithy_client.expectString,
61929
+ error_description: import_smithy_client.expectString
61930
+ });
61931
+ Object.assign(contents, doc);
61932
+ const exception = new AuthorizationPendingException({
61933
+ $metadata: deserializeMetadata(parsedOutput),
61934
+ ...contents
61935
+ });
61936
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61937
+ }, "de_AuthorizationPendingExceptionRes");
61938
+ var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61939
+ const contents = (0, import_smithy_client.map)({});
61940
+ const data = parsedOutput.body;
61941
+ const doc = (0, import_smithy_client.take)(data, {
61942
+ error: import_smithy_client.expectString,
61943
+ error_description: import_smithy_client.expectString
61944
+ });
61945
+ Object.assign(contents, doc);
61946
+ const exception = new ExpiredTokenException({
61947
+ $metadata: deserializeMetadata(parsedOutput),
61948
+ ...contents
61949
+ });
61950
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61951
+ }, "de_ExpiredTokenExceptionRes");
61952
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61953
+ const contents = (0, import_smithy_client.map)({});
61954
+ const data = parsedOutput.body;
61955
+ const doc = (0, import_smithy_client.take)(data, {
61956
+ error: import_smithy_client.expectString,
61957
+ error_description: import_smithy_client.expectString
61958
+ });
61959
+ Object.assign(contents, doc);
61960
+ const exception = new InternalServerException({
61961
+ $metadata: deserializeMetadata(parsedOutput),
61962
+ ...contents
61963
+ });
61964
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61965
+ }, "de_InternalServerExceptionRes");
61966
+ var de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61967
+ const contents = (0, import_smithy_client.map)({});
61968
+ const data = parsedOutput.body;
61969
+ const doc = (0, import_smithy_client.take)(data, {
61970
+ error: import_smithy_client.expectString,
61971
+ error_description: import_smithy_client.expectString
61972
+ });
61973
+ Object.assign(contents, doc);
61974
+ const exception = new InvalidClientException({
61975
+ $metadata: deserializeMetadata(parsedOutput),
61976
+ ...contents
61977
+ });
61978
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61979
+ }, "de_InvalidClientExceptionRes");
61980
+ var de_InvalidClientMetadataExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61981
+ const contents = (0, import_smithy_client.map)({});
61982
+ const data = parsedOutput.body;
61983
+ const doc = (0, import_smithy_client.take)(data, {
61984
+ error: import_smithy_client.expectString,
61985
+ error_description: import_smithy_client.expectString
61986
+ });
61987
+ Object.assign(contents, doc);
61988
+ const exception = new InvalidClientMetadataException({
61989
+ $metadata: deserializeMetadata(parsedOutput),
61990
+ ...contents
61991
+ });
61992
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61993
+ }, "de_InvalidClientMetadataExceptionRes");
61994
+ var de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61995
+ const contents = (0, import_smithy_client.map)({});
61996
+ const data = parsedOutput.body;
61997
+ const doc = (0, import_smithy_client.take)(data, {
61998
+ error: import_smithy_client.expectString,
61999
+ error_description: import_smithy_client.expectString
62000
+ });
62001
+ Object.assign(contents, doc);
62002
+ const exception = new InvalidGrantException({
62003
+ $metadata: deserializeMetadata(parsedOutput),
62004
+ ...contents
62005
+ });
62006
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62007
+ }, "de_InvalidGrantExceptionRes");
62008
+ var de_InvalidRedirectUriExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62009
+ const contents = (0, import_smithy_client.map)({});
62010
+ const data = parsedOutput.body;
62011
+ const doc = (0, import_smithy_client.take)(data, {
62012
+ error: import_smithy_client.expectString,
62013
+ error_description: import_smithy_client.expectString
62014
+ });
62015
+ Object.assign(contents, doc);
62016
+ const exception = new InvalidRedirectUriException({
62017
+ $metadata: deserializeMetadata(parsedOutput),
62018
+ ...contents
62019
+ });
62020
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62021
+ }, "de_InvalidRedirectUriExceptionRes");
62022
+ var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62023
+ const contents = (0, import_smithy_client.map)({});
62024
+ const data = parsedOutput.body;
62025
+ const doc = (0, import_smithy_client.take)(data, {
62026
+ error: import_smithy_client.expectString,
62027
+ error_description: import_smithy_client.expectString
62028
+ });
62029
+ Object.assign(contents, doc);
62030
+ const exception = new InvalidRequestException({
62031
+ $metadata: deserializeMetadata(parsedOutput),
62032
+ ...contents
62033
+ });
62034
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62035
+ }, "de_InvalidRequestExceptionRes");
62036
+ var de_InvalidRequestRegionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62037
+ const contents = (0, import_smithy_client.map)({});
62038
+ const data = parsedOutput.body;
62039
+ const doc = (0, import_smithy_client.take)(data, {
62040
+ endpoint: import_smithy_client.expectString,
62041
+ error: import_smithy_client.expectString,
62042
+ error_description: import_smithy_client.expectString,
62043
+ region: import_smithy_client.expectString
62044
+ });
62045
+ Object.assign(contents, doc);
62046
+ const exception = new InvalidRequestRegionException({
62047
+ $metadata: deserializeMetadata(parsedOutput),
62048
+ ...contents
62049
+ });
62050
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62051
+ }, "de_InvalidRequestRegionExceptionRes");
62052
+ var de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62053
+ const contents = (0, import_smithy_client.map)({});
62054
+ const data = parsedOutput.body;
62055
+ const doc = (0, import_smithy_client.take)(data, {
62056
+ error: import_smithy_client.expectString,
62057
+ error_description: import_smithy_client.expectString
62058
+ });
62059
+ Object.assign(contents, doc);
62060
+ const exception = new InvalidScopeException({
62061
+ $metadata: deserializeMetadata(parsedOutput),
62062
+ ...contents
62063
+ });
62064
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62065
+ }, "de_InvalidScopeExceptionRes");
62066
+ var de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62067
+ const contents = (0, import_smithy_client.map)({});
62068
+ const data = parsedOutput.body;
62069
+ const doc = (0, import_smithy_client.take)(data, {
62070
+ error: import_smithy_client.expectString,
62071
+ error_description: import_smithy_client.expectString
62072
+ });
62073
+ Object.assign(contents, doc);
62074
+ const exception = new SlowDownException({
62075
+ $metadata: deserializeMetadata(parsedOutput),
62076
+ ...contents
62077
+ });
62078
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62079
+ }, "de_SlowDownExceptionRes");
62080
+ var de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62081
+ const contents = (0, import_smithy_client.map)({});
62082
+ const data = parsedOutput.body;
62083
+ const doc = (0, import_smithy_client.take)(data, {
62084
+ error: import_smithy_client.expectString,
62085
+ error_description: import_smithy_client.expectString
62086
+ });
62087
+ Object.assign(contents, doc);
62088
+ const exception = new UnauthorizedClientException({
62089
+ $metadata: deserializeMetadata(parsedOutput),
62090
+ ...contents
62091
+ });
62092
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62093
+ }, "de_UnauthorizedClientExceptionRes");
62094
+ var de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62095
+ const contents = (0, import_smithy_client.map)({});
62096
+ const data = parsedOutput.body;
62097
+ const doc = (0, import_smithy_client.take)(data, {
62098
+ error: import_smithy_client.expectString,
62099
+ error_description: import_smithy_client.expectString
62100
+ });
62101
+ Object.assign(contents, doc);
62102
+ const exception = new UnsupportedGrantTypeException({
62103
+ $metadata: deserializeMetadata(parsedOutput),
62104
+ ...contents
62105
+ });
62106
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62107
+ }, "de_UnsupportedGrantTypeExceptionRes");
62108
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
62109
+ httpStatusCode: output.statusCode,
62110
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
62111
+ extendedRequestId: output.headers["x-amz-id-2"],
62112
+ cfId: output.headers["x-amz-cf-id"]
62113
+ }), "deserializeMetadata");
62114
+ var _ai = "aws_iam";
62115
+ var _CreateTokenCommand = class _CreateTokenCommand extends import_smithy_client.Command.classBuilder().ep({
62116
+ ...commonParams
62117
+ }).m(function(Command, cs, config, o) {
62118
+ return [
62119
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
62120
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
62121
+ ];
62122
+ }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {
62123
+ };
62124
+ __name(_CreateTokenCommand, "CreateTokenCommand");
62125
+ var CreateTokenCommand = _CreateTokenCommand;
62126
+ var _CreateTokenWithIAMCommand = class _CreateTokenWithIAMCommand extends import_smithy_client.Command.classBuilder().ep({
62127
+ ...commonParams
62128
+ }).m(function(Command, cs, config, o) {
62129
+ return [
62130
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
62131
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
62132
+ ];
62133
+ }).s("AWSSSOOIDCService", "CreateTokenWithIAM", {}).n("SSOOIDCClient", "CreateTokenWithIAMCommand").f(CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog).ser(se_CreateTokenWithIAMCommand).de(de_CreateTokenWithIAMCommand).build() {
62134
+ };
62135
+ __name(_CreateTokenWithIAMCommand, "CreateTokenWithIAMCommand");
62136
+ var CreateTokenWithIAMCommand = _CreateTokenWithIAMCommand;
62137
+ var _RegisterClientCommand = class _RegisterClientCommand extends import_smithy_client.Command.classBuilder().ep({
62138
+ ...commonParams
62139
+ }).m(function(Command, cs, config, o) {
62140
+ return [
62141
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
62142
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
62143
+ ];
62144
+ }).s("AWSSSOOIDCService", "RegisterClient", {}).n("SSOOIDCClient", "RegisterClientCommand").f(void 0, RegisterClientResponseFilterSensitiveLog).ser(se_RegisterClientCommand).de(de_RegisterClientCommand).build() {
62145
+ };
62146
+ __name(_RegisterClientCommand, "RegisterClientCommand");
62147
+ var RegisterClientCommand = _RegisterClientCommand;
62148
+ var _StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends import_smithy_client.Command.classBuilder().ep({
62149
+ ...commonParams
62150
+ }).m(function(Command, cs, config, o) {
62151
+ return [
62152
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
62153
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
62154
+ ];
62155
+ }).s("AWSSSOOIDCService", "StartDeviceAuthorization", {}).n("SSOOIDCClient", "StartDeviceAuthorizationCommand").f(StartDeviceAuthorizationRequestFilterSensitiveLog, void 0).ser(se_StartDeviceAuthorizationCommand).de(de_StartDeviceAuthorizationCommand).build() {
62156
+ };
62157
+ __name(_StartDeviceAuthorizationCommand, "StartDeviceAuthorizationCommand");
62158
+ var StartDeviceAuthorizationCommand = _StartDeviceAuthorizationCommand;
62159
+ var commands = {
62160
+ CreateTokenCommand,
62161
+ CreateTokenWithIAMCommand,
62162
+ RegisterClientCommand,
62163
+ StartDeviceAuthorizationCommand
62164
+ };
62165
+ var _SSOOIDC = class _SSOOIDC extends SSOOIDCClient {
62166
+ };
62167
+ __name(_SSOOIDC, "SSOOIDC");
62168
+ var SSOOIDC = _SSOOIDC;
62169
+ (0, import_smithy_client.createAggregatedClient)(commands, SSOOIDC);
62170
+ }
62171
+ });
62172
+
62173
+ // ../node_modules/.pnpm/@aws-sdk+token-providers@3.577.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0_/node_modules/@aws-sdk/token-providers/dist-cjs/index.js
62174
+ var require_dist_cjs51 = __commonJS({
62175
+ "../node_modules/.pnpm/@aws-sdk+token-providers@3.577.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0_/node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2, module2) {
62176
+ "use strict";
62177
+ var __create3 = Object.create;
62178
+ var __defProp3 = Object.defineProperty;
62179
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62180
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62181
+ var __getProtoOf3 = Object.getPrototypeOf;
62182
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62183
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62184
+ var __export2 = (target, all) => {
62185
+ for (var name in all)
62186
+ __defProp3(target, name, { get: all[name], enumerable: true });
62187
+ };
62188
+ var __copyProps3 = (to, from, except, desc) => {
62189
+ if (from && typeof from === "object" || typeof from === "function") {
62190
+ for (let key of __getOwnPropNames3(from))
62191
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62192
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62193
+ }
62194
+ return to;
62195
+ };
62196
+ var __toESM3 = (mod, isNodeMode, target) => (target = mod != null ? __create3(__getProtoOf3(mod)) : {}, __copyProps3(
62197
+ // If the importer is in node compatibility mode or this is not an ESM
62198
+ // file that has been converted to a CommonJS file using a Babel-
62199
+ // compatible transform (i.e. "__esModule" has not been set), then set
62200
+ // "default" to the CommonJS "module.exports" for node compatibility.
62201
+ isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target,
62202
+ mod
62203
+ ));
62204
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62205
+ var src_exports = {};
62206
+ __export2(src_exports, {
62207
+ fromSso: () => fromSso,
62208
+ fromStatic: () => fromStatic,
62209
+ nodeProvider: () => nodeProvider
62210
+ });
62211
+ module2.exports = __toCommonJS2(src_exports);
62212
+ var EXPIRE_WINDOW_MS = 5 * 60 * 1e3;
62213
+ var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
62214
+ var ssoOidcClientsHash = {};
62215
+ var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion) => {
62216
+ const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM3(require_dist_cjs50()));
62217
+ if (ssoOidcClientsHash[ssoRegion]) {
62218
+ return ssoOidcClientsHash[ssoRegion];
62219
+ }
62220
+ const ssoOidcClient = new SSOOIDCClient({ region: ssoRegion });
62221
+ ssoOidcClientsHash[ssoRegion] = ssoOidcClient;
62222
+ return ssoOidcClient;
62223
+ }, "getSsoOidcClient");
62224
+ var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion) => {
62225
+ const { CreateTokenCommand } = await Promise.resolve().then(() => __toESM3(require_dist_cjs50()));
62226
+ const ssoOidcClient = await getSsoOidcClient(ssoRegion);
62227
+ return ssoOidcClient.send(
62228
+ new CreateTokenCommand({
62229
+ clientId: ssoToken.clientId,
62230
+ clientSecret: ssoToken.clientSecret,
62231
+ refreshToken: ssoToken.refreshToken,
62232
+ grantType: "refresh_token"
62233
+ })
62234
+ );
62235
+ }, "getNewSsoOidcToken");
62236
+ var import_property_provider = require_dist_cjs12();
62237
+ var validateTokenExpiry = /* @__PURE__ */ __name((token) => {
62238
+ if (token.expiration && token.expiration.getTime() < Date.now()) {
62239
+ throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
62240
+ }
62241
+ }, "validateTokenExpiry");
62242
+ var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => {
62243
+ if (typeof value === "undefined") {
62244
+ throw new import_property_provider.TokenProviderError(
62245
+ `Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`,
62246
+ false
62247
+ );
62248
+ }
62249
+ }, "validateTokenKey");
62250
+ var import_shared_ini_file_loader = require_dist_cjs13();
62251
+ var import_fs14 = require("fs");
62252
+ var { writeFile } = import_fs14.promises;
62253
+ var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => {
62254
+ const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id);
62255
+ const tokenString = JSON.stringify(ssoToken, null, 2);
62256
+ return writeFile(tokenFilepath, tokenString);
62257
+ }, "writeSSOTokenToFile");
62258
+ var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
62259
+ var fromSso = /* @__PURE__ */ __name((init2 = {}) => async () => {
62260
+ var _a;
62261
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/token-providers", "fromSso");
62262
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init2);
62263
+ const profileName = (0, import_shared_ini_file_loader.getProfileName)(init2);
62264
+ const profile = profiles[profileName];
62265
+ if (!profile) {
62266
+ throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
62267
+ } else if (!profile["sso_session"]) {
62268
+ throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
62269
+ }
62270
+ const ssoSessionName = profile["sso_session"];
62271
+ const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init2);
62272
+ const ssoSession = ssoSessions[ssoSessionName];
62273
+ if (!ssoSession) {
62274
+ throw new import_property_provider.TokenProviderError(
62275
+ `Sso session '${ssoSessionName}' could not be found in shared credentials file.`,
62276
+ false
62277
+ );
62278
+ }
62279
+ for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
62280
+ if (!ssoSession[ssoSessionRequiredKey]) {
62281
+ throw new import_property_provider.TokenProviderError(
62282
+ `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`,
62283
+ false
62284
+ );
62285
+ }
62286
+ }
62287
+ const ssoStartUrl = ssoSession["sso_start_url"];
62288
+ const ssoRegion = ssoSession["sso_region"];
62289
+ let ssoToken;
62290
+ try {
62291
+ ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName);
62292
+ } catch (e2) {
62293
+ throw new import_property_provider.TokenProviderError(
62294
+ `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`,
62295
+ false
62296
+ );
62297
+ }
62298
+ validateTokenKey("accessToken", ssoToken.accessToken);
62299
+ validateTokenKey("expiresAt", ssoToken.expiresAt);
62300
+ const { accessToken, expiresAt } = ssoToken;
62301
+ const existingToken = { token: accessToken, expiration: new Date(expiresAt) };
62302
+ if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
62303
+ return existingToken;
62304
+ }
62305
+ if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {
62306
+ validateTokenExpiry(existingToken);
62307
+ return existingToken;
62308
+ }
62309
+ validateTokenKey("clientId", ssoToken.clientId, true);
62310
+ validateTokenKey("clientSecret", ssoToken.clientSecret, true);
62311
+ validateTokenKey("refreshToken", ssoToken.refreshToken, true);
62312
+ try {
62313
+ lastRefreshAttemptTime.setTime(Date.now());
62314
+ const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion);
62315
+ validateTokenKey("accessToken", newSsoOidcToken.accessToken);
62316
+ validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
62317
+ const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);
62318
+ try {
62319
+ await writeSSOTokenToFile(ssoSessionName, {
62320
+ ...ssoToken,
62321
+ accessToken: newSsoOidcToken.accessToken,
62322
+ expiresAt: newTokenExpiration.toISOString(),
62323
+ refreshToken: newSsoOidcToken.refreshToken
62324
+ });
62325
+ } catch (error2) {
62326
+ }
62327
+ return {
62328
+ token: newSsoOidcToken.accessToken,
62329
+ expiration: newTokenExpiration
62330
+ };
62331
+ } catch (error2) {
62332
+ validateTokenExpiry(existingToken);
62333
+ return existingToken;
62334
+ }
62335
+ }, "fromSso");
62336
+ var fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => {
62337
+ logger == null ? void 0 : logger.debug("@aws-sdk/token-providers", "fromStatic");
62338
+ if (!token || !token.token) {
62339
+ throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
62340
+ }
62341
+ return token;
62342
+ }, "fromStatic");
62343
+ var nodeProvider = /* @__PURE__ */ __name((init2 = {}) => (0, import_property_provider.memoize)(
62344
+ (0, import_property_provider.chain)(fromSso(init2), async () => {
62345
+ throw new import_property_provider.TokenProviderError("Could not load token from any providers", false);
62346
+ }),
62347
+ (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5,
62348
+ (token) => token.expiration !== void 0
62349
+ ), "nodeProvider");
62350
+ }
62351
+ });
62352
+
62353
+ // ../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0_/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js
62354
+ var require_dist_cjs52 = __commonJS({
62355
+ "../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0_/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports2, module2) {
62356
+ "use strict";
62357
+ var __defProp3 = Object.defineProperty;
62358
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62359
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62360
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62361
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62362
+ var __esm2 = (fn, res) => function __init() {
62363
+ return fn && (res = (0, fn[__getOwnPropNames3(fn)[0]])(fn = 0)), res;
62364
+ };
62365
+ var __export2 = (target, all) => {
62366
+ for (var name in all)
62367
+ __defProp3(target, name, { get: all[name], enumerable: true });
62368
+ };
62369
+ var __copyProps3 = (to, from, except, desc) => {
62370
+ if (from && typeof from === "object" || typeof from === "function") {
62371
+ for (let key of __getOwnPropNames3(from))
62372
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62373
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62374
+ }
62375
+ return to;
62376
+ };
62377
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62378
+ var loadSso_exports = {};
62379
+ __export2(loadSso_exports, {
62380
+ GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand,
62381
+ SSOClient: () => import_client_sso.SSOClient
62382
+ });
62383
+ var import_client_sso;
62384
+ var init_loadSso = __esm2({
62385
+ "src/loadSso.ts"() {
62386
+ "use strict";
62387
+ import_client_sso = require_dist_cjs46();
62388
+ }
62389
+ });
62390
+ var src_exports = {};
62391
+ __export2(src_exports, {
62392
+ fromSSO: () => fromSSO,
62393
+ isSsoProfile: () => isSsoProfile,
62394
+ validateSsoProfile: () => validateSsoProfile
62395
+ });
62396
+ module2.exports = __toCommonJS2(src_exports);
62397
+ var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
62398
+ var import_token_providers = require_dist_cjs51();
62399
+ var import_property_provider = require_dist_cjs12();
62400
+ var import_shared_ini_file_loader = require_dist_cjs13();
62401
+ var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
62402
+ var resolveSSOCredentials = /* @__PURE__ */ __name(async ({
62403
+ ssoStartUrl,
62404
+ ssoSession,
62405
+ ssoAccountId,
62406
+ ssoRegion,
62407
+ ssoRoleName,
62408
+ ssoClient,
62409
+ clientConfig,
62410
+ profile
62411
+ }) => {
62412
+ let token;
62413
+ const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
62414
+ if (ssoSession) {
62415
+ try {
62416
+ const _token = await (0, import_token_providers.fromSso)({ profile })();
62417
+ token = {
62418
+ accessToken: _token.token,
62419
+ expiresAt: new Date(_token.expiration).toISOString()
62420
+ };
62421
+ } catch (e2) {
62422
+ throw new import_property_provider.CredentialsProviderError(e2.message, SHOULD_FAIL_CREDENTIAL_CHAIN);
62423
+ }
62424
+ } else {
62425
+ try {
62426
+ token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl);
62427
+ } catch (e2) {
62428
+ throw new import_property_provider.CredentialsProviderError(
62429
+ `The SSO session associated with this profile is invalid. ${refreshMessage}`,
62430
+ SHOULD_FAIL_CREDENTIAL_CHAIN
62431
+ );
62432
+ }
62433
+ }
62434
+ if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
62435
+ throw new import_property_provider.CredentialsProviderError(
62436
+ `The SSO session associated with this profile has expired. ${refreshMessage}`,
62437
+ SHOULD_FAIL_CREDENTIAL_CHAIN
62438
+ );
62439
+ }
62440
+ const { accessToken } = token;
62441
+ const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports));
62442
+ const sso = ssoClient || new SSOClient2(
62443
+ Object.assign({}, clientConfig ?? {}, {
62444
+ region: (clientConfig == null ? void 0 : clientConfig.region) ?? ssoRegion
62445
+ })
62446
+ );
62447
+ let ssoResp;
62448
+ try {
62449
+ ssoResp = await sso.send(
62450
+ new GetRoleCredentialsCommand2({
62451
+ accountId: ssoAccountId,
62452
+ roleName: ssoRoleName,
62453
+ accessToken
62454
+ })
62455
+ );
62456
+ } catch (e2) {
62457
+ throw import_property_provider.CredentialsProviderError.from(e2, SHOULD_FAIL_CREDENTIAL_CHAIN);
62458
+ }
62459
+ const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope } = {} } = ssoResp;
62460
+ if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
62461
+ throw new import_property_provider.CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN);
62462
+ }
62463
+ return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration), credentialScope };
62464
+ }, "resolveSSOCredentials");
62465
+ var validateSsoProfile = /* @__PURE__ */ __name((profile) => {
62466
+ const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
62467
+ if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
62468
+ throw new import_property_provider.CredentialsProviderError(
62469
+ `Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(
62470
+ ", "
62471
+ )}
62472
+ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,
62473
+ false
62474
+ );
62475
+ }
62476
+ return profile;
62477
+ }, "validateSsoProfile");
62478
+ var fromSSO = /* @__PURE__ */ __name((init2 = {}) => async () => {
62479
+ var _a;
62480
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-sso", "fromSSO");
62481
+ const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init2;
62482
+ const { ssoClient } = init2;
62483
+ const profileName = (0, import_shared_ini_file_loader.getProfileName)(init2);
62484
+ if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
62485
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init2);
62486
+ const profile = profiles[profileName];
62487
+ if (!profile) {
62488
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`);
62489
+ }
62490
+ if (!isSsoProfile(profile)) {
62491
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`);
62492
+ }
62493
+ if (profile == null ? void 0 : profile.sso_session) {
62494
+ const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init2);
62495
+ const session = ssoSessions[profile.sso_session];
62496
+ const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
62497
+ if (ssoRegion && ssoRegion !== session.sso_region) {
62498
+ throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, false);
62499
+ }
62500
+ if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
62501
+ throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, false);
62502
+ }
62503
+ profile.sso_region = session.sso_region;
62504
+ profile.sso_start_url = session.sso_start_url;
62505
+ }
62506
+ const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile);
62507
+ return resolveSSOCredentials({
62508
+ ssoStartUrl: sso_start_url,
62509
+ ssoSession: sso_session,
62510
+ ssoAccountId: sso_account_id,
62511
+ ssoRegion: sso_region,
62512
+ ssoRoleName: sso_role_name,
62513
+ ssoClient,
62514
+ clientConfig: init2.clientConfig,
62515
+ profile: profileName
62516
+ });
62517
+ } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
62518
+ throw new import_property_provider.CredentialsProviderError(
62519
+ 'Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"'
62520
+ );
62521
+ } else {
62522
+ return resolveSSOCredentials({
62523
+ ssoStartUrl,
62524
+ ssoSession,
62525
+ ssoAccountId,
62526
+ ssoRegion,
62527
+ ssoRoleName,
62528
+ ssoClient,
62529
+ clientConfig: init2.clientConfig,
62530
+ profile: profileName
62531
+ });
62532
+ }
62533
+ }, "fromSSO");
62534
+ }
62535
+ });
62536
+
62537
+ // ../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.577.0/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js
62538
+ var require_dist_cjs53 = __commonJS({
62539
+ "../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.577.0/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2, module2) {
62540
+ "use strict";
62541
+ var __defProp3 = Object.defineProperty;
62542
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62543
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62544
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62545
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62546
+ var __export2 = (target, all) => {
62547
+ for (var name in all)
62548
+ __defProp3(target, name, { get: all[name], enumerable: true });
62549
+ };
62550
+ var __copyProps3 = (to, from, except, desc) => {
62551
+ if (from && typeof from === "object" || typeof from === "function") {
62552
+ for (let key of __getOwnPropNames3(from))
62553
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62554
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62555
+ }
62556
+ return to;
62557
+ };
62558
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62559
+ var src_exports = {};
62560
+ __export2(src_exports, {
62561
+ fromProcess: () => fromProcess
62562
+ });
62563
+ module2.exports = __toCommonJS2(src_exports);
62564
+ var import_shared_ini_file_loader = require_dist_cjs13();
62565
+ var import_property_provider = require_dist_cjs12();
62566
+ var import_child_process = require("child_process");
62567
+ var import_util5 = require("util");
62568
+ var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data) => {
62569
+ if (data.Version !== 1) {
62570
+ throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
62571
+ }
62572
+ if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {
62573
+ throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
62574
+ }
62575
+ if (data.Expiration) {
62576
+ const currentTime = /* @__PURE__ */ new Date();
62577
+ const expireTime = new Date(data.Expiration);
62578
+ if (expireTime < currentTime) {
62579
+ throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
62580
+ }
62581
+ }
62582
+ return {
62583
+ accessKeyId: data.AccessKeyId,
62584
+ secretAccessKey: data.SecretAccessKey,
62585
+ ...data.SessionToken && { sessionToken: data.SessionToken },
62586
+ ...data.Expiration && { expiration: new Date(data.Expiration) },
62587
+ ...data.CredentialScope && { credentialScope: data.CredentialScope }
62588
+ };
62589
+ }, "getValidatedProcessCredentials");
62590
+ var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles) => {
62591
+ const profile = profiles[profileName];
62592
+ if (profiles[profileName]) {
62593
+ const credentialProcess = profile["credential_process"];
62594
+ if (credentialProcess !== void 0) {
62595
+ const execPromise = (0, import_util5.promisify)(import_child_process.exec);
62596
+ try {
62597
+ const { stdout } = await execPromise(credentialProcess);
62598
+ let data;
62599
+ try {
62600
+ data = JSON.parse(stdout.trim());
62601
+ } catch {
62602
+ throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
62603
+ }
62604
+ return getValidatedProcessCredentials(profileName, data);
62605
+ } catch (error2) {
62606
+ throw new import_property_provider.CredentialsProviderError(error2.message);
62607
+ }
62608
+ } else {
62609
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`);
62610
+ }
62611
+ } else {
62612
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`);
62613
+ }
62614
+ }, "resolveProcessCredentials");
62615
+ var fromProcess = /* @__PURE__ */ __name((init2 = {}) => async () => {
62616
+ var _a;
62617
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process", "fromProcess");
62618
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init2);
62619
+ return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init2), profiles);
62620
+ }, "fromProcess");
62621
+ }
62622
+ });
62623
+
62624
+ // ../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js
62625
+ var require_fromWebToken = __commonJS({
62626
+ "../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js"(exports2) {
62627
+ "use strict";
62628
+ var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
62629
+ if (k2 === void 0)
62630
+ k2 = k;
62631
+ var desc = Object.getOwnPropertyDescriptor(m2, k);
62632
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
62633
+ desc = { enumerable: true, get: function() {
62634
+ return m2[k];
62635
+ } };
62636
+ }
62637
+ Object.defineProperty(o, k2, desc);
62638
+ } : function(o, m2, k, k2) {
62639
+ if (k2 === void 0)
62640
+ k2 = k;
62641
+ o[k2] = m2[k];
62642
+ });
62643
+ var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
62644
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
62645
+ } : function(o, v) {
62646
+ o["default"] = v;
62647
+ });
62648
+ var __importStar3 = exports2 && exports2.__importStar || function(mod) {
62649
+ if (mod && mod.__esModule)
62650
+ return mod;
62651
+ var result = {};
62652
+ if (mod != null) {
62653
+ for (var k in mod)
62654
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
62655
+ __createBinding3(result, mod, k);
62656
+ }
62657
+ __setModuleDefault3(result, mod);
62658
+ return result;
62659
+ };
62660
+ Object.defineProperty(exports2, "__esModule", { value: true });
62661
+ exports2.fromWebToken = void 0;
62662
+ var fromWebToken2 = (init2) => async () => {
62663
+ var _a;
62664
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromWebToken");
62665
+ const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy: policy4, durationSeconds } = init2;
62666
+ let { roleAssumerWithWebIdentity } = init2;
62667
+ if (!roleAssumerWithWebIdentity) {
62668
+ const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar3(require_dist_cjs57()));
62669
+ roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
62670
+ ...init2.clientConfig,
62671
+ credentialProviderLogger: init2.logger,
62672
+ parentClientConfig: init2.parentClientConfig
62673
+ }, init2.clientPlugins);
62674
+ }
62675
+ return roleAssumerWithWebIdentity({
62676
+ RoleArn: roleArn,
62677
+ RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,
62678
+ WebIdentityToken: webIdentityToken,
62679
+ ProviderId: providerId,
62680
+ PolicyArns: policyArns,
62681
+ Policy: policy4,
62682
+ DurationSeconds: durationSeconds
62683
+ });
62684
+ };
62685
+ exports2.fromWebToken = fromWebToken2;
62686
+ }
62687
+ });
62688
+
62689
+ // ../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js
62690
+ var require_fromTokenFile = __commonJS({
62691
+ "../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js"(exports2) {
62692
+ "use strict";
62693
+ Object.defineProperty(exports2, "__esModule", { value: true });
62694
+ exports2.fromTokenFile = void 0;
62695
+ var property_provider_1 = require_dist_cjs12();
62696
+ var fs_1 = require("fs");
62697
+ var fromWebToken_1 = require_fromWebToken();
62698
+ var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
62699
+ var ENV_ROLE_ARN = "AWS_ROLE_ARN";
62700
+ var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
62701
+ var fromTokenFile2 = (init2 = {}) => async () => {
62702
+ var _a;
62703
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromTokenFile");
62704
+ const webIdentityTokenFile = (init2 == null ? void 0 : init2.webIdentityTokenFile) ?? process.env[ENV_TOKEN_FILE];
62705
+ const roleArn = (init2 == null ? void 0 : init2.roleArn) ?? process.env[ENV_ROLE_ARN];
62706
+ const roleSessionName = (init2 == null ? void 0 : init2.roleSessionName) ?? process.env[ENV_ROLE_SESSION_NAME];
62707
+ if (!webIdentityTokenFile || !roleArn) {
62708
+ throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified");
62709
+ }
62710
+ return (0, fromWebToken_1.fromWebToken)({
62711
+ ...init2,
62712
+ webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
62713
+ roleArn,
62714
+ roleSessionName
62715
+ })();
62716
+ };
62717
+ exports2.fromTokenFile = fromTokenFile2;
62718
+ }
62719
+ });
62720
+
62721
+ // ../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js
62722
+ var require_dist_cjs54 = __commonJS({
62723
+ "../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2, module2) {
62724
+ "use strict";
62725
+ var __defProp3 = Object.defineProperty;
62726
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62727
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62728
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62729
+ var __copyProps3 = (to, from, except, desc) => {
62730
+ if (from && typeof from === "object" || typeof from === "function") {
62731
+ for (let key of __getOwnPropNames3(from))
62732
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62733
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62734
+ }
62735
+ return to;
62736
+ };
62737
+ var __reExport = (target, mod, secondTarget) => (__copyProps3(target, mod, "default"), secondTarget && __copyProps3(secondTarget, mod, "default"));
62738
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62739
+ var src_exports = {};
62740
+ module2.exports = __toCommonJS2(src_exports);
62741
+ __reExport(src_exports, require_fromTokenFile(), module2.exports);
62742
+ __reExport(src_exports, require_fromWebToken(), module2.exports);
62743
+ }
62744
+ });
62745
+
62746
+ // ../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts_n4voux45fymjghrdt4o3r57x4m/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js
62747
+ var require_dist_cjs55 = __commonJS({
62748
+ "../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts_n4voux45fymjghrdt4o3r57x4m/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2, module2) {
62749
+ "use strict";
62750
+ var __create3 = Object.create;
62751
+ var __defProp3 = Object.defineProperty;
62752
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62753
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62754
+ var __getProtoOf3 = Object.getPrototypeOf;
62755
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62756
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62757
+ var __export2 = (target, all) => {
62758
+ for (var name in all)
62759
+ __defProp3(target, name, { get: all[name], enumerable: true });
62760
+ };
62761
+ var __copyProps3 = (to, from, except, desc) => {
62762
+ if (from && typeof from === "object" || typeof from === "function") {
62763
+ for (let key of __getOwnPropNames3(from))
62764
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62765
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62766
+ }
62767
+ return to;
62768
+ };
62769
+ var __toESM3 = (mod, isNodeMode, target) => (target = mod != null ? __create3(__getProtoOf3(mod)) : {}, __copyProps3(
62770
+ // If the importer is in node compatibility mode or this is not an ESM
62771
+ // file that has been converted to a CommonJS file using a Babel-
62772
+ // compatible transform (i.e. "__esModule" has not been set), then set
62773
+ // "default" to the CommonJS "module.exports" for node compatibility.
62774
+ isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target,
62775
+ mod
62776
+ ));
62777
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62778
+ var src_exports = {};
62779
+ __export2(src_exports, {
62780
+ fromIni: () => fromIni
62781
+ });
62782
+ module2.exports = __toCommonJS2(src_exports);
62783
+ var import_shared_ini_file_loader = require_dist_cjs13();
62784
+ var import_property_provider = require_dist_cjs12();
62785
+ var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName) => {
62786
+ const sourceProvidersMap = {
62787
+ EcsContainer: (options) => Promise.resolve().then(() => __toESM3(require_dist_cjs39())).then(({ fromContainerMetadata }) => fromContainerMetadata(options)),
62788
+ Ec2InstanceMetadata: (options) => Promise.resolve().then(() => __toESM3(require_dist_cjs39())).then(({ fromInstanceMetadata }) => fromInstanceMetadata(options)),
62789
+ Environment: (options) => Promise.resolve().then(() => __toESM3(require_dist_cjs38())).then(({ fromEnv }) => fromEnv(options))
62790
+ };
62791
+ if (credentialSource in sourceProvidersMap) {
62792
+ return sourceProvidersMap[credentialSource];
62793
+ } else {
62794
+ throw new import_property_provider.CredentialsProviderError(
62795
+ `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`
62796
+ );
62797
+ }
62798
+ }, "resolveCredentialSource");
62799
+ var isAssumeRoleProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg) || isAssumeRoleWithProviderProfile(arg)), "isAssumeRoleProfile");
62800
+ var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg) => typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined", "isAssumeRoleWithSourceProfile");
62801
+ var isAssumeRoleWithProviderProfile = /* @__PURE__ */ __name((arg) => typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined", "isAssumeRoleWithProviderProfile");
62802
+ var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {
62803
+ var _a;
62804
+ (_a = options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveAssumeRoleCredentials (STS)");
62805
+ const data = profiles[profileName];
62806
+ if (!options.roleAssumer) {
62807
+ const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM3(require_dist_cjs57()));
62808
+ options.roleAssumer = getDefaultRoleAssumer(
62809
+ {
62810
+ ...options.clientConfig,
62811
+ credentialProviderLogger: options.logger,
62812
+ parentClientConfig: options == null ? void 0 : options.parentClientConfig
62813
+ },
62814
+ options.clientPlugins
62815
+ );
62816
+ }
62817
+ const { source_profile } = data;
62818
+ if (source_profile && source_profile in visitedProfiles) {
62819
+ throw new import_property_provider.CredentialsProviderError(
62820
+ `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "),
62821
+ false
62822
+ );
62823
+ }
62824
+ const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, {
62825
+ ...visitedProfiles,
62826
+ [source_profile]: true
62827
+ }) : (await resolveCredentialSource(data.credential_source, profileName)(options))();
62828
+ const params = {
62829
+ RoleArn: data.role_arn,
62830
+ RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`,
62831
+ ExternalId: data.external_id,
62832
+ DurationSeconds: parseInt(data.duration_seconds || "3600", 10)
62833
+ };
62834
+ const { mfa_serial } = data;
62835
+ if (mfa_serial) {
62836
+ if (!options.mfaCodeProvider) {
62837
+ throw new import_property_provider.CredentialsProviderError(
62838
+ `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`,
62839
+ false
62840
+ );
62841
+ }
62842
+ params.SerialNumber = mfa_serial;
62843
+ params.TokenCode = await options.mfaCodeProvider(mfa_serial);
62844
+ }
62845
+ const sourceCreds = await sourceCredsProvider;
62846
+ return options.roleAssumer(sourceCreds, params);
62847
+ }, "resolveAssumeRoleCredentials");
62848
+ var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile");
62849
+ var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM3(require_dist_cjs53())).then(
62850
+ ({ fromProcess }) => fromProcess({
62851
+ ...options,
62852
+ profile
62853
+ })()
62854
+ ), "resolveProcessCredentials");
62855
+ var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => {
62856
+ const { fromSSO } = await Promise.resolve().then(() => __toESM3(require_dist_cjs52()));
62857
+ return fromSSO({
62858
+ profile,
62859
+ logger: options.logger
62860
+ })();
62861
+ }, "resolveSsoCredentials");
62862
+ var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
62863
+ var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1, "isStaticCredsProfile");
62864
+ var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => {
62865
+ var _a;
62866
+ (_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveStaticCredentials");
62867
+ return Promise.resolve({
62868
+ accessKeyId: profile.aws_access_key_id,
62869
+ secretAccessKey: profile.aws_secret_access_key,
62870
+ sessionToken: profile.aws_session_token,
62871
+ credentialScope: profile.aws_credential_scope
62872
+ });
62873
+ }, "resolveStaticCredentials");
62874
+ var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile");
62875
+ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM3(require_dist_cjs54())).then(
62876
+ ({ fromTokenFile: fromTokenFile2 }) => fromTokenFile2({
62877
+ webIdentityTokenFile: profile.web_identity_token_file,
62878
+ roleArn: profile.role_arn,
62879
+ roleSessionName: profile.role_session_name,
62880
+ roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
62881
+ logger: options.logger,
62882
+ parentClientConfig: options.parentClientConfig
62883
+ })()
62884
+ ), "resolveWebIdentityCredentials");
62885
+ var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {
62886
+ const data = profiles[profileName];
62887
+ if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
62888
+ return resolveStaticCredentials(data, options);
62889
+ }
62890
+ if (isAssumeRoleProfile(data)) {
62891
+ return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
62892
+ }
62893
+ if (isStaticCredsProfile(data)) {
62894
+ return resolveStaticCredentials(data, options);
62895
+ }
62896
+ if (isWebIdentityProfile(data)) {
62897
+ return resolveWebIdentityCredentials(data, options);
62898
+ }
62899
+ if (isProcessProfile(data)) {
62900
+ return resolveProcessCredentials(options, profileName);
62901
+ }
62902
+ if (isSsoProfile(data)) {
62903
+ return await resolveSsoCredentials(profileName, options);
62904
+ }
62905
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
62906
+ }, "resolveProfileData");
62907
+ var fromIni = /* @__PURE__ */ __name((init2 = {}) => async () => {
62908
+ var _a;
62909
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "fromIni");
62910
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init2);
62911
+ return resolveProfileData((0, import_shared_ini_file_loader.getProfileName)(init2), profiles, init2);
62912
+ }, "fromIni");
62913
+ }
62914
+ });
62915
+
62916
+ // ../node_modules/.pnpm/@aws-sdk+credential-provider-node@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-st_qaylqvuvqkdeetlwmxiq34v6lq/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js
62917
+ var require_dist_cjs56 = __commonJS({
62918
+ "../node_modules/.pnpm/@aws-sdk+credential-provider-node@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-st_qaylqvuvqkdeetlwmxiq34v6lq/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2, module2) {
62919
+ "use strict";
62920
+ var __create3 = Object.create;
62921
+ var __defProp3 = Object.defineProperty;
62922
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62923
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62924
+ var __getProtoOf3 = Object.getPrototypeOf;
62925
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62926
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62927
+ var __export2 = (target, all) => {
62928
+ for (var name in all)
62929
+ __defProp3(target, name, { get: all[name], enumerable: true });
62930
+ };
62931
+ var __copyProps3 = (to, from, except, desc) => {
62932
+ if (from && typeof from === "object" || typeof from === "function") {
62933
+ for (let key of __getOwnPropNames3(from))
62934
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62935
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62936
+ }
62937
+ return to;
62938
+ };
62939
+ var __toESM3 = (mod, isNodeMode, target) => (target = mod != null ? __create3(__getProtoOf3(mod)) : {}, __copyProps3(
62940
+ // If the importer is in node compatibility mode or this is not an ESM
62941
+ // file that has been converted to a CommonJS file using a Babel-
62942
+ // compatible transform (i.e. "__esModule" has not been set), then set
62943
+ // "default" to the CommonJS "module.exports" for node compatibility.
62944
+ isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target,
62945
+ mod
62946
+ ));
62947
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62948
+ var src_exports = {};
62949
+ __export2(src_exports, {
62950
+ credentialsTreatedAsExpired: () => credentialsTreatedAsExpired,
62951
+ credentialsWillNeedRefresh: () => credentialsWillNeedRefresh,
62952
+ defaultProvider: () => defaultProvider
62953
+ });
62954
+ module2.exports = __toCommonJS2(src_exports);
62955
+ var import_credential_provider_env = require_dist_cjs38();
62956
+ var import_shared_ini_file_loader = require_dist_cjs13();
62957
+ var import_property_provider = require_dist_cjs12();
62958
+ var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
62959
+ var remoteProvider = /* @__PURE__ */ __name(async (init2) => {
62960
+ var _a, _b;
62961
+ const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM3(require_dist_cjs39()));
62962
+ if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
62963
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromHttp/fromContainerMetadata");
62964
+ const { fromHttp } = await Promise.resolve().then(() => __toESM3(require_dist_cjs40()));
62965
+ return (0, import_property_provider.chain)(fromHttp(init2), fromContainerMetadata(init2));
62966
+ }
62967
+ if (process.env[ENV_IMDS_DISABLED]) {
62968
+ return async () => {
62969
+ throw new import_property_provider.CredentialsProviderError("EC2 Instance Metadata Service access disabled");
62970
+ };
62971
+ }
62972
+ (_b = init2.logger) == null ? void 0 : _b.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromInstanceMetadata");
62973
+ return fromInstanceMetadata(init2);
62974
+ }, "remoteProvider");
62975
+ var defaultProvider = /* @__PURE__ */ __name((init2 = {}) => (0, import_property_provider.memoize)(
62976
+ (0, import_property_provider.chain)(
62977
+ ...init2.profile || process.env[import_shared_ini_file_loader.ENV_PROFILE] ? [] : [
62978
+ async () => {
62979
+ var _a;
62980
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromEnv");
62981
+ return (0, import_credential_provider_env.fromEnv)(init2)();
62982
+ }
62983
+ ],
62984
+ async () => {
62985
+ var _a;
62986
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromSSO");
62987
+ const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init2;
62988
+ if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
62989
+ throw new import_property_provider.CredentialsProviderError(
62990
+ "Skipping SSO provider in default chain (inputs do not include SSO fields)."
62991
+ );
62992
+ }
62993
+ const { fromSSO } = await Promise.resolve().then(() => __toESM3(require_dist_cjs52()));
62994
+ return fromSSO(init2)();
62995
+ },
62996
+ async () => {
62997
+ var _a;
62998
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromIni");
62999
+ const { fromIni } = await Promise.resolve().then(() => __toESM3(require_dist_cjs55()));
63000
+ return fromIni(init2)();
63001
+ },
63002
+ async () => {
63003
+ var _a;
63004
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromProcess");
63005
+ const { fromProcess } = await Promise.resolve().then(() => __toESM3(require_dist_cjs53()));
63006
+ return fromProcess(init2)();
63007
+ },
63008
+ async () => {
63009
+ var _a;
63010
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromTokenFile");
63011
+ const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM3(require_dist_cjs54()));
63012
+ return fromTokenFile2(init2)();
63013
+ },
63014
+ async () => {
63015
+ var _a;
63016
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::remoteProvider");
63017
+ return (await remoteProvider(init2))();
63018
+ },
63019
+ async () => {
63020
+ throw new import_property_provider.CredentialsProviderError("Could not load credentials from any providers", false);
63021
+ }
63022
+ ),
63023
+ credentialsTreatedAsExpired,
63024
+ credentialsWillNeedRefresh
63025
+ ), "defaultProvider");
63026
+ var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials2) => (credentials2 == null ? void 0 : credentials2.expiration) !== void 0, "credentialsWillNeedRefresh");
63027
+ var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials2) => (credentials2 == null ? void 0 : credentials2.expiration) !== void 0 && credentials2.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired");
63028
+ }
63029
+ });
63030
+
63031
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js
63032
+ var require_ruleset4 = __commonJS({
63033
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) {
63034
+ "use strict";
63035
+ Object.defineProperty(exports2, "__esModule", { value: true });
63036
+ exports2.ruleSet = void 0;
63037
+ var F2 = "required";
63038
+ var G = "type";
63039
+ var H = "fn";
63040
+ var I = "argv";
63041
+ var J = "ref";
63042
+ var a = false;
63043
+ var b = true;
63044
+ var c = "booleanEquals";
63045
+ var d = "stringEquals";
63046
+ var e2 = "sigv4";
63047
+ var f3 = "sts";
63048
+ var g = "us-east-1";
63049
+ var h2 = "endpoint";
63050
+ var i2 = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
63051
+ var j = "tree";
63052
+ var k = "error";
63053
+ var l = "getAttr";
63054
+ var m2 = { [F2]: false, [G]: "String" };
63055
+ var n = { [F2]: true, "default": false, [G]: "Boolean" };
63056
+ var o = { [J]: "Endpoint" };
63057
+ var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
63058
+ var q = { [J]: "Region" };
63059
+ var r2 = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" };
63060
+ var s2 = { [J]: "UseFIPS" };
63061
+ var t2 = { [J]: "UseDualStack" };
63062
+ var u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e2, "signingName": f3, "signingRegion": g }] }, "headers": {} };
63063
+ var v = {};
63064
+ var w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h2]: u, [G]: h2 };
63065
+ var x2 = { [H]: c, [I]: [s2, true] };
63066
+ var y = { [H]: c, [I]: [t2, true] };
63067
+ var z2 = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] };
63068
+ var A2 = { [J]: "PartitionResult" };
63069
+ var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A2, "supportsDualStack"] }] };
63070
+ var C = [{ [H]: "isSet", [I]: [o] }];
63071
+ var D = [x2];
63072
+ var E = [y];
63073
+ var _data = { version: "1.0", parameters: { Region: m2, UseDualStack: n, UseFIPS: n, Endpoint: m2, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r2, { [H]: c, [I]: [s2, a] }, { [H]: c, [I]: [t2, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h2 }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h2 }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h2 }, { endpoint: { url: i2, properties: { authSchemes: [{ name: e2, signingName: f3, signingRegion: "{Region}" }] }, headers: v }, [G]: h2 }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h2 }], [G]: j }, { conditions: [p], rules: [{ conditions: [r2], rules: [{ conditions: [x2, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z2] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z2, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A2, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h2 }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h2 }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i2, properties: v, headers: v }, [G]: h2 }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
63074
+ exports2.ruleSet = _data;
63075
+ }
63076
+ });
63077
+
63078
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js
63079
+ var require_endpointResolver4 = __commonJS({
63080
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) {
63081
+ "use strict";
63082
+ Object.defineProperty(exports2, "__esModule", { value: true });
63083
+ exports2.defaultEndpointResolver = void 0;
63084
+ var util_endpoints_1 = require_dist_cjs7();
63085
+ var util_endpoints_2 = require_dist_cjs6();
63086
+ var ruleset_1 = require_ruleset4();
63087
+ var defaultEndpointResolver = (endpointParams, context = {}) => {
63088
+ return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
63089
+ endpointParams,
63090
+ logger: context.logger
63091
+ });
63092
+ };
63093
+ exports2.defaultEndpointResolver = defaultEndpointResolver;
63094
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
63095
+ }
63096
+ });
63097
+
63098
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js
63099
+ var require_runtimeConfig_shared4 = __commonJS({
63100
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) {
63101
+ "use strict";
63102
+ Object.defineProperty(exports2, "__esModule", { value: true });
63103
+ exports2.getRuntimeConfig = void 0;
63104
+ var core_1 = require_dist_cjs37();
63105
+ var core_2 = require_dist_cjs34();
63106
+ var smithy_client_1 = require_dist_cjs32();
63107
+ var url_parser_1 = require_dist_cjs16();
63108
+ var util_base64_1 = require_dist_cjs25();
63109
+ var util_utf8_1 = require_dist_cjs24();
63110
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4();
63111
+ var endpointResolver_1 = require_endpointResolver4();
63112
+ var getRuntimeConfig = (config) => {
63113
+ return {
63114
+ apiVersion: "2011-06-15",
63115
+ base64Decoder: (config == null ? void 0 : config.base64Decoder) ?? util_base64_1.fromBase64,
63116
+ base64Encoder: (config == null ? void 0 : config.base64Encoder) ?? util_base64_1.toBase64,
63117
+ disableHostPrefix: (config == null ? void 0 : config.disableHostPrefix) ?? false,
63118
+ endpointProvider: (config == null ? void 0 : config.endpointProvider) ?? endpointResolver_1.defaultEndpointResolver,
63119
+ extensions: (config == null ? void 0 : config.extensions) ?? [],
63120
+ httpAuthSchemeProvider: (config == null ? void 0 : config.httpAuthSchemeProvider) ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
63121
+ httpAuthSchemes: (config == null ? void 0 : config.httpAuthSchemes) ?? [
63122
+ {
63123
+ schemeId: "aws.auth#sigv4",
63124
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
63125
+ signer: new core_1.AwsSdkSigV4Signer()
63126
+ },
63127
+ {
63128
+ schemeId: "smithy.api#noAuth",
63129
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
63130
+ signer: new core_2.NoAuthSigner()
63131
+ }
63132
+ ],
63133
+ logger: (config == null ? void 0 : config.logger) ?? new smithy_client_1.NoOpLogger(),
63134
+ serviceId: (config == null ? void 0 : config.serviceId) ?? "STS",
63135
+ urlParser: (config == null ? void 0 : config.urlParser) ?? url_parser_1.parseUrl,
63136
+ utf8Decoder: (config == null ? void 0 : config.utf8Decoder) ?? util_utf8_1.fromUtf8,
63137
+ utf8Encoder: (config == null ? void 0 : config.utf8Encoder) ?? util_utf8_1.toUtf8
63138
+ };
63139
+ };
63140
+ exports2.getRuntimeConfig = getRuntimeConfig;
63141
+ }
63142
+ });
63143
+
63144
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js
63145
+ var require_runtimeConfig4 = __commonJS({
63146
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) {
63147
+ "use strict";
63148
+ Object.defineProperty(exports2, "__esModule", { value: true });
63149
+ exports2.getRuntimeConfig = void 0;
63150
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
63151
+ var package_json_1 = tslib_1.__importDefault(require_package5());
63152
+ var core_1 = require_dist_cjs37();
63153
+ var credential_provider_node_1 = require_dist_cjs56();
63154
+ var util_user_agent_node_1 = require_dist_cjs41();
63155
+ var config_resolver_1 = require_dist_cjs11();
63156
+ var core_2 = require_dist_cjs34();
63157
+ var hash_node_1 = require_dist_cjs42();
63158
+ var middleware_retry_1 = require_dist_cjs33();
63159
+ var node_config_provider_1 = require_dist_cjs14();
63160
+ var node_http_handler_1 = require_dist_cjs28();
63161
+ var util_body_length_node_1 = require_dist_cjs43();
63162
+ var util_retry_1 = require_dist_cjs20();
63163
+ var runtimeConfig_shared_1 = require_runtimeConfig_shared4();
63164
+ var smithy_client_1 = require_dist_cjs32();
63165
+ var util_defaults_mode_node_1 = require_dist_cjs44();
63166
+ var smithy_client_2 = require_dist_cjs32();
60979
63167
  var getRuntimeConfig = (config) => {
60980
63168
  (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
60981
63169
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
@@ -61119,7 +63307,7 @@ var require_STSClient = __commonJS({
61119
63307
  } });
61120
63308
  var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4();
61121
63309
  var EndpointParameters_1 = require_EndpointParameters();
61122
- var runtimeConfig_1 = require_runtimeConfig3();
63310
+ var runtimeConfig_1 = require_runtimeConfig4();
61123
63311
  var runtimeExtensions_1 = require_runtimeExtensions();
61124
63312
  var STSClient2 = class extends smithy_client_1.Client {
61125
63313
  constructor(...[configuration]) {
@@ -61163,7 +63351,7 @@ var require_STSClient = __commonJS({
61163
63351
  });
61164
63352
 
61165
63353
  // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js
61166
- var require_dist_cjs50 = __commonJS({
63354
+ var require_dist_cjs57 = __commonJS({
61167
63355
  "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2, module2) {
61168
63356
  "use strict";
61169
63357
  var __defProp3 = Object.defineProperty;
@@ -62518,217 +64706,8 @@ var require_dist_cjs50 = __commonJS({
62518
64706
  }
62519
64707
  });
62520
64708
 
62521
- // ../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.577.0/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js
62522
- var require_dist_cjs51 = __commonJS({
62523
- "../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.577.0/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2, module2) {
62524
- "use strict";
62525
- var __defProp3 = Object.defineProperty;
62526
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62527
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
62528
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62529
- var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62530
- var __export2 = (target, all) => {
62531
- for (var name in all)
62532
- __defProp3(target, name, { get: all[name], enumerable: true });
62533
- };
62534
- var __copyProps3 = (to, from, except, desc) => {
62535
- if (from && typeof from === "object" || typeof from === "function") {
62536
- for (let key of __getOwnPropNames3(from))
62537
- if (!__hasOwnProp3.call(to, key) && key !== except)
62538
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62539
- }
62540
- return to;
62541
- };
62542
- var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62543
- var src_exports = {};
62544
- __export2(src_exports, {
62545
- fromProcess: () => fromProcess
62546
- });
62547
- module2.exports = __toCommonJS2(src_exports);
62548
- var import_shared_ini_file_loader = require_dist_cjs13();
62549
- var import_property_provider = require_dist_cjs12();
62550
- var import_child_process = require("child_process");
62551
- var import_util5 = require("util");
62552
- var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data) => {
62553
- if (data.Version !== 1) {
62554
- throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
62555
- }
62556
- if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {
62557
- throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
62558
- }
62559
- if (data.Expiration) {
62560
- const currentTime = /* @__PURE__ */ new Date();
62561
- const expireTime = new Date(data.Expiration);
62562
- if (expireTime < currentTime) {
62563
- throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
62564
- }
62565
- }
62566
- return {
62567
- accessKeyId: data.AccessKeyId,
62568
- secretAccessKey: data.SecretAccessKey,
62569
- ...data.SessionToken && { sessionToken: data.SessionToken },
62570
- ...data.Expiration && { expiration: new Date(data.Expiration) },
62571
- ...data.CredentialScope && { credentialScope: data.CredentialScope }
62572
- };
62573
- }, "getValidatedProcessCredentials");
62574
- var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles) => {
62575
- const profile = profiles[profileName];
62576
- if (profiles[profileName]) {
62577
- const credentialProcess = profile["credential_process"];
62578
- if (credentialProcess !== void 0) {
62579
- const execPromise = (0, import_util5.promisify)(import_child_process.exec);
62580
- try {
62581
- const { stdout } = await execPromise(credentialProcess);
62582
- let data;
62583
- try {
62584
- data = JSON.parse(stdout.trim());
62585
- } catch {
62586
- throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
62587
- }
62588
- return getValidatedProcessCredentials(profileName, data);
62589
- } catch (error2) {
62590
- throw new import_property_provider.CredentialsProviderError(error2.message);
62591
- }
62592
- } else {
62593
- throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`);
62594
- }
62595
- } else {
62596
- throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`);
62597
- }
62598
- }, "resolveProcessCredentials");
62599
- var fromProcess = /* @__PURE__ */ __name((init2 = {}) => async () => {
62600
- var _a;
62601
- (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process", "fromProcess");
62602
- const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init2);
62603
- return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init2), profiles);
62604
- }, "fromProcess");
62605
- }
62606
- });
62607
-
62608
- // ../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js
62609
- var require_fromWebToken = __commonJS({
62610
- "../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js"(exports2) {
62611
- "use strict";
62612
- var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
62613
- if (k2 === void 0)
62614
- k2 = k;
62615
- var desc = Object.getOwnPropertyDescriptor(m2, k);
62616
- if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
62617
- desc = { enumerable: true, get: function() {
62618
- return m2[k];
62619
- } };
62620
- }
62621
- Object.defineProperty(o, k2, desc);
62622
- } : function(o, m2, k, k2) {
62623
- if (k2 === void 0)
62624
- k2 = k;
62625
- o[k2] = m2[k];
62626
- });
62627
- var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
62628
- Object.defineProperty(o, "default", { enumerable: true, value: v });
62629
- } : function(o, v) {
62630
- o["default"] = v;
62631
- });
62632
- var __importStar3 = exports2 && exports2.__importStar || function(mod) {
62633
- if (mod && mod.__esModule)
62634
- return mod;
62635
- var result = {};
62636
- if (mod != null) {
62637
- for (var k in mod)
62638
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
62639
- __createBinding3(result, mod, k);
62640
- }
62641
- __setModuleDefault3(result, mod);
62642
- return result;
62643
- };
62644
- Object.defineProperty(exports2, "__esModule", { value: true });
62645
- exports2.fromWebToken = void 0;
62646
- var fromWebToken2 = (init2) => async () => {
62647
- var _a;
62648
- (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromWebToken");
62649
- const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy: policy4, durationSeconds } = init2;
62650
- let { roleAssumerWithWebIdentity } = init2;
62651
- if (!roleAssumerWithWebIdentity) {
62652
- const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar3(require_dist_cjs50()));
62653
- roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
62654
- ...init2.clientConfig,
62655
- credentialProviderLogger: init2.logger,
62656
- parentClientConfig: init2.parentClientConfig
62657
- }, init2.clientPlugins);
62658
- }
62659
- return roleAssumerWithWebIdentity({
62660
- RoleArn: roleArn,
62661
- RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,
62662
- WebIdentityToken: webIdentityToken,
62663
- ProviderId: providerId,
62664
- PolicyArns: policyArns,
62665
- Policy: policy4,
62666
- DurationSeconds: durationSeconds
62667
- });
62668
- };
62669
- exports2.fromWebToken = fromWebToken2;
62670
- }
62671
- });
62672
-
62673
- // ../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js
62674
- var require_fromTokenFile = __commonJS({
62675
- "../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js"(exports2) {
62676
- "use strict";
62677
- Object.defineProperty(exports2, "__esModule", { value: true });
62678
- exports2.fromTokenFile = void 0;
62679
- var property_provider_1 = require_dist_cjs12();
62680
- var fs_1 = require("fs");
62681
- var fromWebToken_1 = require_fromWebToken();
62682
- var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
62683
- var ENV_ROLE_ARN = "AWS_ROLE_ARN";
62684
- var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
62685
- var fromTokenFile2 = (init2 = {}) => async () => {
62686
- var _a;
62687
- (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromTokenFile");
62688
- const webIdentityTokenFile = (init2 == null ? void 0 : init2.webIdentityTokenFile) ?? process.env[ENV_TOKEN_FILE];
62689
- const roleArn = (init2 == null ? void 0 : init2.roleArn) ?? process.env[ENV_ROLE_ARN];
62690
- const roleSessionName = (init2 == null ? void 0 : init2.roleSessionName) ?? process.env[ENV_ROLE_SESSION_NAME];
62691
- if (!webIdentityTokenFile || !roleArn) {
62692
- throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified");
62693
- }
62694
- return (0, fromWebToken_1.fromWebToken)({
62695
- ...init2,
62696
- webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
62697
- roleArn,
62698
- roleSessionName
62699
- })();
62700
- };
62701
- exports2.fromTokenFile = fromTokenFile2;
62702
- }
62703
- });
62704
-
62705
- // ../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js
62706
- var require_dist_cjs52 = __commonJS({
62707
- "../node_modules/.pnpm/@aws-sdk+credential-provider-web-identity@3.577.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2, module2) {
62708
- "use strict";
62709
- var __defProp3 = Object.defineProperty;
62710
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62711
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
62712
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62713
- var __copyProps3 = (to, from, except, desc) => {
62714
- if (from && typeof from === "object" || typeof from === "function") {
62715
- for (let key of __getOwnPropNames3(from))
62716
- if (!__hasOwnProp3.call(to, key) && key !== except)
62717
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62718
- }
62719
- return to;
62720
- };
62721
- var __reExport = (target, mod, secondTarget) => (__copyProps3(target, mod, "default"), secondTarget && __copyProps3(secondTarget, mod, "default"));
62722
- var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62723
- var src_exports = {};
62724
- module2.exports = __toCommonJS2(src_exports);
62725
- __reExport(src_exports, require_fromTokenFile(), module2.exports);
62726
- __reExport(src_exports, require_fromWebToken(), module2.exports);
62727
- }
62728
- });
62729
-
62730
64709
  // ../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js
62731
- var require_dist_cjs53 = __commonJS({
64710
+ var require_dist_cjs58 = __commonJS({
62732
64711
  "../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2, module2) {
62733
64712
  "use strict";
62734
64713
  var __create3 = Object.create;
@@ -62788,7 +64767,7 @@ var require_dist_cjs53 = __commonJS({
62788
64767
  (_a = options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveAssumeRoleCredentials (STS)");
62789
64768
  const data = profiles[profileName];
62790
64769
  if (!options.roleAssumer) {
62791
- const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM3(require_dist_cjs50()));
64770
+ const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM3(require_dist_cjs57()));
62792
64771
  options.roleAssumer = getDefaultRoleAssumer(
62793
64772
  {
62794
64773
  ...options.clientConfig,
@@ -62830,7 +64809,7 @@ var require_dist_cjs53 = __commonJS({
62830
64809
  return options.roleAssumer(sourceCreds, params);
62831
64810
  }, "resolveAssumeRoleCredentials");
62832
64811
  var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile");
62833
- var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM3(require_dist_cjs51())).then(
64812
+ var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM3(require_dist_cjs53())).then(
62834
64813
  ({ fromProcess }) => fromProcess({
62835
64814
  ...options,
62836
64815
  profile
@@ -62856,7 +64835,7 @@ var require_dist_cjs53 = __commonJS({
62856
64835
  });
62857
64836
  }, "resolveStaticCredentials");
62858
64837
  var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile");
62859
- var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM3(require_dist_cjs52())).then(
64838
+ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM3(require_dist_cjs54())).then(
62860
64839
  ({ fromTokenFile: fromTokenFile2 }) => fromTokenFile2({
62861
64840
  webIdentityTokenFile: profile.web_identity_token_file,
62862
64841
  roleArn: profile.role_arn,
@@ -62898,7 +64877,7 @@ var require_dist_cjs53 = __commonJS({
62898
64877
  });
62899
64878
 
62900
64879
  // ../node_modules/.pnpm/@aws-sdk+credential-provider-node@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js
62901
- var require_dist_cjs54 = __commonJS({
64880
+ var require_dist_cjs59 = __commonJS({
62902
64881
  "../node_modules/.pnpm/@aws-sdk+credential-provider-node@3.583.0_@aws-sdk+client-sso-oidc@3.583.0_@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2, module2) {
62903
64882
  "use strict";
62904
64883
  var __create3 = Object.create;
@@ -62980,19 +64959,19 @@ var require_dist_cjs54 = __commonJS({
62980
64959
  async () => {
62981
64960
  var _a;
62982
64961
  (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromIni");
62983
- const { fromIni } = await Promise.resolve().then(() => __toESM3(require_dist_cjs53()));
64962
+ const { fromIni } = await Promise.resolve().then(() => __toESM3(require_dist_cjs58()));
62984
64963
  return fromIni(init2)();
62985
64964
  },
62986
64965
  async () => {
62987
64966
  var _a;
62988
64967
  (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromProcess");
62989
- const { fromProcess } = await Promise.resolve().then(() => __toESM3(require_dist_cjs51()));
64968
+ const { fromProcess } = await Promise.resolve().then(() => __toESM3(require_dist_cjs53()));
62990
64969
  return fromProcess(init2)();
62991
64970
  },
62992
64971
  async () => {
62993
64972
  var _a;
62994
64973
  (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromTokenFile");
62995
- const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM3(require_dist_cjs52()));
64974
+ const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM3(require_dist_cjs54()));
62996
64975
  return fromTokenFile2(init2)();
62997
64976
  },
62998
64977
  async () => {
@@ -63013,7 +64992,7 @@ var require_dist_cjs54 = __commonJS({
63013
64992
  });
63014
64993
 
63015
64994
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/ruleset.js
63016
- var require_ruleset4 = __commonJS({
64995
+ var require_ruleset5 = __commonJS({
63017
64996
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/ruleset.js"(exports2) {
63018
64997
  "use strict";
63019
64998
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -63046,14 +65025,14 @@ var require_ruleset4 = __commonJS({
63046
65025
  });
63047
65026
 
63048
65027
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/endpointResolver.js
63049
- var require_endpointResolver4 = __commonJS({
65028
+ var require_endpointResolver5 = __commonJS({
63050
65029
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/endpointResolver.js"(exports2) {
63051
65030
  "use strict";
63052
65031
  Object.defineProperty(exports2, "__esModule", { value: true });
63053
65032
  exports2.defaultEndpointResolver = void 0;
63054
65033
  var util_endpoints_1 = require_dist_cjs7();
63055
65034
  var util_endpoints_2 = require_dist_cjs6();
63056
- var ruleset_1 = require_ruleset4();
65035
+ var ruleset_1 = require_ruleset5();
63057
65036
  var defaultEndpointResolver = (endpointParams, context = {}) => {
63058
65037
  return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
63059
65038
  endpointParams,
@@ -63066,7 +65045,7 @@ var require_endpointResolver4 = __commonJS({
63066
65045
  });
63067
65046
 
63068
65047
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.shared.js
63069
- var require_runtimeConfig_shared4 = __commonJS({
65048
+ var require_runtimeConfig_shared5 = __commonJS({
63070
65049
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.shared.js"(exports2) {
63071
65050
  "use strict";
63072
65051
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -63077,7 +65056,7 @@ var require_runtimeConfig_shared4 = __commonJS({
63077
65056
  var util_base64_1 = require_dist_cjs25();
63078
65057
  var util_utf8_1 = require_dist_cjs24();
63079
65058
  var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
63080
- var endpointResolver_1 = require_endpointResolver4();
65059
+ var endpointResolver_1 = require_endpointResolver5();
63081
65060
  var getRuntimeConfig = (config) => {
63082
65061
  return {
63083
65062
  apiVersion: "2018-08-01",
@@ -63106,7 +65085,7 @@ var require_runtimeConfig_shared4 = __commonJS({
63106
65085
  });
63107
65086
 
63108
65087
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.js
63109
- var require_runtimeConfig4 = __commonJS({
65088
+ var require_runtimeConfig5 = __commonJS({
63110
65089
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.js"(exports2) {
63111
65090
  "use strict";
63112
65091
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -63114,7 +65093,7 @@ var require_runtimeConfig4 = __commonJS({
63114
65093
  var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));
63115
65094
  var package_json_1 = tslib_1.__importDefault(require_package2());
63116
65095
  var core_1 = require_dist_cjs37();
63117
- var credential_provider_node_1 = require_dist_cjs54();
65096
+ var credential_provider_node_1 = require_dist_cjs59();
63118
65097
  var util_user_agent_node_1 = require_dist_cjs41();
63119
65098
  var config_resolver_1 = require_dist_cjs11();
63120
65099
  var hash_node_1 = require_dist_cjs42();
@@ -63123,7 +65102,7 @@ var require_runtimeConfig4 = __commonJS({
63123
65102
  var node_http_handler_1 = require_dist_cjs28();
63124
65103
  var util_body_length_node_1 = require_dist_cjs43();
63125
65104
  var util_retry_1 = require_dist_cjs20();
63126
- var runtimeConfig_shared_1 = require_runtimeConfig_shared4();
65105
+ var runtimeConfig_shared_1 = require_runtimeConfig_shared5();
63127
65106
  var smithy_client_1 = require_dist_cjs32();
63128
65107
  var util_defaults_mode_node_1 = require_dist_cjs44();
63129
65108
  var smithy_client_2 = require_dist_cjs32();
@@ -63159,7 +65138,7 @@ var require_runtimeConfig4 = __commonJS({
63159
65138
  });
63160
65139
 
63161
65140
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/index.js
63162
- var require_dist_cjs55 = __commonJS({
65141
+ var require_dist_cjs60 = __commonJS({
63163
65142
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/index.js"(exports2, module2) {
63164
65143
  "use strict";
63165
65144
  var __defProp3 = Object.defineProperty;
@@ -63240,7 +65219,7 @@ var require_dist_cjs55 = __commonJS({
63240
65219
  Region: { type: "builtInParams", name: "region" },
63241
65220
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
63242
65221
  };
63243
- var import_runtimeConfig = require_runtimeConfig4();
65222
+ var import_runtimeConfig = require_runtimeConfig5();
63244
65223
  var import_region_config_resolver = require_dist_cjs45();
63245
65224
  var import_protocol_http = require_dist_cjs2();
63246
65225
  var import_smithy_client = require_dist_cjs32();
@@ -64490,7 +66469,7 @@ var init_connections = __esm({
64490
66469
  const { driver: driver2 } = credentials2;
64491
66470
  if (driver2 === "aws-data-api") {
64492
66471
  assertPackages("@aws-sdk/client-rds-data");
64493
- const { RDSDataClient, ExecuteStatementCommand, TypeHint } = await Promise.resolve().then(() => __toESM(require_dist_cjs55()));
66472
+ const { RDSDataClient, ExecuteStatementCommand, TypeHint } = await Promise.resolve().then(() => __toESM(require_dist_cjs60()));
64494
66473
  const { AwsDataApiSession, drizzle } = await import("drizzle-orm/aws-data-api/pg");
64495
66474
  const { migrate: migrate2 } = await import("drizzle-orm/aws-data-api/pg/migrator");
64496
66475
  const { PgDialect: PgDialect2 } = await import("drizzle-orm/pg-core");
@@ -64504,7 +66483,6 @@ var init_connections = __esm({
64504
66483
  rdsClient,
64505
66484
  new PgDialect2(),
64506
66485
  void 0,
64507
- void 0,
64508
66486
  config,
64509
66487
  void 0
64510
66488
  );
@@ -65016,6 +66994,36 @@ var init_connections = __esm({
65016
66994
  assertUnreachable(driver2);
65017
66995
  }
65018
66996
  }
66997
+ if (await checkPackage("better-sqlite3")) {
66998
+ const { default: Database } = await import("better-sqlite3");
66999
+ const { drizzle } = await import("drizzle-orm/better-sqlite3");
67000
+ const { migrate: migrate2 } = await import("drizzle-orm/better-sqlite3/migrator");
67001
+ const sqlite = new Database(
67002
+ normaliseSQLiteUrl(credentials2.url, "better-sqlite")
67003
+ );
67004
+ const drzl = drizzle(sqlite);
67005
+ const migrateFn = async (config) => {
67006
+ return migrate2(drzl, config);
67007
+ };
67008
+ const db = {
67009
+ query: async (sql, params = []) => {
67010
+ return sqlite.prepare(sql).bind(params).all();
67011
+ },
67012
+ run: async (query) => {
67013
+ sqlite.prepare(query).run();
67014
+ }
67015
+ };
67016
+ const proxy = {
67017
+ proxy: async (params) => {
67018
+ const preparedParams = prepareSqliteParams(params.params);
67019
+ if (params.method === "values" || params.method === "get" || params.method === "all") {
67020
+ return sqlite.prepare(params.sql).raw(params.mode === "array").all(preparedParams);
67021
+ }
67022
+ return sqlite.prepare(params.sql).run(preparedParams);
67023
+ }
67024
+ };
67025
+ return { ...db, ...proxy, migrate: migrateFn };
67026
+ }
65019
67027
  if (await checkPackage("@libsql/client")) {
65020
67028
  const { createClient } = await import("@libsql/client");
65021
67029
  const { drizzle } = await import("drizzle-orm/libsql");
@@ -65052,36 +67060,6 @@ var init_connections = __esm({
65052
67060
  };
65053
67061
  return { ...db, ...proxy, migrate: migrateFn };
65054
67062
  }
65055
- if (await checkPackage("better-sqlite3")) {
65056
- const { default: Database } = await import("better-sqlite3");
65057
- const { drizzle } = await import("drizzle-orm/better-sqlite3");
65058
- const { migrate: migrate2 } = await import("drizzle-orm/better-sqlite3/migrator");
65059
- const sqlite = new Database(
65060
- normaliseSQLiteUrl(credentials2.url, "better-sqlite")
65061
- );
65062
- const drzl = drizzle(sqlite);
65063
- const migrateFn = async (config) => {
65064
- return migrate2(drzl, config);
65065
- };
65066
- const db = {
65067
- query: async (sql, params = []) => {
65068
- return sqlite.prepare(sql).bind(params).all();
65069
- },
65070
- run: async (query) => {
65071
- sqlite.prepare(query).run();
65072
- }
65073
- };
65074
- const proxy = {
65075
- proxy: async (params) => {
65076
- const preparedParams = prepareSqliteParams(params.params);
65077
- if (params.method === "values" || params.method === "get" || params.method === "all") {
65078
- return sqlite.prepare(params.sql).raw(params.mode === "array").all(preparedParams);
65079
- }
65080
- return sqlite.prepare(params.sql).run(preparedParams);
65081
- }
65082
- };
65083
- return { ...db, ...proxy, migrate: migrateFn };
65084
- }
65085
67063
  console.log(
65086
67064
  "Please install either 'better-sqlite3' or '@libsql/client' for Drizzle Kit to connect to SQLite databases"
65087
67065
  );
@@ -65174,7 +67152,7 @@ var init_selector_ui = __esm({
65174
67152
  });
65175
67153
 
65176
67154
  // src/cli/commands/libSqlPushUtils.ts
65177
- var getOldTableName2, _moveDataStatements2, libSqlLogSuggestionsAndReturn;
67155
+ var getOldTableName2, libSqlLogSuggestionsAndReturn;
65178
67156
  var init_libSqlPushUtils = __esm({
65179
67157
  "src/cli/commands/libSqlPushUtils.ts"() {
65180
67158
  "use strict";
@@ -65191,67 +67169,6 @@ var init_libSqlPushUtils = __esm({
65191
67169
  }
65192
67170
  return tableName;
65193
67171
  };
65194
- _moveDataStatements2 = (tableName, json, dataLoss = false) => {
65195
- const statements = [];
65196
- const newTableName = `__new_${tableName}`;
65197
- const tableColumns = Object.values(json.tables[tableName].columns);
65198
- const referenceData = Object.values(json.tables[tableName].foreignKeys);
65199
- const compositePKs = Object.values(
65200
- json.tables[tableName].compositePrimaryKeys
65201
- ).map((it) => SQLiteSquasher.unsquashPK(it));
65202
- const checkConstraints = Object.values(json.tables[tableName].checkConstraints);
65203
- const fks = referenceData.map((it) => SQLiteSquasher.unsquashPushFK(it));
65204
- const mappedCheckConstraints = checkConstraints.map(
65205
- (it) => it.replaceAll(`"${tableName}".`, `"${newTableName}".`).replaceAll(`\`${tableName}\`.`, `\`${newTableName}\`.`).replaceAll(`${tableName}.`, `${newTableName}.`).replaceAll(`'${tableName}'.`, `\`${newTableName}\`.`)
65206
- );
65207
- statements.push(
65208
- new SQLiteCreateTableConvertor().convert({
65209
- type: "sqlite_create_table",
65210
- tableName: newTableName,
65211
- columns: tableColumns,
65212
- referenceData: fks,
65213
- compositePKs,
65214
- checkConstraints: mappedCheckConstraints
65215
- })
65216
- );
65217
- if (!dataLoss) {
65218
- const columns = Object.keys(json.tables[tableName].columns).map(
65219
- (c) => `"${c}"`
65220
- );
65221
- statements.push(
65222
- `INSERT INTO \`${newTableName}\`(${columns.join(
65223
- ", "
65224
- )}) SELECT ${columns.join(", ")} FROM \`${tableName}\`;`
65225
- );
65226
- }
65227
- statements.push(
65228
- new SQLiteDropTableConvertor().convert({
65229
- type: "drop_table",
65230
- tableName,
65231
- schema: ""
65232
- })
65233
- );
65234
- statements.push(
65235
- new SqliteRenameTableConvertor().convert({
65236
- fromSchema: "",
65237
- tableNameFrom: newTableName,
65238
- tableNameTo: tableName,
65239
- toSchema: "",
65240
- type: "rename_table"
65241
- })
65242
- );
65243
- for (const idx of Object.values(json.tables[tableName].indexes)) {
65244
- statements.push(
65245
- new CreateSqliteIndexConvertor().convert({
65246
- type: "create_index",
65247
- tableName,
65248
- schema: "",
65249
- data: idx
65250
- })
65251
- );
65252
- }
65253
- return statements;
65254
- };
65255
67172
  libSqlLogSuggestionsAndReturn = async (connection, statements, json1, json2, meta) => {
65256
67173
  let shouldAskForApprove = false;
65257
67174
  const statementsToExecute = [];
@@ -65391,12 +67308,8 @@ var init_libSqlPushUtils = __esm({
65391
67308
  const tablesRefs = Object.values(json2.tables[table5.name].foreignKeys).filter((t2) => SQLiteSquasher.unsquashPushFK(t2).tableTo === tableName).map((it) => SQLiteSquasher.unsquashPushFK(it).tableFrom);
65392
67309
  tablesReferencingCurrent.push(...tablesRefs);
65393
67310
  }
65394
- if (!tablesReferencingCurrent.length) {
65395
- statementsToExecute.push(..._moveDataStatements2(tableName, json2, dataLoss));
65396
- continue;
65397
- }
65398
67311
  statementsToExecute.push(
65399
- ..._moveDataStatements2(tableName, json2, dataLoss)
67312
+ ...new LibSQLRecreateTableConvertor().convert(statement, void 0, "push", dataLoss)
65400
67313
  );
65401
67314
  } else if (statement.type === "alter_table_alter_column_set_generated" || statement.type === "alter_table_alter_column_drop_generated") {
65402
67315
  const tableName = statement.tableName;
@@ -66116,6 +68029,7 @@ var init_singlestorePushUtils = __esm({
66116
68029
  }
66117
68030
  } else if (statement.type === "singlestore_recreate_table") {
66118
68031
  const tableName = statement.tableName;
68032
+ let dataLoss = false;
66119
68033
  const prevColumns = json1.tables[tableName].columns;
66120
68034
  const currentColumns = json2.tables[tableName].columns;
66121
68035
  const { removedColumns, addedColumns } = findAddedAndRemoved(
@@ -66147,6 +68061,7 @@ var init_singlestorePushUtils = __esm({
66147
68061
  const columnConf = json2.tables[tableName].columns[addedColumn];
66148
68062
  const count = Number(res.count);
66149
68063
  if (count > 0 && columnConf.notNull && !columnConf.default) {
68064
+ dataLoss = true;
66150
68065
  infoToPrint.push(
66151
68066
  `\xB7 You're about to add not-null ${source_default.underline(
66152
68067
  addedColumn
@@ -66175,6 +68090,10 @@ var init_singlestorePushUtils = __esm({
66175
68090
  statementsToExecute.push(`TRUNCATE TABLE \`${tableName}\`;`);
66176
68091
  }
66177
68092
  }
68093
+ statementsToExecute.push(
68094
+ ...new SingleStoreRecreateTableConvertor().convert(statement, void 0, "push", dataLoss)
68095
+ );
68096
+ continue;
66178
68097
  }
66179
68098
  const stmnt = fromJson([statement], "singlestore", "push");
66180
68099
  if (typeof stmnt !== "undefined") {
@@ -66182,9 +68101,9 @@ var init_singlestorePushUtils = __esm({
66182
68101
  }
66183
68102
  }
66184
68103
  return {
66185
- statementsToExecute,
68104
+ statementsToExecute: [...new Set(statementsToExecute)],
66186
68105
  shouldAskForApprove,
66187
- infoToPrint,
68106
+ infoToPrint: [...new Set(infoToPrint)],
66188
68107
  columnsToRemove: [...new Set(columnsToRemove)],
66189
68108
  schemasToRemove: [...new Set(schemasToRemove)],
66190
68109
  tablesToTruncate: [...new Set(tablesToTruncate)],
@@ -69381,7 +71300,7 @@ var init_introspect_pg = __esm({
69381
71300
  "src/introspect-pg.ts"() {
69382
71301
  "use strict";
69383
71302
  import_drizzle_orm9 = require("drizzle-orm");
69384
- import_relations = require("drizzle-orm/_relations");
71303
+ import_relations = require("drizzle-orm/relations");
69385
71304
  init_utils();
69386
71305
  import_casing4 = require("drizzle-orm/casing");
69387
71306
  init_global();
@@ -71232,7 +73151,7 @@ var init_introspect = __esm({
71232
73151
  });
71233
73152
  });
71234
73153
  const uniqueImports = [...new Set(imports)];
71235
- const importsTs = `import { relations } from "drizzle-orm/_relations";
73154
+ const importsTs = `import { relations } from "drizzle-orm/relations";
71236
73155
  import { ${uniqueImports.join(
71237
73156
  ", "
71238
73157
  )} } from "./schema";
@@ -74598,7 +76517,7 @@ __export(studio_exports, {
74598
76517
  prepareServer: () => prepareServer,
74599
76518
  prepareSingleStoreSchema: () => prepareSingleStoreSchema
74600
76519
  });
74601
- var import_crypto9, import_drizzle_orm10, import_relations2, import_mysql_core3, import_pg_core3, import_singlestore_core3, import_sqlite_core3, import_fs12, import_node_https2, preparePgSchema, prepareMySqlSchema, prepareSQLiteSchema, prepareSingleStoreSchema, getCustomDefaults, drizzleForPostgres, drizzleForMySQL, drizzleForSQLite, drizzleForLibSQL, drizzleForSingleStore, extractRelations, init, proxySchema, defaultsSchema, schema5, jsonStringify, prepareServer;
76520
+ var import_crypto9, import_drizzle_orm10, import_mysql_core3, import_pg_core3, import_singlestore_core3, import_sqlite_core3, import_fs12, import_node_https2, preparePgSchema, prepareMySqlSchema, prepareSQLiteSchema, prepareSingleStoreSchema, getCustomDefaults, drizzleForPostgres, drizzleForMySQL, drizzleForSQLite, drizzleForLibSQL, drizzleForSingleStore, extractRelations, init, proxySchema, defaultsSchema, schema5, jsonStringify, prepareServer;
74602
76521
  var init_studio2 = __esm({
74603
76522
  "src/serializer/studio.ts"() {
74604
76523
  "use strict";
@@ -74606,7 +76525,6 @@ var init_studio2 = __esm({
74606
76525
  init_esm();
74607
76526
  import_crypto9 = require("crypto");
74608
76527
  import_drizzle_orm10 = require("drizzle-orm");
74609
- import_relations2 = require("drizzle-orm/_relations");
74610
76528
  import_mysql_core3 = require("drizzle-orm/mysql-core");
74611
76529
  import_pg_core3 = require("drizzle-orm/pg-core");
74612
76530
  import_singlestore_core3 = require("drizzle-orm/singlestore-core");
@@ -74641,7 +76559,7 @@ var init_studio2 = __esm({
74641
76559
  pgSchema2[schema6] = pgSchema2[schema6] || {};
74642
76560
  pgSchema2[schema6][k] = t2;
74643
76561
  }
74644
- if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76562
+ if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74645
76563
  relations4[k] = t2;
74646
76564
  }
74647
76565
  });
@@ -74670,7 +76588,7 @@ var init_studio2 = __esm({
74670
76588
  const schema6 = (0, import_mysql_core3.getTableConfig)(t2).schema || "public";
74671
76589
  mysqlSchema3[schema6][k] = t2;
74672
76590
  }
74673
- if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76591
+ if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74674
76592
  relations4[k] = t2;
74675
76593
  }
74676
76594
  });
@@ -74699,7 +76617,7 @@ var init_studio2 = __esm({
74699
76617
  const schema6 = "public";
74700
76618
  sqliteSchema2[schema6][k] = t2;
74701
76619
  }
74702
- if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76620
+ if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74703
76621
  relations4[k] = t2;
74704
76622
  }
74705
76623
  });
@@ -74728,7 +76646,7 @@ var init_studio2 = __esm({
74728
76646
  const schema6 = (0, import_singlestore_core3.getTableConfig)(t2).schema || "public";
74729
76647
  singlestoreSchema2[schema6][k] = t2;
74730
76648
  }
74731
- if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76649
+ if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74732
76650
  relations4[k] = t2;
74733
76651
  }
74734
76652
  });
@@ -74884,7 +76802,7 @@ var init_studio2 = __esm({
74884
76802
  extractRelations = (tablesConfig) => {
74885
76803
  const relations4 = Object.values(tablesConfig.tables).map(
74886
76804
  (it) => Object.entries(it.relations).map(([name, relation]) => {
74887
- const normalized = (0, import_relations2.normalizeRelation)(
76805
+ const normalized = (0, import_drizzle_orm10.normalizeRelation)(
74888
76806
  tablesConfig.tables,
74889
76807
  tablesConfig.tableNamesMap,
74890
76808
  relation
@@ -74907,9 +76825,9 @@ var init_studio2 = __esm({
74907
76825
  throw new Error("unsupported dialect");
74908
76826
  }
74909
76827
  let type;
74910
- if ((0, import_drizzle_orm10.is)(rel, import_relations2.One)) {
76828
+ if ((0, import_drizzle_orm10.is)(rel, import_drizzle_orm10.One)) {
74911
76829
  type = "one";
74912
- } else if ((0, import_drizzle_orm10.is)(rel, import_relations2.Many)) {
76830
+ } else if ((0, import_drizzle_orm10.is)(rel, import_drizzle_orm10.Many)) {
74913
76831
  type = "many";
74914
76832
  } else {
74915
76833
  throw new Error("unsupported relation type");
@@ -75014,9 +76932,9 @@ var init_studio2 = __esm({
75014
76932
  ),
75015
76933
  ...relations4
75016
76934
  };
75017
- const relationsConfig = (0, import_relations2.extractTablesRelationalConfig)(
76935
+ const relationsConfig = (0, import_drizzle_orm10.extractTablesRelationalConfig)(
75018
76936
  relationalSchema,
75019
- import_relations2.createTableRelationsHelpers
76937
+ import_drizzle_orm10.createTableRelationsHelpers
75020
76938
  );
75021
76939
  app.post("/", zValidator("json", schema5), async (c) => {
75022
76940
  const body = c.req.valid("json");
@@ -77582,7 +79500,7 @@ init_utils5();
77582
79500
  var version2 = async () => {
77583
79501
  const { npmVersion } = await ormCoreVersions();
77584
79502
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
77585
- const envVersion = "0.30.4-c7c31ad";
79503
+ const envVersion = "0.30.4-dc3b366";
77586
79504
  const kitVersion = envVersion ? `v${envVersion}` : "--";
77587
79505
  const versions = `drizzle-kit: ${kitVersion}
77588
79506
  ${ormVersion}`;