drizzle-kit 0.30.3-b06bbcd → 0.30.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/api.js +2236 -2958
  2. package/api.mjs +2236 -2958
  3. package/bin.cjs +2511 -354
  4. package/package.json +1 -1
package/bin.cjs CHANGED
@@ -24024,7 +24024,7 @@ function fromJson(statements, dialect6, action, json2) {
24024
24024
  }).filter((it) => it !== "");
24025
24025
  return result;
24026
24026
  }
24027
- var parseType, Convertor, PgCreateRoleConvertor, PgDropRoleConvertor, PgRenameRoleConvertor, PgAlterRoleConvertor, PgCreatePolicyConvertor, PgDropPolicyConvertor, PgRenamePolicyConvertor, PgAlterPolicyConvertor, PgCreateIndPolicyConvertor, PgDropIndPolicyConvertor, PgRenameIndPolicyConvertor, PgAlterIndPolicyConvertor, PgEnableRlsConvertor, PgDisableRlsConvertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SingleStoreCreateTableConvertor, SQLiteCreateTableConvertor, PgCreateViewConvertor, MySqlCreateViewConvertor, SqliteCreateViewConvertor, PgDropViewConvertor, MySqlDropViewConvertor, SqliteDropViewConvertor, MySqlAlterViewConvertor, PgRenameViewConvertor, MySqlRenameViewConvertor, PgAlterViewSchemaConvertor, PgAlterViewAddWithOptionConvertor, PgAlterViewDropWithOptionConvertor, PgAlterViewAlterTablespaceConvertor, PgAlterViewAlterUsingConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, PgAlterTableAddCheckConstraintConvertor, PgAlterTableDeleteCheckConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, MySqlAlterTableAddCheckConstraintConvertor, SingleStoreAlterTableAddUniqueConstraintConvertor, SingleStoreAlterTableDropUniqueConstraintConvertor, MySqlAlterTableDeleteCheckConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, DropTypeEnumConvertor, AlterTypeAddValueConvertor, AlterTypeSetSchemaConvertor, AlterRenameTypeConvertor, AlterTypeDropValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SingleStoreDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, SingleStoreRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SingleStoreAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SingleStoreAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SingleStoreAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, SingleStoreAlterTableAlterColumnAlterrGeneratedConvertor, SingleStoreAlterTableAddPk, SingleStoreAlterTableDropPk, SingleStoreModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSingleStoreIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SingleStoreDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, convertors;
24027
+ var parseType, Convertor, PgCreateRoleConvertor, PgDropRoleConvertor, PgRenameRoleConvertor, PgAlterRoleConvertor, PgCreatePolicyConvertor, PgDropPolicyConvertor, PgRenamePolicyConvertor, PgAlterPolicyConvertor, PgCreateIndPolicyConvertor, PgDropIndPolicyConvertor, PgRenameIndPolicyConvertor, PgAlterIndPolicyConvertor, PgEnableRlsConvertor, PgDisableRlsConvertor, PgCreateTableConvertor, MySqlCreateTableConvertor, SingleStoreCreateTableConvertor, SQLiteCreateTableConvertor, PgCreateViewConvertor, MySqlCreateViewConvertor, SqliteCreateViewConvertor, PgDropViewConvertor, MySqlDropViewConvertor, SqliteDropViewConvertor, MySqlAlterViewConvertor, PgRenameViewConvertor, MySqlRenameViewConvertor, PgAlterViewSchemaConvertor, PgAlterViewAddWithOptionConvertor, PgAlterViewDropWithOptionConvertor, PgAlterViewAlterTablespaceConvertor, PgAlterViewAlterUsingConvertor, PgAlterTableAlterColumnSetGenerated, PgAlterTableAlterColumnDropGenerated, PgAlterTableAlterColumnAlterGenerated, PgAlterTableAddUniqueConstraintConvertor, PgAlterTableDropUniqueConstraintConvertor, PgAlterTableAddCheckConstraintConvertor, PgAlterTableDeleteCheckConstraintConvertor, MySQLAlterTableAddUniqueConstraintConvertor, MySQLAlterTableDropUniqueConstraintConvertor, MySqlAlterTableAddCheckConstraintConvertor, SingleStoreAlterTableAddUniqueConstraintConvertor, SingleStoreAlterTableDropUniqueConstraintConvertor, MySqlAlterTableDeleteCheckConstraintConvertor, CreatePgSequenceConvertor, DropPgSequenceConvertor, RenamePgSequenceConvertor, MovePgSequenceConvertor, AlterPgSequenceConvertor, CreateTypeEnumConvertor, DropTypeEnumConvertor, AlterTypeAddValueConvertor, AlterTypeSetSchemaConvertor, AlterRenameTypeConvertor, AlterTypeDropValueConvertor, PgDropTableConvertor, MySQLDropTableConvertor, SingleStoreDropTableConvertor, SQLiteDropTableConvertor, PgRenameTableConvertor, SqliteRenameTableConvertor, MySqlRenameTableConvertor, SingleStoreRenameTableConvertor, PgAlterTableRenameColumnConvertor, MySqlAlterTableRenameColumnConvertor, SingleStoreAlterTableRenameColumnConvertor, SQLiteAlterTableRenameColumnConvertor, PgAlterTableDropColumnConvertor, MySqlAlterTableDropColumnConvertor, SingleStoreAlterTableDropColumnConvertor, SQLiteAlterTableDropColumnConvertor, PgAlterTableAddColumnConvertor, MySqlAlterTableAddColumnConvertor, SingleStoreAlterTableAddColumnConvertor, SQLiteAlterTableAddColumnConvertor, PgAlterTableAlterColumnSetTypeConvertor, PgAlterTableAlterColumnSetDefaultConvertor, PgAlterTableAlterColumnDropDefaultConvertor, PgAlterTableAlterColumnDropGeneratedConvertor, PgAlterTableAlterColumnSetExpressionConvertor, PgAlterTableAlterColumnAlterrGeneratedConvertor, SqliteAlterTableAlterColumnDropGeneratedConvertor, SqliteAlterTableAlterColumnSetExpressionConvertor, SqliteAlterTableAlterColumnAlterGeneratedConvertor, MySqlAlterTableAlterColumnAlterrGeneratedConvertor, MySqlAlterTableAddPk, MySqlAlterTableDropPk, LibSQLModifyColumn, MySqlModifyColumn, SingleStoreAlterTableAlterColumnAlterrGeneratedConvertor, SingleStoreAlterTableAddPk, SingleStoreAlterTableDropPk, SingleStoreModifyColumn, PgAlterTableCreateCompositePrimaryKeyConvertor, PgAlterTableDeleteCompositePrimaryKeyConvertor, PgAlterTableAlterCompositePrimaryKeyConvertor, MySqlAlterTableCreateCompositePrimaryKeyConvertor, MySqlAlterTableDeleteCompositePrimaryKeyConvertor, MySqlAlterTableAlterCompositePrimaryKeyConvertor, PgAlterTableAlterColumnSetPrimaryKeyConvertor, PgAlterTableAlterColumnDropPrimaryKeyConvertor, PgAlterTableAlterColumnSetNotNullConvertor, PgAlterTableAlterColumnDropNotNullConvertor, PgCreateForeignKeyConvertor, LibSQLCreateForeignKeyConvertor, MySqlCreateForeignKeyConvertor, PgAlterForeignKeyConvertor, PgDeleteForeignKeyConvertor, MySqlDeleteForeignKeyConvertor, CreatePgIndexConvertor, CreateMySqlIndexConvertor, CreateSingleStoreIndexConvertor, CreateSqliteIndexConvertor, PgDropIndexConvertor, PgCreateSchemaConvertor, PgRenameSchemaConvertor, PgDropSchemaConvertor, PgAlterTableSetSchemaConvertor, PgAlterTableSetNewSchemaConvertor, PgAlterTableRemoveFromSchemaConvertor, SqliteDropIndexConvertor, MySqlDropIndexConvertor, SingleStoreDropIndexConvertor, SQLiteRecreateTableConvertor, LibSQLRecreateTableConvertor, SingleStoreRecreateTableConvertor, convertors;
24028
24028
  var init_sqlgenerator = __esm({
24029
24029
  "src/sqlgenerator.ts"() {
24030
24030
  "use strict";
@@ -24375,7 +24375,7 @@ var init_sqlgenerator = __esm({
24375
24375
  if (typeof compositePKs !== "undefined" && compositePKs.length > 0) {
24376
24376
  statement += ",\n";
24377
24377
  const compositePK5 = SingleStoreSquasher.unsquashPK(compositePKs[0]);
24378
- statement += ` CONSTRAINT \`${st.compositePkName}\` PRIMARY KEY(\`${compositePK5.columns.join(`\`,\``)}\`)`;
24378
+ statement += ` CONSTRAINT \`${compositePK5.name}\` PRIMARY KEY(\`${compositePK5.columns.join(`\`,\``)}\`)`;
24379
24379
  }
24380
24380
  if (typeof uniqueConstraints !== "undefined" && uniqueConstraints.length > 0) {
24381
24381
  for (const uniqueConstraint5 of uniqueConstraints) {
@@ -25035,7 +25035,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
25035
25035
  }
25036
25036
  convert(statement) {
25037
25037
  const { tableNameFrom, tableNameTo } = statement;
25038
- return `RENAME TABLE \`${tableNameFrom}\` TO \`${tableNameTo}\`;`;
25038
+ return `ALTER TABLE \`${tableNameFrom}\` RENAME TO \`${tableNameTo}\`;`;
25039
25039
  }
25040
25040
  };
25041
25041
  PgAlterTableRenameColumnConvertor = class extends Convertor {
@@ -25063,7 +25063,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
25063
25063
  }
25064
25064
  convert(statement) {
25065
25065
  const { tableName, oldColumnName, newColumnName } = statement;
25066
- return `ALTER TABLE \`${tableName}\` RENAME COLUMN \`${oldColumnName}\` TO \`${newColumnName}\`;`;
25066
+ return `ALTER TABLE \`${tableName}\` CHANGE \`${oldColumnName}\` \`${newColumnName}\`;`;
25067
25067
  }
25068
25068
  };
25069
25069
  SQLiteAlterTableRenameColumnConvertor = class extends Convertor {
@@ -26378,10 +26378,52 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
26378
26378
  return sqlStatements;
26379
26379
  }
26380
26380
  };
26381
+ SingleStoreRecreateTableConvertor = class extends Convertor {
26382
+ can(statement, dialect6) {
26383
+ return statement.type === "singlestore_recreate_table" && dialect6 === "singlestore";
26384
+ }
26385
+ convert(statement) {
26386
+ const { tableName, columns, compositePKs, uniqueConstraints } = statement;
26387
+ const columnNames = columns.map((it) => `\`${it.name}\``).join(", ");
26388
+ const newTableName = `__new_${tableName}`;
26389
+ const sqlStatements = [];
26390
+ sqlStatements.push(
26391
+ new SingleStoreCreateTableConvertor().convert({
26392
+ type: "create_table",
26393
+ tableName: newTableName,
26394
+ columns,
26395
+ compositePKs,
26396
+ uniqueConstraints,
26397
+ schema: ""
26398
+ })
26399
+ );
26400
+ sqlStatements.push(
26401
+ `INSERT INTO \`${newTableName}\`(${columnNames}) SELECT ${columnNames} FROM \`${tableName}\`;`
26402
+ );
26403
+ sqlStatements.push(
26404
+ new SingleStoreDropTableConvertor().convert({
26405
+ type: "drop_table",
26406
+ tableName,
26407
+ schema: ""
26408
+ })
26409
+ );
26410
+ sqlStatements.push(
26411
+ new SingleStoreRenameTableConvertor().convert({
26412
+ fromSchema: "",
26413
+ tableNameFrom: newTableName,
26414
+ tableNameTo: tableName,
26415
+ toSchema: "",
26416
+ type: "rename_table"
26417
+ })
26418
+ );
26419
+ return sqlStatements;
26420
+ }
26421
+ };
26381
26422
  convertors = [];
26382
26423
  convertors.push(new PgCreateTableConvertor());
26383
26424
  convertors.push(new MySqlCreateTableConvertor());
26384
26425
  convertors.push(new SingleStoreCreateTableConvertor());
26426
+ convertors.push(new SingleStoreRecreateTableConvertor());
26385
26427
  convertors.push(new SQLiteCreateTableConvertor());
26386
26428
  convertors.push(new SQLiteRecreateTableConvertor());
26387
26429
  convertors.push(new LibSQLRecreateTableConvertor());
@@ -28390,7 +28432,7 @@ var init_jsonStatements = __esm({
28390
28432
  });
28391
28433
 
28392
28434
  // src/statementCombiner.ts
28393
- var prepareLibSQLRecreateTable, prepareSQLiteRecreateTable, libSQLCombineStatements, sqliteCombineStatements;
28435
+ var prepareLibSQLRecreateTable, prepareSQLiteRecreateTable, libSQLCombineStatements, sqliteCombineStatements, prepareSingleStoreRecreateTable, singleStoreCombineStatements;
28394
28436
  var init_statementCombiner = __esm({
28395
28437
  "src/statementCombiner.ts"() {
28396
28438
  "use strict";
@@ -28669,6 +28711,101 @@ var init_statementCombiner = __esm({
28669
28711
  const rest = combinedStatements.filter((it) => it.type !== "rename_table" && it.type !== "alter_table_rename_column");
28670
28712
  return [...renamedTables, ...renamedColumns, ...rest];
28671
28713
  };
28714
+ prepareSingleStoreRecreateTable = (table5) => {
28715
+ const { name, columns, uniqueConstraints, indexes, compositePrimaryKeys } = table5;
28716
+ const composites = Object.values(compositePrimaryKeys);
28717
+ const statements = [
28718
+ {
28719
+ type: "singlestore_recreate_table",
28720
+ tableName: name,
28721
+ columns: Object.values(columns),
28722
+ compositePKs: composites,
28723
+ uniqueConstraints: Object.values(uniqueConstraints)
28724
+ }
28725
+ ];
28726
+ if (Object.keys(indexes).length) {
28727
+ statements.push(...prepareCreateIndexesJson(name, "", indexes));
28728
+ }
28729
+ return statements;
28730
+ };
28731
+ singleStoreCombineStatements = (statements, json2) => {
28732
+ const newStatements = {};
28733
+ for (const statement of statements) {
28734
+ 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
+ const tableName2 = statement.tableName;
28736
+ const statementsForTable2 = newStatements[tableName2];
28737
+ if (!statementsForTable2) {
28738
+ newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28739
+ continue;
28740
+ }
28741
+ if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28742
+ const wasRename = statementsForTable2.some(
28743
+ ({ type }) => type === "rename_table" || type === "alter_table_rename_column"
28744
+ );
28745
+ const preparedStatements = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28746
+ if (wasRename) {
28747
+ newStatements[tableName2].push(...preparedStatements);
28748
+ } else {
28749
+ newStatements[tableName2] = preparedStatements;
28750
+ }
28751
+ continue;
28752
+ }
28753
+ continue;
28754
+ }
28755
+ if ((statement.type === "alter_table_alter_column_drop_default" || statement.type === "alter_table_alter_column_set_default") && statement.columnNotNull) {
28756
+ const tableName2 = statement.tableName;
28757
+ const statementsForTable2 = newStatements[tableName2];
28758
+ if (!statementsForTable2) {
28759
+ newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28760
+ continue;
28761
+ }
28762
+ if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28763
+ const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28764
+ const preparedStatements = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28765
+ if (wasRename) {
28766
+ newStatements[tableName2].push(...preparedStatements);
28767
+ } else {
28768
+ newStatements[tableName2] = preparedStatements;
28769
+ }
28770
+ continue;
28771
+ }
28772
+ continue;
28773
+ }
28774
+ if (statement.type === "alter_table_add_column" && statement.column.primaryKey) {
28775
+ const tableName2 = statement.tableName;
28776
+ const statementsForTable2 = newStatements[tableName2];
28777
+ if (!statementsForTable2) {
28778
+ newStatements[tableName2] = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28779
+ continue;
28780
+ }
28781
+ if (!statementsForTable2.some(({ type }) => type === "recreate_table")) {
28782
+ const wasRename = statementsForTable2.some(({ type }) => type === "rename_table");
28783
+ const preparedStatements = prepareSingleStoreRecreateTable(json2.tables[tableName2]);
28784
+ if (wasRename) {
28785
+ newStatements[tableName2].push(...preparedStatements);
28786
+ } else {
28787
+ newStatements[tableName2] = preparedStatements;
28788
+ }
28789
+ continue;
28790
+ }
28791
+ continue;
28792
+ }
28793
+ const tableName = statement.type === "rename_table" ? statement.tableNameTo : statement.tableName;
28794
+ const statementsForTable = newStatements[tableName];
28795
+ if (!statementsForTable) {
28796
+ newStatements[tableName] = [statement];
28797
+ continue;
28798
+ }
28799
+ if (!statementsForTable.some(({ type }) => type === "singlestore_recreate_table")) {
28800
+ newStatements[tableName].push(statement);
28801
+ }
28802
+ }
28803
+ const combinedStatements = Object.values(newStatements).flat();
28804
+ const renamedTables = combinedStatements.filter((it) => it.type === "rename_table");
28805
+ 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];
28808
+ };
28672
28809
  }
28673
28810
  });
28674
28811
 
@@ -30578,7 +30715,7 @@ var init_snapshotsDiffer = __esm({
30578
30715
  return [tableKey2, tableValue];
30579
30716
  }
30580
30717
  );
30581
- const diffResult = applyJsonDiff(tablesPatchedSnap1, json2);
30718
+ const diffResult = applyJsonDiff(columnsPatchedSnap1, json2);
30582
30719
  const typedResult = diffResultSchemeSingleStore.parse(diffResult);
30583
30720
  const jsonStatements = [];
30584
30721
  const jsonCreateIndexesForCreatedTables = createdTables.map((it) => {
@@ -30742,7 +30879,8 @@ var init_snapshotsDiffer = __esm({
30742
30879
  jsonStatements.push(...jsonDropColumnsStatemets);
30743
30880
  jsonStatements.push(...jsonAddedCompositePKs);
30744
30881
  jsonStatements.push(...jsonAlteredUniqueConstraints);
30745
- const sqlStatements = fromJson(jsonStatements, "singlestore");
30882
+ const combinedJsonStatements = singleStoreCombineStatements(jsonStatements, json2);
30883
+ const sqlStatements = fromJson(combinedJsonStatements, "singlestore");
30746
30884
  const uniqueSqlStatements = [];
30747
30885
  sqlStatements.forEach((ss) => {
30748
30886
  if (!uniqueSqlStatements.includes(ss)) {
@@ -30754,7 +30892,7 @@ var init_snapshotsDiffer = __esm({
30754
30892
  });
30755
30893
  const _meta = prepareMigrationMeta([], rTables, rColumns);
30756
30894
  return {
30757
- statements: jsonStatements,
30895
+ statements: combinedJsonStatements,
30758
30896
  sqlStatements: uniqueSqlStatements,
30759
30897
  _meta
30760
30898
  };
@@ -35800,7 +35938,7 @@ var init_utils5 = __esm({
35800
35938
  assertOrmCoreVersion = async () => {
35801
35939
  try {
35802
35940
  const { compatibilityVersion } = await import("drizzle-orm/version");
35803
- await import("drizzle-orm/_relations");
35941
+ await import("drizzle-orm/relations");
35804
35942
  if (compatibilityVersion && compatibilityVersion === requiredApiVersion) {
35805
35943
  return;
35806
35944
  }
@@ -58819,9 +58957,9 @@ var require_dist_cjs46 = __commonJS({
58819
58957
  }
58820
58958
  });
58821
58959
 
58822
- // ../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
58960
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js
58823
58961
  var require_httpAuthSchemeProvider3 = __commonJS({
58824
- "../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) {
58962
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) {
58825
58963
  "use strict";
58826
58964
  Object.defineProperty(exports2, "__esModule", { value: true });
58827
58965
  exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOOIDCHttpAuthSchemeProvider = exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;
@@ -58888,9 +59026,9 @@ var require_httpAuthSchemeProvider3 = __commonJS({
58888
59026
  }
58889
59027
  });
58890
59028
 
58891
- // ../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
59029
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
58892
59030
  var require_package4 = __commonJS({
58893
- "../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) {
59031
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"(exports2, module2) {
58894
59032
  module2.exports = {
58895
59033
  name: "@aws-sdk/client-sso-oidc",
58896
59034
  description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
@@ -58994,9 +59132,9 @@ var require_package4 = __commonJS({
58994
59132
  }
58995
59133
  });
58996
59134
 
58997
- // ../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
59135
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js
58998
59136
  var require_ruleset2 = __commonJS({
58999
- "../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) {
59137
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports2) {
59000
59138
  "use strict";
59001
59139
  Object.defineProperty(exports2, "__esModule", { value: true });
59002
59140
  exports2.ruleSet = void 0;
@@ -59029,9 +59167,9 @@ var require_ruleset2 = __commonJS({
59029
59167
  }
59030
59168
  });
59031
59169
 
59032
- // ../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
59170
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js
59033
59171
  var require_endpointResolver2 = __commonJS({
59034
- "../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) {
59172
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports2) {
59035
59173
  "use strict";
59036
59174
  Object.defineProperty(exports2, "__esModule", { value: true });
59037
59175
  exports2.defaultEndpointResolver = void 0;
@@ -59049,9 +59187,9 @@ var require_endpointResolver2 = __commonJS({
59049
59187
  }
59050
59188
  });
59051
59189
 
59052
- // ../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
59190
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js
59053
59191
  var require_runtimeConfig_shared2 = __commonJS({
59054
- "../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) {
59192
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports2) {
59055
59193
  "use strict";
59056
59194
  Object.defineProperty(exports2, "__esModule", { value: true });
59057
59195
  exports2.getRuntimeConfig = void 0;
@@ -59095,16 +59233,16 @@ var require_runtimeConfig_shared2 = __commonJS({
59095
59233
  }
59096
59234
  });
59097
59235
 
59098
- // ../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
59236
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js
59099
59237
  var require_runtimeConfig2 = __commonJS({
59100
- "../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) {
59238
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports2) {
59101
59239
  "use strict";
59102
59240
  Object.defineProperty(exports2, "__esModule", { value: true });
59103
59241
  exports2.getRuntimeConfig = void 0;
59104
59242
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
59105
59243
  var package_json_1 = tslib_1.__importDefault(require_package4());
59106
59244
  var core_1 = require_dist_cjs37();
59107
- var credential_provider_node_1 = require_dist_cjs54();
59245
+ var credential_provider_node_1 = require_dist_cjs59();
59108
59246
  var util_user_agent_node_1 = require_dist_cjs41();
59109
59247
  var config_resolver_1 = require_dist_cjs11();
59110
59248
  var hash_node_1 = require_dist_cjs42();
@@ -59148,9 +59286,9 @@ var require_runtimeConfig2 = __commonJS({
59148
59286
  }
59149
59287
  });
59150
59288
 
59151
- // ../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
59289
+ // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js
59152
59290
  var require_dist_cjs47 = __commonJS({
59153
- "../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) {
59291
+ "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports2, module2) {
59154
59292
  "use strict";
59155
59293
  var __defProp3 = Object.defineProperty;
59156
59294
  var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
@@ -60702,56 +60840,219 @@ var require_package5 = __commonJS({
60702
60840
  }
60703
60841
  });
60704
60842
 
60705
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js
60843
+ // ../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
60844
+ var require_httpAuthSchemeProvider5 = __commonJS({
60845
+ "../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) {
60846
+ "use strict";
60847
+ Object.defineProperty(exports2, "__esModule", { value: true });
60848
+ exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOOIDCHttpAuthSchemeProvider = exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;
60849
+ var core_1 = require_dist_cjs37();
60850
+ var util_middleware_1 = require_dist_cjs10();
60851
+ var defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
60852
+ return {
60853
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
60854
+ region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
60855
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
60856
+ })()
60857
+ };
60858
+ };
60859
+ exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider;
60860
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
60861
+ return {
60862
+ schemeId: "aws.auth#sigv4",
60863
+ signingProperties: {
60864
+ name: "sso-oauth",
60865
+ region: authParameters.region
60866
+ },
60867
+ propertiesExtractor: (config, context) => ({
60868
+ signingProperties: {
60869
+ config,
60870
+ context
60871
+ }
60872
+ })
60873
+ };
60874
+ }
60875
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
60876
+ return {
60877
+ schemeId: "smithy.api#noAuth"
60878
+ };
60879
+ }
60880
+ var defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {
60881
+ const options = [];
60882
+ switch (authParameters.operation) {
60883
+ case "CreateToken": {
60884
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
60885
+ break;
60886
+ }
60887
+ case "RegisterClient": {
60888
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
60889
+ break;
60890
+ }
60891
+ case "StartDeviceAuthorization": {
60892
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
60893
+ break;
60894
+ }
60895
+ default: {
60896
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
60897
+ }
60898
+ }
60899
+ return options;
60900
+ };
60901
+ exports2.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider;
60902
+ var resolveHttpAuthSchemeConfig = (config) => {
60903
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
60904
+ return {
60905
+ ...config_0
60906
+ };
60907
+ };
60908
+ exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
60909
+ }
60910
+ });
60911
+
60912
+ // ../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
60913
+ var require_package6 = __commonJS({
60914
+ "../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) {
60915
+ module2.exports = {
60916
+ name: "@aws-sdk/client-sso-oidc",
60917
+ description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
60918
+ version: "3.583.0",
60919
+ scripts: {
60920
+ build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
60921
+ "build:cjs": "node ../../scripts/compilation/inline client-sso-oidc",
60922
+ "build:es": "tsc -p tsconfig.es.json",
60923
+ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
60924
+ "build:types": "tsc -p tsconfig.types.json",
60925
+ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
60926
+ clean: "rimraf ./dist-* && rimraf *.tsbuildinfo",
60927
+ "extract:docs": "api-extractor run --local",
60928
+ "generate:client": "node ../../scripts/generate-clients/single-service --solo sso-oidc"
60929
+ },
60930
+ main: "./dist-cjs/index.js",
60931
+ types: "./dist-types/index.d.ts",
60932
+ module: "./dist-es/index.js",
60933
+ sideEffects: false,
60934
+ dependencies: {
60935
+ "@aws-crypto/sha256-browser": "3.0.0",
60936
+ "@aws-crypto/sha256-js": "3.0.0",
60937
+ "@aws-sdk/client-sts": "3.583.0",
60938
+ "@aws-sdk/core": "3.582.0",
60939
+ "@aws-sdk/credential-provider-node": "3.583.0",
60940
+ "@aws-sdk/middleware-host-header": "3.577.0",
60941
+ "@aws-sdk/middleware-logger": "3.577.0",
60942
+ "@aws-sdk/middleware-recursion-detection": "3.577.0",
60943
+ "@aws-sdk/middleware-user-agent": "3.583.0",
60944
+ "@aws-sdk/region-config-resolver": "3.577.0",
60945
+ "@aws-sdk/types": "3.577.0",
60946
+ "@aws-sdk/util-endpoints": "3.583.0",
60947
+ "@aws-sdk/util-user-agent-browser": "3.577.0",
60948
+ "@aws-sdk/util-user-agent-node": "3.577.0",
60949
+ "@smithy/config-resolver": "^3.0.0",
60950
+ "@smithy/core": "^2.0.1",
60951
+ "@smithy/fetch-http-handler": "^3.0.1",
60952
+ "@smithy/hash-node": "^3.0.0",
60953
+ "@smithy/invalid-dependency": "^3.0.0",
60954
+ "@smithy/middleware-content-length": "^3.0.0",
60955
+ "@smithy/middleware-endpoint": "^3.0.0",
60956
+ "@smithy/middleware-retry": "^3.0.1",
60957
+ "@smithy/middleware-serde": "^3.0.0",
60958
+ "@smithy/middleware-stack": "^3.0.0",
60959
+ "@smithy/node-config-provider": "^3.0.0",
60960
+ "@smithy/node-http-handler": "^3.0.0",
60961
+ "@smithy/protocol-http": "^4.0.0",
60962
+ "@smithy/smithy-client": "^3.0.1",
60963
+ "@smithy/types": "^3.0.0",
60964
+ "@smithy/url-parser": "^3.0.0",
60965
+ "@smithy/util-base64": "^3.0.0",
60966
+ "@smithy/util-body-length-browser": "^3.0.0",
60967
+ "@smithy/util-body-length-node": "^3.0.0",
60968
+ "@smithy/util-defaults-mode-browser": "^3.0.1",
60969
+ "@smithy/util-defaults-mode-node": "^3.0.1",
60970
+ "@smithy/util-endpoints": "^2.0.0",
60971
+ "@smithy/util-middleware": "^3.0.0",
60972
+ "@smithy/util-retry": "^3.0.0",
60973
+ "@smithy/util-utf8": "^3.0.0",
60974
+ tslib: "^2.6.2"
60975
+ },
60976
+ devDependencies: {
60977
+ "@tsconfig/node16": "16.1.3",
60978
+ "@types/node": "^16.18.96",
60979
+ concurrently: "7.0.0",
60980
+ "downlevel-dts": "0.10.1",
60981
+ rimraf: "3.0.2",
60982
+ typescript: "~4.9.5"
60983
+ },
60984
+ engines: {
60985
+ node: ">=16.0.0"
60986
+ },
60987
+ typesVersions: {
60988
+ "<4.0": {
60989
+ "dist-types/*": [
60990
+ "dist-types/ts3.4/*"
60991
+ ]
60992
+ }
60993
+ },
60994
+ files: [
60995
+ "dist-*/**"
60996
+ ],
60997
+ author: {
60998
+ name: "AWS SDK for JavaScript Team",
60999
+ url: "https://aws.amazon.com/javascript/"
61000
+ },
61001
+ license: "Apache-2.0",
61002
+ browser: {
61003
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
61004
+ },
61005
+ "react-native": {
61006
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
61007
+ },
61008
+ homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",
61009
+ repository: {
61010
+ type: "git",
61011
+ url: "https://github.com/aws/aws-sdk-js-v3.git",
61012
+ directory: "clients/client-sso-oidc"
61013
+ }
61014
+ };
61015
+ }
61016
+ });
61017
+
61018
+ // ../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
60706
61019
  var require_ruleset3 = __commonJS({
60707
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) {
61020
+ "../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) {
60708
61021
  "use strict";
60709
61022
  Object.defineProperty(exports2, "__esModule", { value: true });
60710
61023
  exports2.ruleSet = void 0;
60711
- var F2 = "required";
60712
- var G = "type";
60713
- var H = "fn";
60714
- var I = "argv";
60715
- var J = "ref";
60716
- var a = false;
60717
- var b = true;
61024
+ var u = "required";
61025
+ var v = "fn";
61026
+ var w = "argv";
61027
+ var x2 = "ref";
61028
+ var a = true;
61029
+ var b = "isSet";
60718
61030
  var c = "booleanEquals";
60719
- var d = "stringEquals";
60720
- var e2 = "sigv4";
60721
- var f3 = "sts";
60722
- var g = "us-east-1";
60723
- var h2 = "endpoint";
60724
- var i2 = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
60725
- var j = "tree";
60726
- var k = "error";
60727
- var l = "getAttr";
60728
- var m2 = { [F2]: false, [G]: "String" };
60729
- var n = { [F2]: true, "default": false, [G]: "Boolean" };
60730
- var o = { [J]: "Endpoint" };
60731
- var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
60732
- var q = { [J]: "Region" };
60733
- var r2 = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" };
60734
- var s2 = { [J]: "UseFIPS" };
60735
- var t2 = { [J]: "UseDualStack" };
60736
- var u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e2, "signingName": f3, "signingRegion": g }] }, "headers": {} };
60737
- var v = {};
60738
- var w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h2]: u, [G]: h2 };
60739
- var x2 = { [H]: c, [I]: [s2, true] };
60740
- var y = { [H]: c, [I]: [t2, true] };
60741
- var z2 = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] };
60742
- var A2 = { [J]: "PartitionResult" };
60743
- var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A2, "supportsDualStack"] }] };
60744
- var C = [{ [H]: "isSet", [I]: [o] }];
60745
- var D = [x2];
60746
- var E = [y];
60747
- 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 }] };
61031
+ var d = "error";
61032
+ var e2 = "endpoint";
61033
+ var f3 = "tree";
61034
+ var g = "PartitionResult";
61035
+ var h2 = "getAttr";
61036
+ var i2 = { [u]: false, "type": "String" };
61037
+ var j = { [u]: true, "default": false, "type": "Boolean" };
61038
+ var k = { [x2]: "Endpoint" };
61039
+ var l = { [v]: c, [w]: [{ [x2]: "UseFIPS" }, true] };
61040
+ var m2 = { [v]: c, [w]: [{ [x2]: "UseDualStack" }, true] };
61041
+ var n = {};
61042
+ var o = { [v]: h2, [w]: [{ [x2]: g }, "supportsFIPS"] };
61043
+ var p = { [x2]: g };
61044
+ var q = { [v]: c, [w]: [true, { [v]: h2, [w]: [p, "supportsDualStack"] }] };
61045
+ var r2 = [l];
61046
+ var s2 = [m2];
61047
+ var t2 = [{ [x2]: "Region" }];
61048
+ 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 }] };
60748
61049
  exports2.ruleSet = _data;
60749
61050
  }
60750
61051
  });
60751
61052
 
60752
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js
61053
+ // ../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
60753
61054
  var require_endpointResolver3 = __commonJS({
60754
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) {
61055
+ "../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) {
60755
61056
  "use strict";
60756
61057
  Object.defineProperty(exports2, "__esModule", { value: true });
60757
61058
  exports2.defaultEndpointResolver = void 0;
@@ -60769,9 +61070,9 @@ var require_endpointResolver3 = __commonJS({
60769
61070
  }
60770
61071
  });
60771
61072
 
60772
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js
61073
+ // ../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
60773
61074
  var require_runtimeConfig_shared3 = __commonJS({
60774
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) {
61075
+ "../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) {
60775
61076
  "use strict";
60776
61077
  Object.defineProperty(exports2, "__esModule", { value: true });
60777
61078
  exports2.getRuntimeConfig = void 0;
@@ -60781,17 +61082,17 @@ var require_runtimeConfig_shared3 = __commonJS({
60781
61082
  var url_parser_1 = require_dist_cjs16();
60782
61083
  var util_base64_1 = require_dist_cjs25();
60783
61084
  var util_utf8_1 = require_dist_cjs24();
60784
- var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4();
61085
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider5();
60785
61086
  var endpointResolver_1 = require_endpointResolver3();
60786
61087
  var getRuntimeConfig = (config) => {
60787
61088
  return {
60788
- apiVersion: "2011-06-15",
61089
+ apiVersion: "2019-06-10",
60789
61090
  base64Decoder: (config == null ? void 0 : config.base64Decoder) ?? util_base64_1.fromBase64,
60790
61091
  base64Encoder: (config == null ? void 0 : config.base64Encoder) ?? util_base64_1.toBase64,
60791
61092
  disableHostPrefix: (config == null ? void 0 : config.disableHostPrefix) ?? false,
60792
61093
  endpointProvider: (config == null ? void 0 : config.endpointProvider) ?? endpointResolver_1.defaultEndpointResolver,
60793
61094
  extensions: (config == null ? void 0 : config.extensions) ?? [],
60794
- httpAuthSchemeProvider: (config == null ? void 0 : config.httpAuthSchemeProvider) ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
61095
+ httpAuthSchemeProvider: (config == null ? void 0 : config.httpAuthSchemeProvider) ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider,
60795
61096
  httpAuthSchemes: (config == null ? void 0 : config.httpAuthSchemes) ?? [
60796
61097
  {
60797
61098
  schemeId: "aws.auth#sigv4",
@@ -60805,7 +61106,7 @@ var require_runtimeConfig_shared3 = __commonJS({
60805
61106
  }
60806
61107
  ],
60807
61108
  logger: (config == null ? void 0 : config.logger) ?? new smithy_client_1.NoOpLogger(),
60808
- serviceId: (config == null ? void 0 : config.serviceId) ?? "STS",
61109
+ serviceId: (config == null ? void 0 : config.serviceId) ?? "SSO OIDC",
60809
61110
  urlParser: (config == null ? void 0 : config.urlParser) ?? url_parser_1.parseUrl,
60810
61111
  utf8Decoder: (config == null ? void 0 : config.utf8Decoder) ?? util_utf8_1.fromUtf8,
60811
61112
  utf8Encoder: (config == null ? void 0 : config.utf8Encoder) ?? util_utf8_1.toUtf8
@@ -60815,19 +61116,18 @@ var require_runtimeConfig_shared3 = __commonJS({
60815
61116
  }
60816
61117
  });
60817
61118
 
60818
- // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js
61119
+ // ../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
60819
61120
  var require_runtimeConfig3 = __commonJS({
60820
- "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) {
61121
+ "../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) {
60821
61122
  "use strict";
60822
61123
  Object.defineProperty(exports2, "__esModule", { value: true });
60823
61124
  exports2.getRuntimeConfig = void 0;
60824
61125
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
60825
- var package_json_1 = tslib_1.__importDefault(require_package5());
61126
+ var package_json_1 = tslib_1.__importDefault(require_package6());
60826
61127
  var core_1 = require_dist_cjs37();
60827
- var credential_provider_node_1 = require_dist_cjs54();
61128
+ var credential_provider_node_1 = require_dist_cjs56();
60828
61129
  var util_user_agent_node_1 = require_dist_cjs41();
60829
61130
  var config_resolver_1 = require_dist_cjs11();
60830
- var core_2 = require_dist_cjs34();
60831
61131
  var hash_node_1 = require_dist_cjs42();
60832
61132
  var middleware_retry_1 = require_dist_cjs33();
60833
61133
  var node_config_provider_1 = require_dist_cjs14();
@@ -60838,6 +61138,2015 @@ var require_runtimeConfig3 = __commonJS({
60838
61138
  var smithy_client_1 = require_dist_cjs32();
60839
61139
  var util_defaults_mode_node_1 = require_dist_cjs44();
60840
61140
  var smithy_client_2 = require_dist_cjs32();
61141
+ var getRuntimeConfig = (config) => {
61142
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
61143
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
61144
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
61145
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
61146
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
61147
+ return {
61148
+ ...clientSharedValues,
61149
+ ...config,
61150
+ runtime: "node",
61151
+ defaultsMode,
61152
+ bodyLengthChecker: (config == null ? void 0 : config.bodyLengthChecker) ?? util_body_length_node_1.calculateBodyLength,
61153
+ credentialDefaultProvider: (config == null ? void 0 : config.credentialDefaultProvider) ?? credential_provider_node_1.defaultProvider,
61154
+ defaultUserAgentProvider: (config == null ? void 0 : config.defaultUserAgentProvider) ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
61155
+ maxAttempts: (config == null ? void 0 : config.maxAttempts) ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
61156
+ 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),
61157
+ requestHandler: node_http_handler_1.NodeHttpHandler.create((config == null ? void 0 : config.requestHandler) ?? defaultConfigProvider),
61158
+ retryMode: (config == null ? void 0 : config.retryMode) ?? (0, node_config_provider_1.loadConfig)({
61159
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
61160
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
61161
+ }),
61162
+ sha256: (config == null ? void 0 : config.sha256) ?? hash_node_1.Hash.bind(null, "sha256"),
61163
+ streamCollector: (config == null ? void 0 : config.streamCollector) ?? node_http_handler_1.streamCollector,
61164
+ useDualstackEndpoint: (config == null ? void 0 : config.useDualstackEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
61165
+ useFipsEndpoint: (config == null ? void 0 : config.useFipsEndpoint) ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)
61166
+ };
61167
+ };
61168
+ exports2.getRuntimeConfig = getRuntimeConfig;
61169
+ }
61170
+ });
61171
+
61172
+ // ../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
61173
+ var require_dist_cjs50 = __commonJS({
61174
+ "../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) {
61175
+ "use strict";
61176
+ var __defProp3 = Object.defineProperty;
61177
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
61178
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
61179
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
61180
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
61181
+ var __export2 = (target, all) => {
61182
+ for (var name in all)
61183
+ __defProp3(target, name, { get: all[name], enumerable: true });
61184
+ };
61185
+ var __copyProps3 = (to, from, except, desc) => {
61186
+ if (from && typeof from === "object" || typeof from === "function") {
61187
+ for (let key of __getOwnPropNames3(from))
61188
+ if (!__hasOwnProp3.call(to, key) && key !== except)
61189
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
61190
+ }
61191
+ return to;
61192
+ };
61193
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
61194
+ var src_exports = {};
61195
+ __export2(src_exports, {
61196
+ AccessDeniedException: () => AccessDeniedException,
61197
+ AuthorizationPendingException: () => AuthorizationPendingException,
61198
+ CreateTokenCommand: () => CreateTokenCommand,
61199
+ CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog,
61200
+ CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog,
61201
+ CreateTokenWithIAMCommand: () => CreateTokenWithIAMCommand,
61202
+ CreateTokenWithIAMRequestFilterSensitiveLog: () => CreateTokenWithIAMRequestFilterSensitiveLog,
61203
+ CreateTokenWithIAMResponseFilterSensitiveLog: () => CreateTokenWithIAMResponseFilterSensitiveLog,
61204
+ ExpiredTokenException: () => ExpiredTokenException,
61205
+ InternalServerException: () => InternalServerException,
61206
+ InvalidClientException: () => InvalidClientException,
61207
+ InvalidClientMetadataException: () => InvalidClientMetadataException,
61208
+ InvalidGrantException: () => InvalidGrantException,
61209
+ InvalidRedirectUriException: () => InvalidRedirectUriException,
61210
+ InvalidRequestException: () => InvalidRequestException,
61211
+ InvalidRequestRegionException: () => InvalidRequestRegionException,
61212
+ InvalidScopeException: () => InvalidScopeException,
61213
+ RegisterClientCommand: () => RegisterClientCommand,
61214
+ RegisterClientResponseFilterSensitiveLog: () => RegisterClientResponseFilterSensitiveLog,
61215
+ SSOOIDC: () => SSOOIDC,
61216
+ SSOOIDCClient: () => SSOOIDCClient,
61217
+ SSOOIDCServiceException: () => SSOOIDCServiceException,
61218
+ SlowDownException: () => SlowDownException,
61219
+ StartDeviceAuthorizationCommand: () => StartDeviceAuthorizationCommand,
61220
+ StartDeviceAuthorizationRequestFilterSensitiveLog: () => StartDeviceAuthorizationRequestFilterSensitiveLog,
61221
+ UnauthorizedClientException: () => UnauthorizedClientException,
61222
+ UnsupportedGrantTypeException: () => UnsupportedGrantTypeException,
61223
+ __Client: () => import_smithy_client.Client
61224
+ });
61225
+ module2.exports = __toCommonJS2(src_exports);
61226
+ var import_middleware_host_header = require_dist_cjs3();
61227
+ var import_middleware_logger = require_dist_cjs4();
61228
+ var import_middleware_recursion_detection = require_dist_cjs5();
61229
+ var import_middleware_user_agent = require_dist_cjs8();
61230
+ var import_config_resolver = require_dist_cjs11();
61231
+ var import_core = require_dist_cjs34();
61232
+ var import_middleware_content_length = require_dist_cjs35();
61233
+ var import_middleware_endpoint = require_dist_cjs18();
61234
+ var import_middleware_retry = require_dist_cjs33();
61235
+ var import_httpAuthSchemeProvider = require_httpAuthSchemeProvider5();
61236
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
61237
+ return {
61238
+ ...options,
61239
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
61240
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
61241
+ defaultSigningName: "sso-oauth"
61242
+ };
61243
+ }, "resolveClientEndpointParameters");
61244
+ var commonParams = {
61245
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
61246
+ Endpoint: { type: "builtInParams", name: "endpoint" },
61247
+ Region: { type: "builtInParams", name: "region" },
61248
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
61249
+ };
61250
+ var import_runtimeConfig = require_runtimeConfig3();
61251
+ var import_region_config_resolver = require_dist_cjs45();
61252
+ var import_protocol_http = require_dist_cjs2();
61253
+ var import_smithy_client = require_dist_cjs32();
61254
+ var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
61255
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
61256
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
61257
+ let _credentials = runtimeConfig.credentials;
61258
+ return {
61259
+ setHttpAuthScheme(httpAuthScheme) {
61260
+ const index5 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
61261
+ if (index5 === -1) {
61262
+ _httpAuthSchemes.push(httpAuthScheme);
61263
+ } else {
61264
+ _httpAuthSchemes.splice(index5, 1, httpAuthScheme);
61265
+ }
61266
+ },
61267
+ httpAuthSchemes() {
61268
+ return _httpAuthSchemes;
61269
+ },
61270
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
61271
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
61272
+ },
61273
+ httpAuthSchemeProvider() {
61274
+ return _httpAuthSchemeProvider;
61275
+ },
61276
+ setCredentials(credentials2) {
61277
+ _credentials = credentials2;
61278
+ },
61279
+ credentials() {
61280
+ return _credentials;
61281
+ }
61282
+ };
61283
+ }, "getHttpAuthExtensionConfiguration");
61284
+ var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
61285
+ return {
61286
+ httpAuthSchemes: config.httpAuthSchemes(),
61287
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
61288
+ credentials: config.credentials()
61289
+ };
61290
+ }, "resolveHttpAuthRuntimeConfig");
61291
+ var asPartial = /* @__PURE__ */ __name((t2) => t2, "asPartial");
61292
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
61293
+ const extensionConfiguration = {
61294
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
61295
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
61296
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
61297
+ ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig))
61298
+ };
61299
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
61300
+ return {
61301
+ ...runtimeConfig,
61302
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
61303
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
61304
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
61305
+ ...resolveHttpAuthRuntimeConfig(extensionConfiguration)
61306
+ };
61307
+ }, "resolveRuntimeExtensions");
61308
+ var _SSOOIDCClient = class _SSOOIDCClient extends import_smithy_client.Client {
61309
+ constructor(...[configuration]) {
61310
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
61311
+ const _config_1 = resolveClientEndpointParameters(_config_0);
61312
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
61313
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
61314
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
61315
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
61316
+ const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);
61317
+ const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
61318
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
61319
+ super(_config_8);
61320
+ this.config = _config_8;
61321
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
61322
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
61323
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
61324
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
61325
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
61326
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
61327
+ this.middlewareStack.use(
61328
+ (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
61329
+ httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
61330
+ identityProviderConfigProvider: this.getIdentityProviderConfigProvider()
61331
+ })
61332
+ );
61333
+ this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
61334
+ }
61335
+ /**
61336
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
61337
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
61338
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
61339
+ */
61340
+ destroy() {
61341
+ super.destroy();
61342
+ }
61343
+ getDefaultHttpAuthSchemeParametersProvider() {
61344
+ return import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider;
61345
+ }
61346
+ getIdentityProviderConfigProvider() {
61347
+ return async (config) => new import_core.DefaultIdentityProviderConfig({
61348
+ "aws.auth#sigv4": config.credentials
61349
+ });
61350
+ }
61351
+ };
61352
+ __name(_SSOOIDCClient, "SSOOIDCClient");
61353
+ var SSOOIDCClient = _SSOOIDCClient;
61354
+ var import_middleware_serde = require_dist_cjs17();
61355
+ var import_types = require_dist_cjs();
61356
+ var _SSOOIDCServiceException = class _SSOOIDCServiceException2 extends import_smithy_client.ServiceException {
61357
+ /**
61358
+ * @internal
61359
+ */
61360
+ constructor(options) {
61361
+ super(options);
61362
+ Object.setPrototypeOf(this, _SSOOIDCServiceException2.prototype);
61363
+ }
61364
+ };
61365
+ __name(_SSOOIDCServiceException, "SSOOIDCServiceException");
61366
+ var SSOOIDCServiceException = _SSOOIDCServiceException;
61367
+ var _AccessDeniedException = class _AccessDeniedException2 extends SSOOIDCServiceException {
61368
+ /**
61369
+ * @internal
61370
+ */
61371
+ constructor(opts) {
61372
+ super({
61373
+ name: "AccessDeniedException",
61374
+ $fault: "client",
61375
+ ...opts
61376
+ });
61377
+ this.name = "AccessDeniedException";
61378
+ this.$fault = "client";
61379
+ Object.setPrototypeOf(this, _AccessDeniedException2.prototype);
61380
+ this.error = opts.error;
61381
+ this.error_description = opts.error_description;
61382
+ }
61383
+ };
61384
+ __name(_AccessDeniedException, "AccessDeniedException");
61385
+ var AccessDeniedException = _AccessDeniedException;
61386
+ var _AuthorizationPendingException = class _AuthorizationPendingException2 extends SSOOIDCServiceException {
61387
+ /**
61388
+ * @internal
61389
+ */
61390
+ constructor(opts) {
61391
+ super({
61392
+ name: "AuthorizationPendingException",
61393
+ $fault: "client",
61394
+ ...opts
61395
+ });
61396
+ this.name = "AuthorizationPendingException";
61397
+ this.$fault = "client";
61398
+ Object.setPrototypeOf(this, _AuthorizationPendingException2.prototype);
61399
+ this.error = opts.error;
61400
+ this.error_description = opts.error_description;
61401
+ }
61402
+ };
61403
+ __name(_AuthorizationPendingException, "AuthorizationPendingException");
61404
+ var AuthorizationPendingException = _AuthorizationPendingException;
61405
+ var _ExpiredTokenException = class _ExpiredTokenException2 extends SSOOIDCServiceException {
61406
+ /**
61407
+ * @internal
61408
+ */
61409
+ constructor(opts) {
61410
+ super({
61411
+ name: "ExpiredTokenException",
61412
+ $fault: "client",
61413
+ ...opts
61414
+ });
61415
+ this.name = "ExpiredTokenException";
61416
+ this.$fault = "client";
61417
+ Object.setPrototypeOf(this, _ExpiredTokenException2.prototype);
61418
+ this.error = opts.error;
61419
+ this.error_description = opts.error_description;
61420
+ }
61421
+ };
61422
+ __name(_ExpiredTokenException, "ExpiredTokenException");
61423
+ var ExpiredTokenException = _ExpiredTokenException;
61424
+ var _InternalServerException = class _InternalServerException2 extends SSOOIDCServiceException {
61425
+ /**
61426
+ * @internal
61427
+ */
61428
+ constructor(opts) {
61429
+ super({
61430
+ name: "InternalServerException",
61431
+ $fault: "server",
61432
+ ...opts
61433
+ });
61434
+ this.name = "InternalServerException";
61435
+ this.$fault = "server";
61436
+ Object.setPrototypeOf(this, _InternalServerException2.prototype);
61437
+ this.error = opts.error;
61438
+ this.error_description = opts.error_description;
61439
+ }
61440
+ };
61441
+ __name(_InternalServerException, "InternalServerException");
61442
+ var InternalServerException = _InternalServerException;
61443
+ var _InvalidClientException = class _InvalidClientException2 extends SSOOIDCServiceException {
61444
+ /**
61445
+ * @internal
61446
+ */
61447
+ constructor(opts) {
61448
+ super({
61449
+ name: "InvalidClientException",
61450
+ $fault: "client",
61451
+ ...opts
61452
+ });
61453
+ this.name = "InvalidClientException";
61454
+ this.$fault = "client";
61455
+ Object.setPrototypeOf(this, _InvalidClientException2.prototype);
61456
+ this.error = opts.error;
61457
+ this.error_description = opts.error_description;
61458
+ }
61459
+ };
61460
+ __name(_InvalidClientException, "InvalidClientException");
61461
+ var InvalidClientException = _InvalidClientException;
61462
+ var _InvalidGrantException = class _InvalidGrantException2 extends SSOOIDCServiceException {
61463
+ /**
61464
+ * @internal
61465
+ */
61466
+ constructor(opts) {
61467
+ super({
61468
+ name: "InvalidGrantException",
61469
+ $fault: "client",
61470
+ ...opts
61471
+ });
61472
+ this.name = "InvalidGrantException";
61473
+ this.$fault = "client";
61474
+ Object.setPrototypeOf(this, _InvalidGrantException2.prototype);
61475
+ this.error = opts.error;
61476
+ this.error_description = opts.error_description;
61477
+ }
61478
+ };
61479
+ __name(_InvalidGrantException, "InvalidGrantException");
61480
+ var InvalidGrantException = _InvalidGrantException;
61481
+ var _InvalidRequestException = class _InvalidRequestException2 extends SSOOIDCServiceException {
61482
+ /**
61483
+ * @internal
61484
+ */
61485
+ constructor(opts) {
61486
+ super({
61487
+ name: "InvalidRequestException",
61488
+ $fault: "client",
61489
+ ...opts
61490
+ });
61491
+ this.name = "InvalidRequestException";
61492
+ this.$fault = "client";
61493
+ Object.setPrototypeOf(this, _InvalidRequestException2.prototype);
61494
+ this.error = opts.error;
61495
+ this.error_description = opts.error_description;
61496
+ }
61497
+ };
61498
+ __name(_InvalidRequestException, "InvalidRequestException");
61499
+ var InvalidRequestException = _InvalidRequestException;
61500
+ var _InvalidScopeException = class _InvalidScopeException2 extends SSOOIDCServiceException {
61501
+ /**
61502
+ * @internal
61503
+ */
61504
+ constructor(opts) {
61505
+ super({
61506
+ name: "InvalidScopeException",
61507
+ $fault: "client",
61508
+ ...opts
61509
+ });
61510
+ this.name = "InvalidScopeException";
61511
+ this.$fault = "client";
61512
+ Object.setPrototypeOf(this, _InvalidScopeException2.prototype);
61513
+ this.error = opts.error;
61514
+ this.error_description = opts.error_description;
61515
+ }
61516
+ };
61517
+ __name(_InvalidScopeException, "InvalidScopeException");
61518
+ var InvalidScopeException = _InvalidScopeException;
61519
+ var _SlowDownException = class _SlowDownException2 extends SSOOIDCServiceException {
61520
+ /**
61521
+ * @internal
61522
+ */
61523
+ constructor(opts) {
61524
+ super({
61525
+ name: "SlowDownException",
61526
+ $fault: "client",
61527
+ ...opts
61528
+ });
61529
+ this.name = "SlowDownException";
61530
+ this.$fault = "client";
61531
+ Object.setPrototypeOf(this, _SlowDownException2.prototype);
61532
+ this.error = opts.error;
61533
+ this.error_description = opts.error_description;
61534
+ }
61535
+ };
61536
+ __name(_SlowDownException, "SlowDownException");
61537
+ var SlowDownException = _SlowDownException;
61538
+ var _UnauthorizedClientException = class _UnauthorizedClientException2 extends SSOOIDCServiceException {
61539
+ /**
61540
+ * @internal
61541
+ */
61542
+ constructor(opts) {
61543
+ super({
61544
+ name: "UnauthorizedClientException",
61545
+ $fault: "client",
61546
+ ...opts
61547
+ });
61548
+ this.name = "UnauthorizedClientException";
61549
+ this.$fault = "client";
61550
+ Object.setPrototypeOf(this, _UnauthorizedClientException2.prototype);
61551
+ this.error = opts.error;
61552
+ this.error_description = opts.error_description;
61553
+ }
61554
+ };
61555
+ __name(_UnauthorizedClientException, "UnauthorizedClientException");
61556
+ var UnauthorizedClientException = _UnauthorizedClientException;
61557
+ var _UnsupportedGrantTypeException = class _UnsupportedGrantTypeException2 extends SSOOIDCServiceException {
61558
+ /**
61559
+ * @internal
61560
+ */
61561
+ constructor(opts) {
61562
+ super({
61563
+ name: "UnsupportedGrantTypeException",
61564
+ $fault: "client",
61565
+ ...opts
61566
+ });
61567
+ this.name = "UnsupportedGrantTypeException";
61568
+ this.$fault = "client";
61569
+ Object.setPrototypeOf(this, _UnsupportedGrantTypeException2.prototype);
61570
+ this.error = opts.error;
61571
+ this.error_description = opts.error_description;
61572
+ }
61573
+ };
61574
+ __name(_UnsupportedGrantTypeException, "UnsupportedGrantTypeException");
61575
+ var UnsupportedGrantTypeException = _UnsupportedGrantTypeException;
61576
+ var _InvalidRequestRegionException = class _InvalidRequestRegionException2 extends SSOOIDCServiceException {
61577
+ /**
61578
+ * @internal
61579
+ */
61580
+ constructor(opts) {
61581
+ super({
61582
+ name: "InvalidRequestRegionException",
61583
+ $fault: "client",
61584
+ ...opts
61585
+ });
61586
+ this.name = "InvalidRequestRegionException";
61587
+ this.$fault = "client";
61588
+ Object.setPrototypeOf(this, _InvalidRequestRegionException2.prototype);
61589
+ this.error = opts.error;
61590
+ this.error_description = opts.error_description;
61591
+ this.endpoint = opts.endpoint;
61592
+ this.region = opts.region;
61593
+ }
61594
+ };
61595
+ __name(_InvalidRequestRegionException, "InvalidRequestRegionException");
61596
+ var InvalidRequestRegionException = _InvalidRequestRegionException;
61597
+ var _InvalidClientMetadataException = class _InvalidClientMetadataException2 extends SSOOIDCServiceException {
61598
+ /**
61599
+ * @internal
61600
+ */
61601
+ constructor(opts) {
61602
+ super({
61603
+ name: "InvalidClientMetadataException",
61604
+ $fault: "client",
61605
+ ...opts
61606
+ });
61607
+ this.name = "InvalidClientMetadataException";
61608
+ this.$fault = "client";
61609
+ Object.setPrototypeOf(this, _InvalidClientMetadataException2.prototype);
61610
+ this.error = opts.error;
61611
+ this.error_description = opts.error_description;
61612
+ }
61613
+ };
61614
+ __name(_InvalidClientMetadataException, "InvalidClientMetadataException");
61615
+ var InvalidClientMetadataException = _InvalidClientMetadataException;
61616
+ var _InvalidRedirectUriException = class _InvalidRedirectUriException2 extends SSOOIDCServiceException {
61617
+ /**
61618
+ * @internal
61619
+ */
61620
+ constructor(opts) {
61621
+ super({
61622
+ name: "InvalidRedirectUriException",
61623
+ $fault: "client",
61624
+ ...opts
61625
+ });
61626
+ this.name = "InvalidRedirectUriException";
61627
+ this.$fault = "client";
61628
+ Object.setPrototypeOf(this, _InvalidRedirectUriException2.prototype);
61629
+ this.error = opts.error;
61630
+ this.error_description = opts.error_description;
61631
+ }
61632
+ };
61633
+ __name(_InvalidRedirectUriException, "InvalidRedirectUriException");
61634
+ var InvalidRedirectUriException = _InvalidRedirectUriException;
61635
+ var CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61636
+ ...obj,
61637
+ ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING },
61638
+ ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },
61639
+ ...obj.codeVerifier && { codeVerifier: import_smithy_client.SENSITIVE_STRING }
61640
+ }), "CreateTokenRequestFilterSensitiveLog");
61641
+ var CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61642
+ ...obj,
61643
+ ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING },
61644
+ ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },
61645
+ ...obj.idToken && { idToken: import_smithy_client.SENSITIVE_STRING }
61646
+ }), "CreateTokenResponseFilterSensitiveLog");
61647
+ var CreateTokenWithIAMRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61648
+ ...obj,
61649
+ ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },
61650
+ ...obj.assertion && { assertion: import_smithy_client.SENSITIVE_STRING },
61651
+ ...obj.subjectToken && { subjectToken: import_smithy_client.SENSITIVE_STRING },
61652
+ ...obj.codeVerifier && { codeVerifier: import_smithy_client.SENSITIVE_STRING }
61653
+ }), "CreateTokenWithIAMRequestFilterSensitiveLog");
61654
+ var CreateTokenWithIAMResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61655
+ ...obj,
61656
+ ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING },
61657
+ ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },
61658
+ ...obj.idToken && { idToken: import_smithy_client.SENSITIVE_STRING }
61659
+ }), "CreateTokenWithIAMResponseFilterSensitiveLog");
61660
+ var RegisterClientResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61661
+ ...obj,
61662
+ ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING }
61663
+ }), "RegisterClientResponseFilterSensitiveLog");
61664
+ var StartDeviceAuthorizationRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
61665
+ ...obj,
61666
+ ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING }
61667
+ }), "StartDeviceAuthorizationRequestFilterSensitiveLog");
61668
+ var import_core2 = require_dist_cjs37();
61669
+ var se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => {
61670
+ const b = (0, import_core.requestBuilder)(input, context);
61671
+ const headers = {
61672
+ "content-type": "application/json"
61673
+ };
61674
+ b.bp("/token");
61675
+ let body;
61676
+ body = JSON.stringify(
61677
+ (0, import_smithy_client.take)(input, {
61678
+ clientId: [],
61679
+ clientSecret: [],
61680
+ code: [],
61681
+ codeVerifier: [],
61682
+ deviceCode: [],
61683
+ grantType: [],
61684
+ redirectUri: [],
61685
+ refreshToken: [],
61686
+ scope: (_2) => (0, import_smithy_client._json)(_2)
61687
+ })
61688
+ );
61689
+ b.m("POST").h(headers).b(body);
61690
+ return b.build();
61691
+ }, "se_CreateTokenCommand");
61692
+ var se_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (input, context) => {
61693
+ const b = (0, import_core.requestBuilder)(input, context);
61694
+ const headers = {
61695
+ "content-type": "application/json"
61696
+ };
61697
+ b.bp("/token");
61698
+ const query = (0, import_smithy_client.map)({
61699
+ [_ai]: [, "t"]
61700
+ });
61701
+ let body;
61702
+ body = JSON.stringify(
61703
+ (0, import_smithy_client.take)(input, {
61704
+ assertion: [],
61705
+ clientId: [],
61706
+ code: [],
61707
+ codeVerifier: [],
61708
+ grantType: [],
61709
+ redirectUri: [],
61710
+ refreshToken: [],
61711
+ requestedTokenType: [],
61712
+ scope: (_2) => (0, import_smithy_client._json)(_2),
61713
+ subjectToken: [],
61714
+ subjectTokenType: []
61715
+ })
61716
+ );
61717
+ b.m("POST").h(headers).q(query).b(body);
61718
+ return b.build();
61719
+ }, "se_CreateTokenWithIAMCommand");
61720
+ var se_RegisterClientCommand = /* @__PURE__ */ __name(async (input, context) => {
61721
+ const b = (0, import_core.requestBuilder)(input, context);
61722
+ const headers = {
61723
+ "content-type": "application/json"
61724
+ };
61725
+ b.bp("/client/register");
61726
+ let body;
61727
+ body = JSON.stringify(
61728
+ (0, import_smithy_client.take)(input, {
61729
+ clientName: [],
61730
+ clientType: [],
61731
+ entitledApplicationArn: [],
61732
+ grantTypes: (_2) => (0, import_smithy_client._json)(_2),
61733
+ issuerUrl: [],
61734
+ redirectUris: (_2) => (0, import_smithy_client._json)(_2),
61735
+ scopes: (_2) => (0, import_smithy_client._json)(_2)
61736
+ })
61737
+ );
61738
+ b.m("POST").h(headers).b(body);
61739
+ return b.build();
61740
+ }, "se_RegisterClientCommand");
61741
+ var se_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (input, context) => {
61742
+ const b = (0, import_core.requestBuilder)(input, context);
61743
+ const headers = {
61744
+ "content-type": "application/json"
61745
+ };
61746
+ b.bp("/device_authorization");
61747
+ let body;
61748
+ body = JSON.stringify(
61749
+ (0, import_smithy_client.take)(input, {
61750
+ clientId: [],
61751
+ clientSecret: [],
61752
+ startUrl: []
61753
+ })
61754
+ );
61755
+ b.m("POST").h(headers).b(body);
61756
+ return b.build();
61757
+ }, "se_StartDeviceAuthorizationCommand");
61758
+ var de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => {
61759
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
61760
+ return de_CommandError(output, context);
61761
+ }
61762
+ const contents = (0, import_smithy_client.map)({
61763
+ $metadata: deserializeMetadata(output)
61764
+ });
61765
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
61766
+ const doc = (0, import_smithy_client.take)(data, {
61767
+ accessToken: import_smithy_client.expectString,
61768
+ expiresIn: import_smithy_client.expectInt32,
61769
+ idToken: import_smithy_client.expectString,
61770
+ refreshToken: import_smithy_client.expectString,
61771
+ tokenType: import_smithy_client.expectString
61772
+ });
61773
+ Object.assign(contents, doc);
61774
+ return contents;
61775
+ }, "de_CreateTokenCommand");
61776
+ var de_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (output, context) => {
61777
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
61778
+ return de_CommandError(output, context);
61779
+ }
61780
+ const contents = (0, import_smithy_client.map)({
61781
+ $metadata: deserializeMetadata(output)
61782
+ });
61783
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
61784
+ const doc = (0, import_smithy_client.take)(data, {
61785
+ accessToken: import_smithy_client.expectString,
61786
+ expiresIn: import_smithy_client.expectInt32,
61787
+ idToken: import_smithy_client.expectString,
61788
+ issuedTokenType: import_smithy_client.expectString,
61789
+ refreshToken: import_smithy_client.expectString,
61790
+ scope: import_smithy_client._json,
61791
+ tokenType: import_smithy_client.expectString
61792
+ });
61793
+ Object.assign(contents, doc);
61794
+ return contents;
61795
+ }, "de_CreateTokenWithIAMCommand");
61796
+ var de_RegisterClientCommand = /* @__PURE__ */ __name(async (output, context) => {
61797
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
61798
+ return de_CommandError(output, context);
61799
+ }
61800
+ const contents = (0, import_smithy_client.map)({
61801
+ $metadata: deserializeMetadata(output)
61802
+ });
61803
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
61804
+ const doc = (0, import_smithy_client.take)(data, {
61805
+ authorizationEndpoint: import_smithy_client.expectString,
61806
+ clientId: import_smithy_client.expectString,
61807
+ clientIdIssuedAt: import_smithy_client.expectLong,
61808
+ clientSecret: import_smithy_client.expectString,
61809
+ clientSecretExpiresAt: import_smithy_client.expectLong,
61810
+ tokenEndpoint: import_smithy_client.expectString
61811
+ });
61812
+ Object.assign(contents, doc);
61813
+ return contents;
61814
+ }, "de_RegisterClientCommand");
61815
+ var de_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (output, context) => {
61816
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
61817
+ return de_CommandError(output, context);
61818
+ }
61819
+ const contents = (0, import_smithy_client.map)({
61820
+ $metadata: deserializeMetadata(output)
61821
+ });
61822
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
61823
+ const doc = (0, import_smithy_client.take)(data, {
61824
+ deviceCode: import_smithy_client.expectString,
61825
+ expiresIn: import_smithy_client.expectInt32,
61826
+ interval: import_smithy_client.expectInt32,
61827
+ userCode: import_smithy_client.expectString,
61828
+ verificationUri: import_smithy_client.expectString,
61829
+ verificationUriComplete: import_smithy_client.expectString
61830
+ });
61831
+ Object.assign(contents, doc);
61832
+ return contents;
61833
+ }, "de_StartDeviceAuthorizationCommand");
61834
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
61835
+ const parsedOutput = {
61836
+ ...output,
61837
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
61838
+ };
61839
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
61840
+ switch (errorCode) {
61841
+ case "AccessDeniedException":
61842
+ case "com.amazonaws.ssooidc#AccessDeniedException":
61843
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
61844
+ case "AuthorizationPendingException":
61845
+ case "com.amazonaws.ssooidc#AuthorizationPendingException":
61846
+ throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
61847
+ case "ExpiredTokenException":
61848
+ case "com.amazonaws.ssooidc#ExpiredTokenException":
61849
+ throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
61850
+ case "InternalServerException":
61851
+ case "com.amazonaws.ssooidc#InternalServerException":
61852
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
61853
+ case "InvalidClientException":
61854
+ case "com.amazonaws.ssooidc#InvalidClientException":
61855
+ throw await de_InvalidClientExceptionRes(parsedOutput, context);
61856
+ case "InvalidGrantException":
61857
+ case "com.amazonaws.ssooidc#InvalidGrantException":
61858
+ throw await de_InvalidGrantExceptionRes(parsedOutput, context);
61859
+ case "InvalidRequestException":
61860
+ case "com.amazonaws.ssooidc#InvalidRequestException":
61861
+ throw await de_InvalidRequestExceptionRes(parsedOutput, context);
61862
+ case "InvalidScopeException":
61863
+ case "com.amazonaws.ssooidc#InvalidScopeException":
61864
+ throw await de_InvalidScopeExceptionRes(parsedOutput, context);
61865
+ case "SlowDownException":
61866
+ case "com.amazonaws.ssooidc#SlowDownException":
61867
+ throw await de_SlowDownExceptionRes(parsedOutput, context);
61868
+ case "UnauthorizedClientException":
61869
+ case "com.amazonaws.ssooidc#UnauthorizedClientException":
61870
+ throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
61871
+ case "UnsupportedGrantTypeException":
61872
+ case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
61873
+ throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
61874
+ case "InvalidRequestRegionException":
61875
+ case "com.amazonaws.ssooidc#InvalidRequestRegionException":
61876
+ throw await de_InvalidRequestRegionExceptionRes(parsedOutput, context);
61877
+ case "InvalidClientMetadataException":
61878
+ case "com.amazonaws.ssooidc#InvalidClientMetadataException":
61879
+ throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context);
61880
+ case "InvalidRedirectUriException":
61881
+ case "com.amazonaws.ssooidc#InvalidRedirectUriException":
61882
+ throw await de_InvalidRedirectUriExceptionRes(parsedOutput, context);
61883
+ default:
61884
+ const parsedBody = parsedOutput.body;
61885
+ return throwDefaultError({
61886
+ output,
61887
+ parsedBody,
61888
+ errorCode
61889
+ });
61890
+ }
61891
+ }, "de_CommandError");
61892
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(SSOOIDCServiceException);
61893
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61894
+ const contents = (0, import_smithy_client.map)({});
61895
+ const data = parsedOutput.body;
61896
+ const doc = (0, import_smithy_client.take)(data, {
61897
+ error: import_smithy_client.expectString,
61898
+ error_description: import_smithy_client.expectString
61899
+ });
61900
+ Object.assign(contents, doc);
61901
+ const exception = new AccessDeniedException({
61902
+ $metadata: deserializeMetadata(parsedOutput),
61903
+ ...contents
61904
+ });
61905
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61906
+ }, "de_AccessDeniedExceptionRes");
61907
+ var de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61908
+ const contents = (0, import_smithy_client.map)({});
61909
+ const data = parsedOutput.body;
61910
+ const doc = (0, import_smithy_client.take)(data, {
61911
+ error: import_smithy_client.expectString,
61912
+ error_description: import_smithy_client.expectString
61913
+ });
61914
+ Object.assign(contents, doc);
61915
+ const exception = new AuthorizationPendingException({
61916
+ $metadata: deserializeMetadata(parsedOutput),
61917
+ ...contents
61918
+ });
61919
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61920
+ }, "de_AuthorizationPendingExceptionRes");
61921
+ var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61922
+ const contents = (0, import_smithy_client.map)({});
61923
+ const data = parsedOutput.body;
61924
+ const doc = (0, import_smithy_client.take)(data, {
61925
+ error: import_smithy_client.expectString,
61926
+ error_description: import_smithy_client.expectString
61927
+ });
61928
+ Object.assign(contents, doc);
61929
+ const exception = new ExpiredTokenException({
61930
+ $metadata: deserializeMetadata(parsedOutput),
61931
+ ...contents
61932
+ });
61933
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61934
+ }, "de_ExpiredTokenExceptionRes");
61935
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61936
+ const contents = (0, import_smithy_client.map)({});
61937
+ const data = parsedOutput.body;
61938
+ const doc = (0, import_smithy_client.take)(data, {
61939
+ error: import_smithy_client.expectString,
61940
+ error_description: import_smithy_client.expectString
61941
+ });
61942
+ Object.assign(contents, doc);
61943
+ const exception = new InternalServerException({
61944
+ $metadata: deserializeMetadata(parsedOutput),
61945
+ ...contents
61946
+ });
61947
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61948
+ }, "de_InternalServerExceptionRes");
61949
+ var de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61950
+ const contents = (0, import_smithy_client.map)({});
61951
+ const data = parsedOutput.body;
61952
+ const doc = (0, import_smithy_client.take)(data, {
61953
+ error: import_smithy_client.expectString,
61954
+ error_description: import_smithy_client.expectString
61955
+ });
61956
+ Object.assign(contents, doc);
61957
+ const exception = new InvalidClientException({
61958
+ $metadata: deserializeMetadata(parsedOutput),
61959
+ ...contents
61960
+ });
61961
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61962
+ }, "de_InvalidClientExceptionRes");
61963
+ var de_InvalidClientMetadataExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61964
+ const contents = (0, import_smithy_client.map)({});
61965
+ const data = parsedOutput.body;
61966
+ const doc = (0, import_smithy_client.take)(data, {
61967
+ error: import_smithy_client.expectString,
61968
+ error_description: import_smithy_client.expectString
61969
+ });
61970
+ Object.assign(contents, doc);
61971
+ const exception = new InvalidClientMetadataException({
61972
+ $metadata: deserializeMetadata(parsedOutput),
61973
+ ...contents
61974
+ });
61975
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61976
+ }, "de_InvalidClientMetadataExceptionRes");
61977
+ var de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61978
+ const contents = (0, import_smithy_client.map)({});
61979
+ const data = parsedOutput.body;
61980
+ const doc = (0, import_smithy_client.take)(data, {
61981
+ error: import_smithy_client.expectString,
61982
+ error_description: import_smithy_client.expectString
61983
+ });
61984
+ Object.assign(contents, doc);
61985
+ const exception = new InvalidGrantException({
61986
+ $metadata: deserializeMetadata(parsedOutput),
61987
+ ...contents
61988
+ });
61989
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
61990
+ }, "de_InvalidGrantExceptionRes");
61991
+ var de_InvalidRedirectUriExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
61992
+ const contents = (0, import_smithy_client.map)({});
61993
+ const data = parsedOutput.body;
61994
+ const doc = (0, import_smithy_client.take)(data, {
61995
+ error: import_smithy_client.expectString,
61996
+ error_description: import_smithy_client.expectString
61997
+ });
61998
+ Object.assign(contents, doc);
61999
+ const exception = new InvalidRedirectUriException({
62000
+ $metadata: deserializeMetadata(parsedOutput),
62001
+ ...contents
62002
+ });
62003
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62004
+ }, "de_InvalidRedirectUriExceptionRes");
62005
+ var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62006
+ const contents = (0, import_smithy_client.map)({});
62007
+ const data = parsedOutput.body;
62008
+ const doc = (0, import_smithy_client.take)(data, {
62009
+ error: import_smithy_client.expectString,
62010
+ error_description: import_smithy_client.expectString
62011
+ });
62012
+ Object.assign(contents, doc);
62013
+ const exception = new InvalidRequestException({
62014
+ $metadata: deserializeMetadata(parsedOutput),
62015
+ ...contents
62016
+ });
62017
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62018
+ }, "de_InvalidRequestExceptionRes");
62019
+ var de_InvalidRequestRegionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62020
+ const contents = (0, import_smithy_client.map)({});
62021
+ const data = parsedOutput.body;
62022
+ const doc = (0, import_smithy_client.take)(data, {
62023
+ endpoint: import_smithy_client.expectString,
62024
+ error: import_smithy_client.expectString,
62025
+ error_description: import_smithy_client.expectString,
62026
+ region: import_smithy_client.expectString
62027
+ });
62028
+ Object.assign(contents, doc);
62029
+ const exception = new InvalidRequestRegionException({
62030
+ $metadata: deserializeMetadata(parsedOutput),
62031
+ ...contents
62032
+ });
62033
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62034
+ }, "de_InvalidRequestRegionExceptionRes");
62035
+ var de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62036
+ const contents = (0, import_smithy_client.map)({});
62037
+ const data = parsedOutput.body;
62038
+ const doc = (0, import_smithy_client.take)(data, {
62039
+ error: import_smithy_client.expectString,
62040
+ error_description: import_smithy_client.expectString
62041
+ });
62042
+ Object.assign(contents, doc);
62043
+ const exception = new InvalidScopeException({
62044
+ $metadata: deserializeMetadata(parsedOutput),
62045
+ ...contents
62046
+ });
62047
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62048
+ }, "de_InvalidScopeExceptionRes");
62049
+ var de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62050
+ const contents = (0, import_smithy_client.map)({});
62051
+ const data = parsedOutput.body;
62052
+ const doc = (0, import_smithy_client.take)(data, {
62053
+ error: import_smithy_client.expectString,
62054
+ error_description: import_smithy_client.expectString
62055
+ });
62056
+ Object.assign(contents, doc);
62057
+ const exception = new SlowDownException({
62058
+ $metadata: deserializeMetadata(parsedOutput),
62059
+ ...contents
62060
+ });
62061
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62062
+ }, "de_SlowDownExceptionRes");
62063
+ var de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62064
+ const contents = (0, import_smithy_client.map)({});
62065
+ const data = parsedOutput.body;
62066
+ const doc = (0, import_smithy_client.take)(data, {
62067
+ error: import_smithy_client.expectString,
62068
+ error_description: import_smithy_client.expectString
62069
+ });
62070
+ Object.assign(contents, doc);
62071
+ const exception = new UnauthorizedClientException({
62072
+ $metadata: deserializeMetadata(parsedOutput),
62073
+ ...contents
62074
+ });
62075
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62076
+ }, "de_UnauthorizedClientExceptionRes");
62077
+ var de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
62078
+ const contents = (0, import_smithy_client.map)({});
62079
+ const data = parsedOutput.body;
62080
+ const doc = (0, import_smithy_client.take)(data, {
62081
+ error: import_smithy_client.expectString,
62082
+ error_description: import_smithy_client.expectString
62083
+ });
62084
+ Object.assign(contents, doc);
62085
+ const exception = new UnsupportedGrantTypeException({
62086
+ $metadata: deserializeMetadata(parsedOutput),
62087
+ ...contents
62088
+ });
62089
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
62090
+ }, "de_UnsupportedGrantTypeExceptionRes");
62091
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
62092
+ httpStatusCode: output.statusCode,
62093
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
62094
+ extendedRequestId: output.headers["x-amz-id-2"],
62095
+ cfId: output.headers["x-amz-cf-id"]
62096
+ }), "deserializeMetadata");
62097
+ var _ai = "aws_iam";
62098
+ var _CreateTokenCommand = class _CreateTokenCommand extends import_smithy_client.Command.classBuilder().ep({
62099
+ ...commonParams
62100
+ }).m(function(Command, cs, config, o) {
62101
+ return [
62102
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
62103
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
62104
+ ];
62105
+ }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {
62106
+ };
62107
+ __name(_CreateTokenCommand, "CreateTokenCommand");
62108
+ var CreateTokenCommand = _CreateTokenCommand;
62109
+ var _CreateTokenWithIAMCommand = class _CreateTokenWithIAMCommand extends import_smithy_client.Command.classBuilder().ep({
62110
+ ...commonParams
62111
+ }).m(function(Command, cs, config, o) {
62112
+ return [
62113
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
62114
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
62115
+ ];
62116
+ }).s("AWSSSOOIDCService", "CreateTokenWithIAM", {}).n("SSOOIDCClient", "CreateTokenWithIAMCommand").f(CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog).ser(se_CreateTokenWithIAMCommand).de(de_CreateTokenWithIAMCommand).build() {
62117
+ };
62118
+ __name(_CreateTokenWithIAMCommand, "CreateTokenWithIAMCommand");
62119
+ var CreateTokenWithIAMCommand = _CreateTokenWithIAMCommand;
62120
+ var _RegisterClientCommand = class _RegisterClientCommand extends import_smithy_client.Command.classBuilder().ep({
62121
+ ...commonParams
62122
+ }).m(function(Command, cs, config, o) {
62123
+ return [
62124
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
62125
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
62126
+ ];
62127
+ }).s("AWSSSOOIDCService", "RegisterClient", {}).n("SSOOIDCClient", "RegisterClientCommand").f(void 0, RegisterClientResponseFilterSensitiveLog).ser(se_RegisterClientCommand).de(de_RegisterClientCommand).build() {
62128
+ };
62129
+ __name(_RegisterClientCommand, "RegisterClientCommand");
62130
+ var RegisterClientCommand = _RegisterClientCommand;
62131
+ var _StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends import_smithy_client.Command.classBuilder().ep({
62132
+ ...commonParams
62133
+ }).m(function(Command, cs, config, o) {
62134
+ return [
62135
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
62136
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
62137
+ ];
62138
+ }).s("AWSSSOOIDCService", "StartDeviceAuthorization", {}).n("SSOOIDCClient", "StartDeviceAuthorizationCommand").f(StartDeviceAuthorizationRequestFilterSensitiveLog, void 0).ser(se_StartDeviceAuthorizationCommand).de(de_StartDeviceAuthorizationCommand).build() {
62139
+ };
62140
+ __name(_StartDeviceAuthorizationCommand, "StartDeviceAuthorizationCommand");
62141
+ var StartDeviceAuthorizationCommand = _StartDeviceAuthorizationCommand;
62142
+ var commands = {
62143
+ CreateTokenCommand,
62144
+ CreateTokenWithIAMCommand,
62145
+ RegisterClientCommand,
62146
+ StartDeviceAuthorizationCommand
62147
+ };
62148
+ var _SSOOIDC = class _SSOOIDC extends SSOOIDCClient {
62149
+ };
62150
+ __name(_SSOOIDC, "SSOOIDC");
62151
+ var SSOOIDC = _SSOOIDC;
62152
+ (0, import_smithy_client.createAggregatedClient)(commands, SSOOIDC);
62153
+ }
62154
+ });
62155
+
62156
+ // ../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
62157
+ var require_dist_cjs51 = __commonJS({
62158
+ "../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) {
62159
+ "use strict";
62160
+ var __create3 = Object.create;
62161
+ var __defProp3 = Object.defineProperty;
62162
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62163
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62164
+ var __getProtoOf3 = Object.getPrototypeOf;
62165
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62166
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62167
+ var __export2 = (target, all) => {
62168
+ for (var name in all)
62169
+ __defProp3(target, name, { get: all[name], enumerable: true });
62170
+ };
62171
+ var __copyProps3 = (to, from, except, desc) => {
62172
+ if (from && typeof from === "object" || typeof from === "function") {
62173
+ for (let key of __getOwnPropNames3(from))
62174
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62175
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62176
+ }
62177
+ return to;
62178
+ };
62179
+ var __toESM3 = (mod, isNodeMode, target) => (target = mod != null ? __create3(__getProtoOf3(mod)) : {}, __copyProps3(
62180
+ // If the importer is in node compatibility mode or this is not an ESM
62181
+ // file that has been converted to a CommonJS file using a Babel-
62182
+ // compatible transform (i.e. "__esModule" has not been set), then set
62183
+ // "default" to the CommonJS "module.exports" for node compatibility.
62184
+ isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target,
62185
+ mod
62186
+ ));
62187
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62188
+ var src_exports = {};
62189
+ __export2(src_exports, {
62190
+ fromSso: () => fromSso,
62191
+ fromStatic: () => fromStatic,
62192
+ nodeProvider: () => nodeProvider
62193
+ });
62194
+ module2.exports = __toCommonJS2(src_exports);
62195
+ var EXPIRE_WINDOW_MS = 5 * 60 * 1e3;
62196
+ var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
62197
+ var ssoOidcClientsHash = {};
62198
+ var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion) => {
62199
+ const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM3(require_dist_cjs50()));
62200
+ if (ssoOidcClientsHash[ssoRegion]) {
62201
+ return ssoOidcClientsHash[ssoRegion];
62202
+ }
62203
+ const ssoOidcClient = new SSOOIDCClient({ region: ssoRegion });
62204
+ ssoOidcClientsHash[ssoRegion] = ssoOidcClient;
62205
+ return ssoOidcClient;
62206
+ }, "getSsoOidcClient");
62207
+ var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion) => {
62208
+ const { CreateTokenCommand } = await Promise.resolve().then(() => __toESM3(require_dist_cjs50()));
62209
+ const ssoOidcClient = await getSsoOidcClient(ssoRegion);
62210
+ return ssoOidcClient.send(
62211
+ new CreateTokenCommand({
62212
+ clientId: ssoToken.clientId,
62213
+ clientSecret: ssoToken.clientSecret,
62214
+ refreshToken: ssoToken.refreshToken,
62215
+ grantType: "refresh_token"
62216
+ })
62217
+ );
62218
+ }, "getNewSsoOidcToken");
62219
+ var import_property_provider = require_dist_cjs12();
62220
+ var validateTokenExpiry = /* @__PURE__ */ __name((token) => {
62221
+ if (token.expiration && token.expiration.getTime() < Date.now()) {
62222
+ throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
62223
+ }
62224
+ }, "validateTokenExpiry");
62225
+ var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => {
62226
+ if (typeof value === "undefined") {
62227
+ throw new import_property_provider.TokenProviderError(
62228
+ `Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`,
62229
+ false
62230
+ );
62231
+ }
62232
+ }, "validateTokenKey");
62233
+ var import_shared_ini_file_loader = require_dist_cjs13();
62234
+ var import_fs14 = require("fs");
62235
+ var { writeFile } = import_fs14.promises;
62236
+ var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => {
62237
+ const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id);
62238
+ const tokenString = JSON.stringify(ssoToken, null, 2);
62239
+ return writeFile(tokenFilepath, tokenString);
62240
+ }, "writeSSOTokenToFile");
62241
+ var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
62242
+ var fromSso = /* @__PURE__ */ __name((init2 = {}) => async () => {
62243
+ var _a;
62244
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/token-providers", "fromSso");
62245
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init2);
62246
+ const profileName = (0, import_shared_ini_file_loader.getProfileName)(init2);
62247
+ const profile = profiles[profileName];
62248
+ if (!profile) {
62249
+ throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
62250
+ } else if (!profile["sso_session"]) {
62251
+ throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
62252
+ }
62253
+ const ssoSessionName = profile["sso_session"];
62254
+ const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init2);
62255
+ const ssoSession = ssoSessions[ssoSessionName];
62256
+ if (!ssoSession) {
62257
+ throw new import_property_provider.TokenProviderError(
62258
+ `Sso session '${ssoSessionName}' could not be found in shared credentials file.`,
62259
+ false
62260
+ );
62261
+ }
62262
+ for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
62263
+ if (!ssoSession[ssoSessionRequiredKey]) {
62264
+ throw new import_property_provider.TokenProviderError(
62265
+ `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`,
62266
+ false
62267
+ );
62268
+ }
62269
+ }
62270
+ const ssoStartUrl = ssoSession["sso_start_url"];
62271
+ const ssoRegion = ssoSession["sso_region"];
62272
+ let ssoToken;
62273
+ try {
62274
+ ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName);
62275
+ } catch (e2) {
62276
+ throw new import_property_provider.TokenProviderError(
62277
+ `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`,
62278
+ false
62279
+ );
62280
+ }
62281
+ validateTokenKey("accessToken", ssoToken.accessToken);
62282
+ validateTokenKey("expiresAt", ssoToken.expiresAt);
62283
+ const { accessToken, expiresAt } = ssoToken;
62284
+ const existingToken = { token: accessToken, expiration: new Date(expiresAt) };
62285
+ if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
62286
+ return existingToken;
62287
+ }
62288
+ if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {
62289
+ validateTokenExpiry(existingToken);
62290
+ return existingToken;
62291
+ }
62292
+ validateTokenKey("clientId", ssoToken.clientId, true);
62293
+ validateTokenKey("clientSecret", ssoToken.clientSecret, true);
62294
+ validateTokenKey("refreshToken", ssoToken.refreshToken, true);
62295
+ try {
62296
+ lastRefreshAttemptTime.setTime(Date.now());
62297
+ const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion);
62298
+ validateTokenKey("accessToken", newSsoOidcToken.accessToken);
62299
+ validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
62300
+ const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);
62301
+ try {
62302
+ await writeSSOTokenToFile(ssoSessionName, {
62303
+ ...ssoToken,
62304
+ accessToken: newSsoOidcToken.accessToken,
62305
+ expiresAt: newTokenExpiration.toISOString(),
62306
+ refreshToken: newSsoOidcToken.refreshToken
62307
+ });
62308
+ } catch (error2) {
62309
+ }
62310
+ return {
62311
+ token: newSsoOidcToken.accessToken,
62312
+ expiration: newTokenExpiration
62313
+ };
62314
+ } catch (error2) {
62315
+ validateTokenExpiry(existingToken);
62316
+ return existingToken;
62317
+ }
62318
+ }, "fromSso");
62319
+ var fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => {
62320
+ logger == null ? void 0 : logger.debug("@aws-sdk/token-providers", "fromStatic");
62321
+ if (!token || !token.token) {
62322
+ throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
62323
+ }
62324
+ return token;
62325
+ }, "fromStatic");
62326
+ var nodeProvider = /* @__PURE__ */ __name((init2 = {}) => (0, import_property_provider.memoize)(
62327
+ (0, import_property_provider.chain)(fromSso(init2), async () => {
62328
+ throw new import_property_provider.TokenProviderError("Could not load token from any providers", false);
62329
+ }),
62330
+ (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5,
62331
+ (token) => token.expiration !== void 0
62332
+ ), "nodeProvider");
62333
+ }
62334
+ });
62335
+
62336
+ // ../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
62337
+ var require_dist_cjs52 = __commonJS({
62338
+ "../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) {
62339
+ "use strict";
62340
+ var __defProp3 = Object.defineProperty;
62341
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62342
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62343
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62344
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62345
+ var __esm2 = (fn, res) => function __init() {
62346
+ return fn && (res = (0, fn[__getOwnPropNames3(fn)[0]])(fn = 0)), res;
62347
+ };
62348
+ var __export2 = (target, all) => {
62349
+ for (var name in all)
62350
+ __defProp3(target, name, { get: all[name], enumerable: true });
62351
+ };
62352
+ var __copyProps3 = (to, from, except, desc) => {
62353
+ if (from && typeof from === "object" || typeof from === "function") {
62354
+ for (let key of __getOwnPropNames3(from))
62355
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62356
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62357
+ }
62358
+ return to;
62359
+ };
62360
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62361
+ var loadSso_exports = {};
62362
+ __export2(loadSso_exports, {
62363
+ GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand,
62364
+ SSOClient: () => import_client_sso.SSOClient
62365
+ });
62366
+ var import_client_sso;
62367
+ var init_loadSso = __esm2({
62368
+ "src/loadSso.ts"() {
62369
+ "use strict";
62370
+ import_client_sso = require_dist_cjs46();
62371
+ }
62372
+ });
62373
+ var src_exports = {};
62374
+ __export2(src_exports, {
62375
+ fromSSO: () => fromSSO,
62376
+ isSsoProfile: () => isSsoProfile,
62377
+ validateSsoProfile: () => validateSsoProfile
62378
+ });
62379
+ module2.exports = __toCommonJS2(src_exports);
62380
+ 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");
62381
+ var import_token_providers = require_dist_cjs51();
62382
+ var import_property_provider = require_dist_cjs12();
62383
+ var import_shared_ini_file_loader = require_dist_cjs13();
62384
+ var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
62385
+ var resolveSSOCredentials = /* @__PURE__ */ __name(async ({
62386
+ ssoStartUrl,
62387
+ ssoSession,
62388
+ ssoAccountId,
62389
+ ssoRegion,
62390
+ ssoRoleName,
62391
+ ssoClient,
62392
+ clientConfig,
62393
+ profile
62394
+ }) => {
62395
+ let token;
62396
+ const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
62397
+ if (ssoSession) {
62398
+ try {
62399
+ const _token = await (0, import_token_providers.fromSso)({ profile })();
62400
+ token = {
62401
+ accessToken: _token.token,
62402
+ expiresAt: new Date(_token.expiration).toISOString()
62403
+ };
62404
+ } catch (e2) {
62405
+ throw new import_property_provider.CredentialsProviderError(e2.message, SHOULD_FAIL_CREDENTIAL_CHAIN);
62406
+ }
62407
+ } else {
62408
+ try {
62409
+ token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl);
62410
+ } catch (e2) {
62411
+ throw new import_property_provider.CredentialsProviderError(
62412
+ `The SSO session associated with this profile is invalid. ${refreshMessage}`,
62413
+ SHOULD_FAIL_CREDENTIAL_CHAIN
62414
+ );
62415
+ }
62416
+ }
62417
+ if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
62418
+ throw new import_property_provider.CredentialsProviderError(
62419
+ `The SSO session associated with this profile has expired. ${refreshMessage}`,
62420
+ SHOULD_FAIL_CREDENTIAL_CHAIN
62421
+ );
62422
+ }
62423
+ const { accessToken } = token;
62424
+ const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports));
62425
+ const sso = ssoClient || new SSOClient2(
62426
+ Object.assign({}, clientConfig ?? {}, {
62427
+ region: (clientConfig == null ? void 0 : clientConfig.region) ?? ssoRegion
62428
+ })
62429
+ );
62430
+ let ssoResp;
62431
+ try {
62432
+ ssoResp = await sso.send(
62433
+ new GetRoleCredentialsCommand2({
62434
+ accountId: ssoAccountId,
62435
+ roleName: ssoRoleName,
62436
+ accessToken
62437
+ })
62438
+ );
62439
+ } catch (e2) {
62440
+ throw import_property_provider.CredentialsProviderError.from(e2, SHOULD_FAIL_CREDENTIAL_CHAIN);
62441
+ }
62442
+ const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope } = {} } = ssoResp;
62443
+ if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
62444
+ throw new import_property_provider.CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN);
62445
+ }
62446
+ return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration), credentialScope };
62447
+ }, "resolveSSOCredentials");
62448
+ var validateSsoProfile = /* @__PURE__ */ __name((profile) => {
62449
+ const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
62450
+ if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
62451
+ throw new import_property_provider.CredentialsProviderError(
62452
+ `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(
62453
+ ", "
62454
+ )}
62455
+ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,
62456
+ false
62457
+ );
62458
+ }
62459
+ return profile;
62460
+ }, "validateSsoProfile");
62461
+ var fromSSO = /* @__PURE__ */ __name((init2 = {}) => async () => {
62462
+ var _a;
62463
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-sso", "fromSSO");
62464
+ const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init2;
62465
+ const { ssoClient } = init2;
62466
+ const profileName = (0, import_shared_ini_file_loader.getProfileName)(init2);
62467
+ if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
62468
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init2);
62469
+ const profile = profiles[profileName];
62470
+ if (!profile) {
62471
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`);
62472
+ }
62473
+ if (!isSsoProfile(profile)) {
62474
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`);
62475
+ }
62476
+ if (profile == null ? void 0 : profile.sso_session) {
62477
+ const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init2);
62478
+ const session = ssoSessions[profile.sso_session];
62479
+ const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
62480
+ if (ssoRegion && ssoRegion !== session.sso_region) {
62481
+ throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, false);
62482
+ }
62483
+ if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
62484
+ throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, false);
62485
+ }
62486
+ profile.sso_region = session.sso_region;
62487
+ profile.sso_start_url = session.sso_start_url;
62488
+ }
62489
+ const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile);
62490
+ return resolveSSOCredentials({
62491
+ ssoStartUrl: sso_start_url,
62492
+ ssoSession: sso_session,
62493
+ ssoAccountId: sso_account_id,
62494
+ ssoRegion: sso_region,
62495
+ ssoRoleName: sso_role_name,
62496
+ ssoClient,
62497
+ clientConfig: init2.clientConfig,
62498
+ profile: profileName
62499
+ });
62500
+ } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
62501
+ throw new import_property_provider.CredentialsProviderError(
62502
+ 'Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"'
62503
+ );
62504
+ } else {
62505
+ return resolveSSOCredentials({
62506
+ ssoStartUrl,
62507
+ ssoSession,
62508
+ ssoAccountId,
62509
+ ssoRegion,
62510
+ ssoRoleName,
62511
+ ssoClient,
62512
+ clientConfig: init2.clientConfig,
62513
+ profile: profileName
62514
+ });
62515
+ }
62516
+ }, "fromSSO");
62517
+ }
62518
+ });
62519
+
62520
+ // ../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.577.0/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js
62521
+ var require_dist_cjs53 = __commonJS({
62522
+ "../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.577.0/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2, module2) {
62523
+ "use strict";
62524
+ var __defProp3 = Object.defineProperty;
62525
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62526
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62527
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62528
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62529
+ var __export2 = (target, all) => {
62530
+ for (var name in all)
62531
+ __defProp3(target, name, { get: all[name], enumerable: true });
62532
+ };
62533
+ var __copyProps3 = (to, from, except, desc) => {
62534
+ if (from && typeof from === "object" || typeof from === "function") {
62535
+ for (let key of __getOwnPropNames3(from))
62536
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62537
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62538
+ }
62539
+ return to;
62540
+ };
62541
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62542
+ var src_exports = {};
62543
+ __export2(src_exports, {
62544
+ fromProcess: () => fromProcess
62545
+ });
62546
+ module2.exports = __toCommonJS2(src_exports);
62547
+ var import_shared_ini_file_loader = require_dist_cjs13();
62548
+ var import_property_provider = require_dist_cjs12();
62549
+ var import_child_process = require("child_process");
62550
+ var import_util5 = require("util");
62551
+ var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data) => {
62552
+ if (data.Version !== 1) {
62553
+ throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
62554
+ }
62555
+ if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {
62556
+ throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
62557
+ }
62558
+ if (data.Expiration) {
62559
+ const currentTime = /* @__PURE__ */ new Date();
62560
+ const expireTime = new Date(data.Expiration);
62561
+ if (expireTime < currentTime) {
62562
+ throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
62563
+ }
62564
+ }
62565
+ return {
62566
+ accessKeyId: data.AccessKeyId,
62567
+ secretAccessKey: data.SecretAccessKey,
62568
+ ...data.SessionToken && { sessionToken: data.SessionToken },
62569
+ ...data.Expiration && { expiration: new Date(data.Expiration) },
62570
+ ...data.CredentialScope && { credentialScope: data.CredentialScope }
62571
+ };
62572
+ }, "getValidatedProcessCredentials");
62573
+ var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles) => {
62574
+ const profile = profiles[profileName];
62575
+ if (profiles[profileName]) {
62576
+ const credentialProcess = profile["credential_process"];
62577
+ if (credentialProcess !== void 0) {
62578
+ const execPromise = (0, import_util5.promisify)(import_child_process.exec);
62579
+ try {
62580
+ const { stdout } = await execPromise(credentialProcess);
62581
+ let data;
62582
+ try {
62583
+ data = JSON.parse(stdout.trim());
62584
+ } catch {
62585
+ throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
62586
+ }
62587
+ return getValidatedProcessCredentials(profileName, data);
62588
+ } catch (error2) {
62589
+ throw new import_property_provider.CredentialsProviderError(error2.message);
62590
+ }
62591
+ } else {
62592
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`);
62593
+ }
62594
+ } else {
62595
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`);
62596
+ }
62597
+ }, "resolveProcessCredentials");
62598
+ var fromProcess = /* @__PURE__ */ __name((init2 = {}) => async () => {
62599
+ var _a;
62600
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process", "fromProcess");
62601
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init2);
62602
+ return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init2), profiles);
62603
+ }, "fromProcess");
62604
+ }
62605
+ });
62606
+
62607
+ // ../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
62608
+ var require_fromWebToken = __commonJS({
62609
+ "../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) {
62610
+ "use strict";
62611
+ var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
62612
+ if (k2 === void 0)
62613
+ k2 = k;
62614
+ var desc = Object.getOwnPropertyDescriptor(m2, k);
62615
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
62616
+ desc = { enumerable: true, get: function() {
62617
+ return m2[k];
62618
+ } };
62619
+ }
62620
+ Object.defineProperty(o, k2, desc);
62621
+ } : function(o, m2, k, k2) {
62622
+ if (k2 === void 0)
62623
+ k2 = k;
62624
+ o[k2] = m2[k];
62625
+ });
62626
+ var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
62627
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
62628
+ } : function(o, v) {
62629
+ o["default"] = v;
62630
+ });
62631
+ var __importStar3 = exports2 && exports2.__importStar || function(mod) {
62632
+ if (mod && mod.__esModule)
62633
+ return mod;
62634
+ var result = {};
62635
+ if (mod != null) {
62636
+ for (var k in mod)
62637
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
62638
+ __createBinding3(result, mod, k);
62639
+ }
62640
+ __setModuleDefault3(result, mod);
62641
+ return result;
62642
+ };
62643
+ Object.defineProperty(exports2, "__esModule", { value: true });
62644
+ exports2.fromWebToken = void 0;
62645
+ var fromWebToken2 = (init2) => async () => {
62646
+ var _a;
62647
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromWebToken");
62648
+ const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy: policy4, durationSeconds } = init2;
62649
+ let { roleAssumerWithWebIdentity } = init2;
62650
+ if (!roleAssumerWithWebIdentity) {
62651
+ const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar3(require_dist_cjs57()));
62652
+ roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
62653
+ ...init2.clientConfig,
62654
+ credentialProviderLogger: init2.logger,
62655
+ parentClientConfig: init2.parentClientConfig
62656
+ }, init2.clientPlugins);
62657
+ }
62658
+ return roleAssumerWithWebIdentity({
62659
+ RoleArn: roleArn,
62660
+ RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,
62661
+ WebIdentityToken: webIdentityToken,
62662
+ ProviderId: providerId,
62663
+ PolicyArns: policyArns,
62664
+ Policy: policy4,
62665
+ DurationSeconds: durationSeconds
62666
+ });
62667
+ };
62668
+ exports2.fromWebToken = fromWebToken2;
62669
+ }
62670
+ });
62671
+
62672
+ // ../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
62673
+ var require_fromTokenFile = __commonJS({
62674
+ "../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) {
62675
+ "use strict";
62676
+ Object.defineProperty(exports2, "__esModule", { value: true });
62677
+ exports2.fromTokenFile = void 0;
62678
+ var property_provider_1 = require_dist_cjs12();
62679
+ var fs_1 = require("fs");
62680
+ var fromWebToken_1 = require_fromWebToken();
62681
+ var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
62682
+ var ENV_ROLE_ARN = "AWS_ROLE_ARN";
62683
+ var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
62684
+ var fromTokenFile2 = (init2 = {}) => async () => {
62685
+ var _a;
62686
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromTokenFile");
62687
+ const webIdentityTokenFile = (init2 == null ? void 0 : init2.webIdentityTokenFile) ?? process.env[ENV_TOKEN_FILE];
62688
+ const roleArn = (init2 == null ? void 0 : init2.roleArn) ?? process.env[ENV_ROLE_ARN];
62689
+ const roleSessionName = (init2 == null ? void 0 : init2.roleSessionName) ?? process.env[ENV_ROLE_SESSION_NAME];
62690
+ if (!webIdentityTokenFile || !roleArn) {
62691
+ throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified");
62692
+ }
62693
+ return (0, fromWebToken_1.fromWebToken)({
62694
+ ...init2,
62695
+ webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
62696
+ roleArn,
62697
+ roleSessionName
62698
+ })();
62699
+ };
62700
+ exports2.fromTokenFile = fromTokenFile2;
62701
+ }
62702
+ });
62703
+
62704
+ // ../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
62705
+ var require_dist_cjs54 = __commonJS({
62706
+ "../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) {
62707
+ "use strict";
62708
+ var __defProp3 = Object.defineProperty;
62709
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62710
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62711
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62712
+ var __copyProps3 = (to, from, except, desc) => {
62713
+ if (from && typeof from === "object" || typeof from === "function") {
62714
+ for (let key of __getOwnPropNames3(from))
62715
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62716
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62717
+ }
62718
+ return to;
62719
+ };
62720
+ var __reExport = (target, mod, secondTarget) => (__copyProps3(target, mod, "default"), secondTarget && __copyProps3(secondTarget, mod, "default"));
62721
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62722
+ var src_exports = {};
62723
+ module2.exports = __toCommonJS2(src_exports);
62724
+ __reExport(src_exports, require_fromTokenFile(), module2.exports);
62725
+ __reExport(src_exports, require_fromWebToken(), module2.exports);
62726
+ }
62727
+ });
62728
+
62729
+ // ../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
62730
+ var require_dist_cjs55 = __commonJS({
62731
+ "../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) {
62732
+ "use strict";
62733
+ var __create3 = Object.create;
62734
+ var __defProp3 = Object.defineProperty;
62735
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62736
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62737
+ var __getProtoOf3 = Object.getPrototypeOf;
62738
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62739
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62740
+ var __export2 = (target, all) => {
62741
+ for (var name in all)
62742
+ __defProp3(target, name, { get: all[name], enumerable: true });
62743
+ };
62744
+ var __copyProps3 = (to, from, except, desc) => {
62745
+ if (from && typeof from === "object" || typeof from === "function") {
62746
+ for (let key of __getOwnPropNames3(from))
62747
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62748
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62749
+ }
62750
+ return to;
62751
+ };
62752
+ var __toESM3 = (mod, isNodeMode, target) => (target = mod != null ? __create3(__getProtoOf3(mod)) : {}, __copyProps3(
62753
+ // If the importer is in node compatibility mode or this is not an ESM
62754
+ // file that has been converted to a CommonJS file using a Babel-
62755
+ // compatible transform (i.e. "__esModule" has not been set), then set
62756
+ // "default" to the CommonJS "module.exports" for node compatibility.
62757
+ isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target,
62758
+ mod
62759
+ ));
62760
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62761
+ var src_exports = {};
62762
+ __export2(src_exports, {
62763
+ fromIni: () => fromIni
62764
+ });
62765
+ module2.exports = __toCommonJS2(src_exports);
62766
+ var import_shared_ini_file_loader = require_dist_cjs13();
62767
+ var import_property_provider = require_dist_cjs12();
62768
+ var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName) => {
62769
+ const sourceProvidersMap = {
62770
+ EcsContainer: (options) => Promise.resolve().then(() => __toESM3(require_dist_cjs39())).then(({ fromContainerMetadata }) => fromContainerMetadata(options)),
62771
+ Ec2InstanceMetadata: (options) => Promise.resolve().then(() => __toESM3(require_dist_cjs39())).then(({ fromInstanceMetadata }) => fromInstanceMetadata(options)),
62772
+ Environment: (options) => Promise.resolve().then(() => __toESM3(require_dist_cjs38())).then(({ fromEnv }) => fromEnv(options))
62773
+ };
62774
+ if (credentialSource in sourceProvidersMap) {
62775
+ return sourceProvidersMap[credentialSource];
62776
+ } else {
62777
+ throw new import_property_provider.CredentialsProviderError(
62778
+ `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`
62779
+ );
62780
+ }
62781
+ }, "resolveCredentialSource");
62782
+ 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");
62783
+ var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg) => typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined", "isAssumeRoleWithSourceProfile");
62784
+ var isAssumeRoleWithProviderProfile = /* @__PURE__ */ __name((arg) => typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined", "isAssumeRoleWithProviderProfile");
62785
+ var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {
62786
+ var _a;
62787
+ (_a = options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveAssumeRoleCredentials (STS)");
62788
+ const data = profiles[profileName];
62789
+ if (!options.roleAssumer) {
62790
+ const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM3(require_dist_cjs57()));
62791
+ options.roleAssumer = getDefaultRoleAssumer(
62792
+ {
62793
+ ...options.clientConfig,
62794
+ credentialProviderLogger: options.logger,
62795
+ parentClientConfig: options == null ? void 0 : options.parentClientConfig
62796
+ },
62797
+ options.clientPlugins
62798
+ );
62799
+ }
62800
+ const { source_profile } = data;
62801
+ if (source_profile && source_profile in visitedProfiles) {
62802
+ throw new import_property_provider.CredentialsProviderError(
62803
+ `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "),
62804
+ false
62805
+ );
62806
+ }
62807
+ const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, {
62808
+ ...visitedProfiles,
62809
+ [source_profile]: true
62810
+ }) : (await resolveCredentialSource(data.credential_source, profileName)(options))();
62811
+ const params = {
62812
+ RoleArn: data.role_arn,
62813
+ RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`,
62814
+ ExternalId: data.external_id,
62815
+ DurationSeconds: parseInt(data.duration_seconds || "3600", 10)
62816
+ };
62817
+ const { mfa_serial } = data;
62818
+ if (mfa_serial) {
62819
+ if (!options.mfaCodeProvider) {
62820
+ throw new import_property_provider.CredentialsProviderError(
62821
+ `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`,
62822
+ false
62823
+ );
62824
+ }
62825
+ params.SerialNumber = mfa_serial;
62826
+ params.TokenCode = await options.mfaCodeProvider(mfa_serial);
62827
+ }
62828
+ const sourceCreds = await sourceCredsProvider;
62829
+ return options.roleAssumer(sourceCreds, params);
62830
+ }, "resolveAssumeRoleCredentials");
62831
+ var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile");
62832
+ var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM3(require_dist_cjs53())).then(
62833
+ ({ fromProcess }) => fromProcess({
62834
+ ...options,
62835
+ profile
62836
+ })()
62837
+ ), "resolveProcessCredentials");
62838
+ var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => {
62839
+ const { fromSSO } = await Promise.resolve().then(() => __toESM3(require_dist_cjs52()));
62840
+ return fromSSO({
62841
+ profile,
62842
+ logger: options.logger
62843
+ })();
62844
+ }, "resolveSsoCredentials");
62845
+ 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");
62846
+ 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");
62847
+ var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => {
62848
+ var _a;
62849
+ (_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveStaticCredentials");
62850
+ return Promise.resolve({
62851
+ accessKeyId: profile.aws_access_key_id,
62852
+ secretAccessKey: profile.aws_secret_access_key,
62853
+ sessionToken: profile.aws_session_token,
62854
+ credentialScope: profile.aws_credential_scope
62855
+ });
62856
+ }, "resolveStaticCredentials");
62857
+ 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");
62858
+ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM3(require_dist_cjs54())).then(
62859
+ ({ fromTokenFile: fromTokenFile2 }) => fromTokenFile2({
62860
+ webIdentityTokenFile: profile.web_identity_token_file,
62861
+ roleArn: profile.role_arn,
62862
+ roleSessionName: profile.role_session_name,
62863
+ roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
62864
+ logger: options.logger,
62865
+ parentClientConfig: options.parentClientConfig
62866
+ })()
62867
+ ), "resolveWebIdentityCredentials");
62868
+ var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {
62869
+ const data = profiles[profileName];
62870
+ if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
62871
+ return resolveStaticCredentials(data, options);
62872
+ }
62873
+ if (isAssumeRoleProfile(data)) {
62874
+ return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
62875
+ }
62876
+ if (isStaticCredsProfile(data)) {
62877
+ return resolveStaticCredentials(data, options);
62878
+ }
62879
+ if (isWebIdentityProfile(data)) {
62880
+ return resolveWebIdentityCredentials(data, options);
62881
+ }
62882
+ if (isProcessProfile(data)) {
62883
+ return resolveProcessCredentials(options, profileName);
62884
+ }
62885
+ if (isSsoProfile(data)) {
62886
+ return await resolveSsoCredentials(profileName, options);
62887
+ }
62888
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
62889
+ }, "resolveProfileData");
62890
+ var fromIni = /* @__PURE__ */ __name((init2 = {}) => async () => {
62891
+ var _a;
62892
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "fromIni");
62893
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init2);
62894
+ return resolveProfileData((0, import_shared_ini_file_loader.getProfileName)(init2), profiles, init2);
62895
+ }, "fromIni");
62896
+ }
62897
+ });
62898
+
62899
+ // ../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
62900
+ var require_dist_cjs56 = __commonJS({
62901
+ "../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) {
62902
+ "use strict";
62903
+ var __create3 = Object.create;
62904
+ var __defProp3 = Object.defineProperty;
62905
+ var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62906
+ var __getOwnPropNames3 = Object.getOwnPropertyNames;
62907
+ var __getProtoOf3 = Object.getPrototypeOf;
62908
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62909
+ var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62910
+ var __export2 = (target, all) => {
62911
+ for (var name in all)
62912
+ __defProp3(target, name, { get: all[name], enumerable: true });
62913
+ };
62914
+ var __copyProps3 = (to, from, except, desc) => {
62915
+ if (from && typeof from === "object" || typeof from === "function") {
62916
+ for (let key of __getOwnPropNames3(from))
62917
+ if (!__hasOwnProp3.call(to, key) && key !== except)
62918
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62919
+ }
62920
+ return to;
62921
+ };
62922
+ var __toESM3 = (mod, isNodeMode, target) => (target = mod != null ? __create3(__getProtoOf3(mod)) : {}, __copyProps3(
62923
+ // If the importer is in node compatibility mode or this is not an ESM
62924
+ // file that has been converted to a CommonJS file using a Babel-
62925
+ // compatible transform (i.e. "__esModule" has not been set), then set
62926
+ // "default" to the CommonJS "module.exports" for node compatibility.
62927
+ isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target,
62928
+ mod
62929
+ ));
62930
+ var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62931
+ var src_exports = {};
62932
+ __export2(src_exports, {
62933
+ credentialsTreatedAsExpired: () => credentialsTreatedAsExpired,
62934
+ credentialsWillNeedRefresh: () => credentialsWillNeedRefresh,
62935
+ defaultProvider: () => defaultProvider
62936
+ });
62937
+ module2.exports = __toCommonJS2(src_exports);
62938
+ var import_credential_provider_env = require_dist_cjs38();
62939
+ var import_shared_ini_file_loader = require_dist_cjs13();
62940
+ var import_property_provider = require_dist_cjs12();
62941
+ var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
62942
+ var remoteProvider = /* @__PURE__ */ __name(async (init2) => {
62943
+ var _a, _b;
62944
+ const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM3(require_dist_cjs39()));
62945
+ if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
62946
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromHttp/fromContainerMetadata");
62947
+ const { fromHttp } = await Promise.resolve().then(() => __toESM3(require_dist_cjs40()));
62948
+ return (0, import_property_provider.chain)(fromHttp(init2), fromContainerMetadata(init2));
62949
+ }
62950
+ if (process.env[ENV_IMDS_DISABLED]) {
62951
+ return async () => {
62952
+ throw new import_property_provider.CredentialsProviderError("EC2 Instance Metadata Service access disabled");
62953
+ };
62954
+ }
62955
+ (_b = init2.logger) == null ? void 0 : _b.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromInstanceMetadata");
62956
+ return fromInstanceMetadata(init2);
62957
+ }, "remoteProvider");
62958
+ var defaultProvider = /* @__PURE__ */ __name((init2 = {}) => (0, import_property_provider.memoize)(
62959
+ (0, import_property_provider.chain)(
62960
+ ...init2.profile || process.env[import_shared_ini_file_loader.ENV_PROFILE] ? [] : [
62961
+ async () => {
62962
+ var _a;
62963
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromEnv");
62964
+ return (0, import_credential_provider_env.fromEnv)(init2)();
62965
+ }
62966
+ ],
62967
+ async () => {
62968
+ var _a;
62969
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromSSO");
62970
+ const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init2;
62971
+ if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
62972
+ throw new import_property_provider.CredentialsProviderError(
62973
+ "Skipping SSO provider in default chain (inputs do not include SSO fields)."
62974
+ );
62975
+ }
62976
+ const { fromSSO } = await Promise.resolve().then(() => __toESM3(require_dist_cjs52()));
62977
+ return fromSSO(init2)();
62978
+ },
62979
+ async () => {
62980
+ var _a;
62981
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromIni");
62982
+ const { fromIni } = await Promise.resolve().then(() => __toESM3(require_dist_cjs55()));
62983
+ return fromIni(init2)();
62984
+ },
62985
+ async () => {
62986
+ var _a;
62987
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromProcess");
62988
+ const { fromProcess } = await Promise.resolve().then(() => __toESM3(require_dist_cjs53()));
62989
+ return fromProcess(init2)();
62990
+ },
62991
+ async () => {
62992
+ var _a;
62993
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromTokenFile");
62994
+ const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM3(require_dist_cjs54()));
62995
+ return fromTokenFile2(init2)();
62996
+ },
62997
+ async () => {
62998
+ var _a;
62999
+ (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::remoteProvider");
63000
+ return (await remoteProvider(init2))();
63001
+ },
63002
+ async () => {
63003
+ throw new import_property_provider.CredentialsProviderError("Could not load credentials from any providers", false);
63004
+ }
63005
+ ),
63006
+ credentialsTreatedAsExpired,
63007
+ credentialsWillNeedRefresh
63008
+ ), "defaultProvider");
63009
+ var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials2) => (credentials2 == null ? void 0 : credentials2.expiration) !== void 0, "credentialsWillNeedRefresh");
63010
+ var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials2) => (credentials2 == null ? void 0 : credentials2.expiration) !== void 0 && credentials2.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired");
63011
+ }
63012
+ });
63013
+
63014
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js
63015
+ var require_ruleset4 = __commonJS({
63016
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) {
63017
+ "use strict";
63018
+ Object.defineProperty(exports2, "__esModule", { value: true });
63019
+ exports2.ruleSet = void 0;
63020
+ var F2 = "required";
63021
+ var G = "type";
63022
+ var H = "fn";
63023
+ var I = "argv";
63024
+ var J = "ref";
63025
+ var a = false;
63026
+ var b = true;
63027
+ var c = "booleanEquals";
63028
+ var d = "stringEquals";
63029
+ var e2 = "sigv4";
63030
+ var f3 = "sts";
63031
+ var g = "us-east-1";
63032
+ var h2 = "endpoint";
63033
+ var i2 = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
63034
+ var j = "tree";
63035
+ var k = "error";
63036
+ var l = "getAttr";
63037
+ var m2 = { [F2]: false, [G]: "String" };
63038
+ var n = { [F2]: true, "default": false, [G]: "Boolean" };
63039
+ var o = { [J]: "Endpoint" };
63040
+ var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
63041
+ var q = { [J]: "Region" };
63042
+ var r2 = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" };
63043
+ var s2 = { [J]: "UseFIPS" };
63044
+ var t2 = { [J]: "UseDualStack" };
63045
+ var u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e2, "signingName": f3, "signingRegion": g }] }, "headers": {} };
63046
+ var v = {};
63047
+ var w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h2]: u, [G]: h2 };
63048
+ var x2 = { [H]: c, [I]: [s2, true] };
63049
+ var y = { [H]: c, [I]: [t2, true] };
63050
+ var z2 = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] };
63051
+ var A2 = { [J]: "PartitionResult" };
63052
+ var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A2, "supportsDualStack"] }] };
63053
+ var C = [{ [H]: "isSet", [I]: [o] }];
63054
+ var D = [x2];
63055
+ var E = [y];
63056
+ 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 }] };
63057
+ exports2.ruleSet = _data;
63058
+ }
63059
+ });
63060
+
63061
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js
63062
+ var require_endpointResolver4 = __commonJS({
63063
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) {
63064
+ "use strict";
63065
+ Object.defineProperty(exports2, "__esModule", { value: true });
63066
+ exports2.defaultEndpointResolver = void 0;
63067
+ var util_endpoints_1 = require_dist_cjs7();
63068
+ var util_endpoints_2 = require_dist_cjs6();
63069
+ var ruleset_1 = require_ruleset4();
63070
+ var defaultEndpointResolver = (endpointParams, context = {}) => {
63071
+ return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
63072
+ endpointParams,
63073
+ logger: context.logger
63074
+ });
63075
+ };
63076
+ exports2.defaultEndpointResolver = defaultEndpointResolver;
63077
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
63078
+ }
63079
+ });
63080
+
63081
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js
63082
+ var require_runtimeConfig_shared4 = __commonJS({
63083
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) {
63084
+ "use strict";
63085
+ Object.defineProperty(exports2, "__esModule", { value: true });
63086
+ exports2.getRuntimeConfig = void 0;
63087
+ var core_1 = require_dist_cjs37();
63088
+ var core_2 = require_dist_cjs34();
63089
+ var smithy_client_1 = require_dist_cjs32();
63090
+ var url_parser_1 = require_dist_cjs16();
63091
+ var util_base64_1 = require_dist_cjs25();
63092
+ var util_utf8_1 = require_dist_cjs24();
63093
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4();
63094
+ var endpointResolver_1 = require_endpointResolver4();
63095
+ var getRuntimeConfig = (config) => {
63096
+ return {
63097
+ apiVersion: "2011-06-15",
63098
+ base64Decoder: (config == null ? void 0 : config.base64Decoder) ?? util_base64_1.fromBase64,
63099
+ base64Encoder: (config == null ? void 0 : config.base64Encoder) ?? util_base64_1.toBase64,
63100
+ disableHostPrefix: (config == null ? void 0 : config.disableHostPrefix) ?? false,
63101
+ endpointProvider: (config == null ? void 0 : config.endpointProvider) ?? endpointResolver_1.defaultEndpointResolver,
63102
+ extensions: (config == null ? void 0 : config.extensions) ?? [],
63103
+ httpAuthSchemeProvider: (config == null ? void 0 : config.httpAuthSchemeProvider) ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
63104
+ httpAuthSchemes: (config == null ? void 0 : config.httpAuthSchemes) ?? [
63105
+ {
63106
+ schemeId: "aws.auth#sigv4",
63107
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
63108
+ signer: new core_1.AwsSdkSigV4Signer()
63109
+ },
63110
+ {
63111
+ schemeId: "smithy.api#noAuth",
63112
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
63113
+ signer: new core_2.NoAuthSigner()
63114
+ }
63115
+ ],
63116
+ logger: (config == null ? void 0 : config.logger) ?? new smithy_client_1.NoOpLogger(),
63117
+ serviceId: (config == null ? void 0 : config.serviceId) ?? "STS",
63118
+ urlParser: (config == null ? void 0 : config.urlParser) ?? url_parser_1.parseUrl,
63119
+ utf8Decoder: (config == null ? void 0 : config.utf8Decoder) ?? util_utf8_1.fromUtf8,
63120
+ utf8Encoder: (config == null ? void 0 : config.utf8Encoder) ?? util_utf8_1.toUtf8
63121
+ };
63122
+ };
63123
+ exports2.getRuntimeConfig = getRuntimeConfig;
63124
+ }
63125
+ });
63126
+
63127
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js
63128
+ var require_runtimeConfig4 = __commonJS({
63129
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) {
63130
+ "use strict";
63131
+ Object.defineProperty(exports2, "__esModule", { value: true });
63132
+ exports2.getRuntimeConfig = void 0;
63133
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
63134
+ var package_json_1 = tslib_1.__importDefault(require_package5());
63135
+ var core_1 = require_dist_cjs37();
63136
+ var credential_provider_node_1 = require_dist_cjs56();
63137
+ var util_user_agent_node_1 = require_dist_cjs41();
63138
+ var config_resolver_1 = require_dist_cjs11();
63139
+ var core_2 = require_dist_cjs34();
63140
+ var hash_node_1 = require_dist_cjs42();
63141
+ var middleware_retry_1 = require_dist_cjs33();
63142
+ var node_config_provider_1 = require_dist_cjs14();
63143
+ var node_http_handler_1 = require_dist_cjs28();
63144
+ var util_body_length_node_1 = require_dist_cjs43();
63145
+ var util_retry_1 = require_dist_cjs20();
63146
+ var runtimeConfig_shared_1 = require_runtimeConfig_shared4();
63147
+ var smithy_client_1 = require_dist_cjs32();
63148
+ var util_defaults_mode_node_1 = require_dist_cjs44();
63149
+ var smithy_client_2 = require_dist_cjs32();
60841
63150
  var getRuntimeConfig = (config) => {
60842
63151
  (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
60843
63152
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
@@ -60981,7 +63290,7 @@ var require_STSClient = __commonJS({
60981
63290
  } });
60982
63291
  var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4();
60983
63292
  var EndpointParameters_1 = require_EndpointParameters();
60984
- var runtimeConfig_1 = require_runtimeConfig3();
63293
+ var runtimeConfig_1 = require_runtimeConfig4();
60985
63294
  var runtimeExtensions_1 = require_runtimeExtensions();
60986
63295
  var STSClient2 = class extends smithy_client_1.Client {
60987
63296
  constructor(...[configuration]) {
@@ -61025,7 +63334,7 @@ var require_STSClient = __commonJS({
61025
63334
  });
61026
63335
 
61027
63336
  // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js
61028
- var require_dist_cjs50 = __commonJS({
63337
+ var require_dist_cjs57 = __commonJS({
61029
63338
  "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2, module2) {
61030
63339
  "use strict";
61031
63340
  var __defProp3 = Object.defineProperty;
@@ -62380,217 +64689,8 @@ var require_dist_cjs50 = __commonJS({
62380
64689
  }
62381
64690
  });
62382
64691
 
62383
- // ../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.577.0/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js
62384
- var require_dist_cjs51 = __commonJS({
62385
- "../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.577.0/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2, module2) {
62386
- "use strict";
62387
- var __defProp3 = Object.defineProperty;
62388
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62389
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
62390
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62391
- var __name = (target, value) => __defProp3(target, "name", { value, configurable: true });
62392
- var __export2 = (target, all) => {
62393
- for (var name in all)
62394
- __defProp3(target, name, { get: all[name], enumerable: true });
62395
- };
62396
- var __copyProps3 = (to, from, except, desc) => {
62397
- if (from && typeof from === "object" || typeof from === "function") {
62398
- for (let key of __getOwnPropNames3(from))
62399
- if (!__hasOwnProp3.call(to, key) && key !== except)
62400
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62401
- }
62402
- return to;
62403
- };
62404
- var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62405
- var src_exports = {};
62406
- __export2(src_exports, {
62407
- fromProcess: () => fromProcess
62408
- });
62409
- module2.exports = __toCommonJS2(src_exports);
62410
- var import_shared_ini_file_loader = require_dist_cjs13();
62411
- var import_property_provider = require_dist_cjs12();
62412
- var import_child_process = require("child_process");
62413
- var import_util5 = require("util");
62414
- var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data) => {
62415
- if (data.Version !== 1) {
62416
- throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
62417
- }
62418
- if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {
62419
- throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
62420
- }
62421
- if (data.Expiration) {
62422
- const currentTime = /* @__PURE__ */ new Date();
62423
- const expireTime = new Date(data.Expiration);
62424
- if (expireTime < currentTime) {
62425
- throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
62426
- }
62427
- }
62428
- return {
62429
- accessKeyId: data.AccessKeyId,
62430
- secretAccessKey: data.SecretAccessKey,
62431
- ...data.SessionToken && { sessionToken: data.SessionToken },
62432
- ...data.Expiration && { expiration: new Date(data.Expiration) },
62433
- ...data.CredentialScope && { credentialScope: data.CredentialScope }
62434
- };
62435
- }, "getValidatedProcessCredentials");
62436
- var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles) => {
62437
- const profile = profiles[profileName];
62438
- if (profiles[profileName]) {
62439
- const credentialProcess = profile["credential_process"];
62440
- if (credentialProcess !== void 0) {
62441
- const execPromise = (0, import_util5.promisify)(import_child_process.exec);
62442
- try {
62443
- const { stdout } = await execPromise(credentialProcess);
62444
- let data;
62445
- try {
62446
- data = JSON.parse(stdout.trim());
62447
- } catch {
62448
- throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
62449
- }
62450
- return getValidatedProcessCredentials(profileName, data);
62451
- } catch (error2) {
62452
- throw new import_property_provider.CredentialsProviderError(error2.message);
62453
- }
62454
- } else {
62455
- throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`);
62456
- }
62457
- } else {
62458
- throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`);
62459
- }
62460
- }, "resolveProcessCredentials");
62461
- var fromProcess = /* @__PURE__ */ __name((init2 = {}) => async () => {
62462
- var _a;
62463
- (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process", "fromProcess");
62464
- const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init2);
62465
- return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init2), profiles);
62466
- }, "fromProcess");
62467
- }
62468
- });
62469
-
62470
- // ../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
62471
- var require_fromWebToken = __commonJS({
62472
- "../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) {
62473
- "use strict";
62474
- var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
62475
- if (k2 === void 0)
62476
- k2 = k;
62477
- var desc = Object.getOwnPropertyDescriptor(m2, k);
62478
- if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
62479
- desc = { enumerable: true, get: function() {
62480
- return m2[k];
62481
- } };
62482
- }
62483
- Object.defineProperty(o, k2, desc);
62484
- } : function(o, m2, k, k2) {
62485
- if (k2 === void 0)
62486
- k2 = k;
62487
- o[k2] = m2[k];
62488
- });
62489
- var __setModuleDefault3 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
62490
- Object.defineProperty(o, "default", { enumerable: true, value: v });
62491
- } : function(o, v) {
62492
- o["default"] = v;
62493
- });
62494
- var __importStar3 = exports2 && exports2.__importStar || function(mod) {
62495
- if (mod && mod.__esModule)
62496
- return mod;
62497
- var result = {};
62498
- if (mod != null) {
62499
- for (var k in mod)
62500
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
62501
- __createBinding3(result, mod, k);
62502
- }
62503
- __setModuleDefault3(result, mod);
62504
- return result;
62505
- };
62506
- Object.defineProperty(exports2, "__esModule", { value: true });
62507
- exports2.fromWebToken = void 0;
62508
- var fromWebToken2 = (init2) => async () => {
62509
- var _a;
62510
- (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromWebToken");
62511
- const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy: policy4, durationSeconds } = init2;
62512
- let { roleAssumerWithWebIdentity } = init2;
62513
- if (!roleAssumerWithWebIdentity) {
62514
- const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar3(require_dist_cjs50()));
62515
- roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
62516
- ...init2.clientConfig,
62517
- credentialProviderLogger: init2.logger,
62518
- parentClientConfig: init2.parentClientConfig
62519
- }, init2.clientPlugins);
62520
- }
62521
- return roleAssumerWithWebIdentity({
62522
- RoleArn: roleArn,
62523
- RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,
62524
- WebIdentityToken: webIdentityToken,
62525
- ProviderId: providerId,
62526
- PolicyArns: policyArns,
62527
- Policy: policy4,
62528
- DurationSeconds: durationSeconds
62529
- });
62530
- };
62531
- exports2.fromWebToken = fromWebToken2;
62532
- }
62533
- });
62534
-
62535
- // ../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
62536
- var require_fromTokenFile = __commonJS({
62537
- "../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) {
62538
- "use strict";
62539
- Object.defineProperty(exports2, "__esModule", { value: true });
62540
- exports2.fromTokenFile = void 0;
62541
- var property_provider_1 = require_dist_cjs12();
62542
- var fs_1 = require("fs");
62543
- var fromWebToken_1 = require_fromWebToken();
62544
- var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
62545
- var ENV_ROLE_ARN = "AWS_ROLE_ARN";
62546
- var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
62547
- var fromTokenFile2 = (init2 = {}) => async () => {
62548
- var _a;
62549
- (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromTokenFile");
62550
- const webIdentityTokenFile = (init2 == null ? void 0 : init2.webIdentityTokenFile) ?? process.env[ENV_TOKEN_FILE];
62551
- const roleArn = (init2 == null ? void 0 : init2.roleArn) ?? process.env[ENV_ROLE_ARN];
62552
- const roleSessionName = (init2 == null ? void 0 : init2.roleSessionName) ?? process.env[ENV_ROLE_SESSION_NAME];
62553
- if (!webIdentityTokenFile || !roleArn) {
62554
- throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified");
62555
- }
62556
- return (0, fromWebToken_1.fromWebToken)({
62557
- ...init2,
62558
- webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
62559
- roleArn,
62560
- roleSessionName
62561
- })();
62562
- };
62563
- exports2.fromTokenFile = fromTokenFile2;
62564
- }
62565
- });
62566
-
62567
- // ../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
62568
- var require_dist_cjs52 = __commonJS({
62569
- "../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) {
62570
- "use strict";
62571
- var __defProp3 = Object.defineProperty;
62572
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
62573
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
62574
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
62575
- var __copyProps3 = (to, from, except, desc) => {
62576
- if (from && typeof from === "object" || typeof from === "function") {
62577
- for (let key of __getOwnPropNames3(from))
62578
- if (!__hasOwnProp3.call(to, key) && key !== except)
62579
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
62580
- }
62581
- return to;
62582
- };
62583
- var __reExport = (target, mod, secondTarget) => (__copyProps3(target, mod, "default"), secondTarget && __copyProps3(secondTarget, mod, "default"));
62584
- var __toCommonJS2 = (mod) => __copyProps3(__defProp3({}, "__esModule", { value: true }), mod);
62585
- var src_exports = {};
62586
- module2.exports = __toCommonJS2(src_exports);
62587
- __reExport(src_exports, require_fromTokenFile(), module2.exports);
62588
- __reExport(src_exports, require_fromWebToken(), module2.exports);
62589
- }
62590
- });
62591
-
62592
64692
  // ../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
62593
- var require_dist_cjs53 = __commonJS({
64693
+ var require_dist_cjs58 = __commonJS({
62594
64694
  "../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) {
62595
64695
  "use strict";
62596
64696
  var __create3 = Object.create;
@@ -62650,7 +64750,7 @@ var require_dist_cjs53 = __commonJS({
62650
64750
  (_a = options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveAssumeRoleCredentials (STS)");
62651
64751
  const data = profiles[profileName];
62652
64752
  if (!options.roleAssumer) {
62653
- const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM3(require_dist_cjs50()));
64753
+ const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM3(require_dist_cjs57()));
62654
64754
  options.roleAssumer = getDefaultRoleAssumer(
62655
64755
  {
62656
64756
  ...options.clientConfig,
@@ -62692,7 +64792,7 @@ var require_dist_cjs53 = __commonJS({
62692
64792
  return options.roleAssumer(sourceCreds, params);
62693
64793
  }, "resolveAssumeRoleCredentials");
62694
64794
  var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile");
62695
- var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM3(require_dist_cjs51())).then(
64795
+ var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM3(require_dist_cjs53())).then(
62696
64796
  ({ fromProcess }) => fromProcess({
62697
64797
  ...options,
62698
64798
  profile
@@ -62718,7 +64818,7 @@ var require_dist_cjs53 = __commonJS({
62718
64818
  });
62719
64819
  }, "resolveStaticCredentials");
62720
64820
  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");
62721
- var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM3(require_dist_cjs52())).then(
64821
+ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM3(require_dist_cjs54())).then(
62722
64822
  ({ fromTokenFile: fromTokenFile2 }) => fromTokenFile2({
62723
64823
  webIdentityTokenFile: profile.web_identity_token_file,
62724
64824
  roleArn: profile.role_arn,
@@ -62760,7 +64860,7 @@ var require_dist_cjs53 = __commonJS({
62760
64860
  });
62761
64861
 
62762
64862
  // ../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
62763
- var require_dist_cjs54 = __commonJS({
64863
+ var require_dist_cjs59 = __commonJS({
62764
64864
  "../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) {
62765
64865
  "use strict";
62766
64866
  var __create3 = Object.create;
@@ -62842,19 +64942,19 @@ var require_dist_cjs54 = __commonJS({
62842
64942
  async () => {
62843
64943
  var _a;
62844
64944
  (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromIni");
62845
- const { fromIni } = await Promise.resolve().then(() => __toESM3(require_dist_cjs53()));
64945
+ const { fromIni } = await Promise.resolve().then(() => __toESM3(require_dist_cjs58()));
62846
64946
  return fromIni(init2)();
62847
64947
  },
62848
64948
  async () => {
62849
64949
  var _a;
62850
64950
  (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromProcess");
62851
- const { fromProcess } = await Promise.resolve().then(() => __toESM3(require_dist_cjs51()));
64951
+ const { fromProcess } = await Promise.resolve().then(() => __toESM3(require_dist_cjs53()));
62852
64952
  return fromProcess(init2)();
62853
64953
  },
62854
64954
  async () => {
62855
64955
  var _a;
62856
64956
  (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromTokenFile");
62857
- const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM3(require_dist_cjs52()));
64957
+ const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM3(require_dist_cjs54()));
62858
64958
  return fromTokenFile2(init2)();
62859
64959
  },
62860
64960
  async () => {
@@ -62875,7 +64975,7 @@ var require_dist_cjs54 = __commonJS({
62875
64975
  });
62876
64976
 
62877
64977
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/ruleset.js
62878
- var require_ruleset4 = __commonJS({
64978
+ var require_ruleset5 = __commonJS({
62879
64979
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/ruleset.js"(exports2) {
62880
64980
  "use strict";
62881
64981
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -62908,14 +65008,14 @@ var require_ruleset4 = __commonJS({
62908
65008
  });
62909
65009
 
62910
65010
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/endpointResolver.js
62911
- var require_endpointResolver4 = __commonJS({
65011
+ var require_endpointResolver5 = __commonJS({
62912
65012
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/endpointResolver.js"(exports2) {
62913
65013
  "use strict";
62914
65014
  Object.defineProperty(exports2, "__esModule", { value: true });
62915
65015
  exports2.defaultEndpointResolver = void 0;
62916
65016
  var util_endpoints_1 = require_dist_cjs7();
62917
65017
  var util_endpoints_2 = require_dist_cjs6();
62918
- var ruleset_1 = require_ruleset4();
65018
+ var ruleset_1 = require_ruleset5();
62919
65019
  var defaultEndpointResolver = (endpointParams, context = {}) => {
62920
65020
  return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
62921
65021
  endpointParams,
@@ -62928,7 +65028,7 @@ var require_endpointResolver4 = __commonJS({
62928
65028
  });
62929
65029
 
62930
65030
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.shared.js
62931
- var require_runtimeConfig_shared4 = __commonJS({
65031
+ var require_runtimeConfig_shared5 = __commonJS({
62932
65032
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.shared.js"(exports2) {
62933
65033
  "use strict";
62934
65034
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -62939,7 +65039,7 @@ var require_runtimeConfig_shared4 = __commonJS({
62939
65039
  var util_base64_1 = require_dist_cjs25();
62940
65040
  var util_utf8_1 = require_dist_cjs24();
62941
65041
  var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
62942
- var endpointResolver_1 = require_endpointResolver4();
65042
+ var endpointResolver_1 = require_endpointResolver5();
62943
65043
  var getRuntimeConfig = (config) => {
62944
65044
  return {
62945
65045
  apiVersion: "2018-08-01",
@@ -62968,7 +65068,7 @@ var require_runtimeConfig_shared4 = __commonJS({
62968
65068
  });
62969
65069
 
62970
65070
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.js
62971
- var require_runtimeConfig4 = __commonJS({
65071
+ var require_runtimeConfig5 = __commonJS({
62972
65072
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.js"(exports2) {
62973
65073
  "use strict";
62974
65074
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -62976,7 +65076,7 @@ var require_runtimeConfig4 = __commonJS({
62976
65076
  var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));
62977
65077
  var package_json_1 = tslib_1.__importDefault(require_package2());
62978
65078
  var core_1 = require_dist_cjs37();
62979
- var credential_provider_node_1 = require_dist_cjs54();
65079
+ var credential_provider_node_1 = require_dist_cjs59();
62980
65080
  var util_user_agent_node_1 = require_dist_cjs41();
62981
65081
  var config_resolver_1 = require_dist_cjs11();
62982
65082
  var hash_node_1 = require_dist_cjs42();
@@ -62985,7 +65085,7 @@ var require_runtimeConfig4 = __commonJS({
62985
65085
  var node_http_handler_1 = require_dist_cjs28();
62986
65086
  var util_body_length_node_1 = require_dist_cjs43();
62987
65087
  var util_retry_1 = require_dist_cjs20();
62988
- var runtimeConfig_shared_1 = require_runtimeConfig_shared4();
65088
+ var runtimeConfig_shared_1 = require_runtimeConfig_shared5();
62989
65089
  var smithy_client_1 = require_dist_cjs32();
62990
65090
  var util_defaults_mode_node_1 = require_dist_cjs44();
62991
65091
  var smithy_client_2 = require_dist_cjs32();
@@ -63021,7 +65121,7 @@ var require_runtimeConfig4 = __commonJS({
63021
65121
  });
63022
65122
 
63023
65123
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/index.js
63024
- var require_dist_cjs55 = __commonJS({
65124
+ var require_dist_cjs60 = __commonJS({
63025
65125
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/index.js"(exports2, module2) {
63026
65126
  "use strict";
63027
65127
  var __defProp3 = Object.defineProperty;
@@ -63102,7 +65202,7 @@ var require_dist_cjs55 = __commonJS({
63102
65202
  Region: { type: "builtInParams", name: "region" },
63103
65203
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
63104
65204
  };
63105
- var import_runtimeConfig = require_runtimeConfig4();
65205
+ var import_runtimeConfig = require_runtimeConfig5();
63106
65206
  var import_region_config_resolver = require_dist_cjs45();
63107
65207
  var import_protocol_http = require_dist_cjs2();
63108
65208
  var import_smithy_client = require_dist_cjs32();
@@ -64352,7 +66452,7 @@ var init_connections = __esm({
64352
66452
  const { driver: driver2 } = credentials2;
64353
66453
  if (driver2 === "aws-data-api") {
64354
66454
  assertPackages("@aws-sdk/client-rds-data");
64355
- const { RDSDataClient, ExecuteStatementCommand, TypeHint } = await Promise.resolve().then(() => __toESM(require_dist_cjs55()));
66455
+ const { RDSDataClient, ExecuteStatementCommand, TypeHint } = await Promise.resolve().then(() => __toESM(require_dist_cjs60()));
64356
66456
  const { AwsDataApiSession, drizzle } = await import("drizzle-orm/aws-data-api/pg");
64357
66457
  const { migrate: migrate2 } = await import("drizzle-orm/aws-data-api/pg/migrator");
64358
66458
  const { PgDialect: PgDialect2 } = await import("drizzle-orm/pg-core");
@@ -64366,7 +66466,6 @@ var init_connections = __esm({
64366
66466
  rdsClient,
64367
66467
  new PgDialect2(),
64368
66468
  void 0,
64369
- void 0,
64370
66469
  config,
64371
66470
  void 0
64372
66471
  );
@@ -65730,13 +67829,28 @@ var init_pgPushUtils = __esm({
65730
67829
  });
65731
67830
 
65732
67831
  // src/cli/commands/singlestorePushUtils.ts
67832
+ function findColumnTypeAlternations(columns1, columns2) {
67833
+ const changes = [];
67834
+ for (const key in columns1) {
67835
+ if (columns1.hasOwnProperty(key) && columns2.hasOwnProperty(key)) {
67836
+ const col1 = columns1[key];
67837
+ const col2 = columns2[key];
67838
+ if (col1.type !== col2.type) {
67839
+ changes.push(col2.name);
67840
+ }
67841
+ }
67842
+ }
67843
+ return changes;
67844
+ }
65733
67845
  var import_hanji8, filterStatements2, logSuggestionsAndReturn3;
65734
67846
  var init_singlestorePushUtils = __esm({
65735
67847
  "src/cli/commands/singlestorePushUtils.ts"() {
65736
67848
  "use strict";
65737
67849
  init_source();
65738
67850
  import_hanji8 = __toESM(require_hanji());
67851
+ init_sqlgenerator();
65739
67852
  init_singlestoreSchema();
67853
+ init_utils2();
65740
67854
  init_selector_ui();
65741
67855
  init_outputs();
65742
67856
  filterStatements2 = (statements, currentSchema, prevSchema) => {
@@ -65780,7 +67894,7 @@ var init_singlestorePushUtils = __esm({
65780
67894
  return true;
65781
67895
  });
65782
67896
  };
65783
- logSuggestionsAndReturn3 = async (db, statements, json2) => {
67897
+ logSuggestionsAndReturn3 = async (db, statements, json2, json1) => {
65784
67898
  let shouldAskForApprove = false;
65785
67899
  const statementsToExecute = [];
65786
67900
  const infoToPrint = [];
@@ -65961,6 +68075,71 @@ var init_singlestorePushUtils = __esm({
65961
68075
  shouldAskForApprove = true;
65962
68076
  }
65963
68077
  }
68078
+ } else if (statement.type === "singlestore_recreate_table") {
68079
+ const tableName = statement.tableName;
68080
+ const prevColumns = json1.tables[tableName].columns;
68081
+ const currentColumns = json2.tables[tableName].columns;
68082
+ const { removedColumns, addedColumns } = findAddedAndRemoved(
68083
+ Object.keys(prevColumns),
68084
+ Object.keys(currentColumns)
68085
+ );
68086
+ if (removedColumns.length) {
68087
+ for (const removedColumn of removedColumns) {
68088
+ const res = await db.query(
68089
+ `select count(\`${tableName}\`.\`${removedColumn}\`) as count from \`${tableName}\``
68090
+ );
68091
+ const count = Number(res[0].count);
68092
+ if (count > 0) {
68093
+ infoToPrint.push(
68094
+ `\xB7 You're about to delete ${source_default.underline(
68095
+ removedColumn
68096
+ )} column in ${tableName} table with ${count} items`
68097
+ );
68098
+ columnsToRemove.push(removedColumn);
68099
+ shouldAskForApprove = true;
68100
+ }
68101
+ }
68102
+ }
68103
+ if (addedColumns.length) {
68104
+ for (const addedColumn of addedColumns) {
68105
+ const [res] = await db.query(
68106
+ `select count(*) as count from \`${tableName}\``
68107
+ );
68108
+ const columnConf = json2.tables[tableName].columns[addedColumn];
68109
+ const count = Number(res.count);
68110
+ if (count > 0 && columnConf.notNull && !columnConf.default) {
68111
+ infoToPrint.push(
68112
+ `\xB7 You're about to add not-null ${source_default.underline(
68113
+ addedColumn
68114
+ )} column without default value to table, which contains ${count} items`
68115
+ );
68116
+ shouldAskForApprove = true;
68117
+ tablesToTruncate.push(tableName);
68118
+ statementsToExecute.push(`TRUNCATE TABLE \`${tableName}\`;`);
68119
+ }
68120
+ }
68121
+ }
68122
+ const columnWithChangedType = findColumnTypeAlternations(prevColumns, currentColumns);
68123
+ for (const column9 of columnWithChangedType) {
68124
+ const [res] = await db.query(
68125
+ `select count(*) as count from \`${tableName}\` WHERE \`${tableName}\`.\`${column9}\` IS NOT NULL;`
68126
+ );
68127
+ const count = Number(res.count);
68128
+ if (count > 0) {
68129
+ infoToPrint.push(
68130
+ `\xB7 You're about recreate ${source_default.underline(tableName)} table with data type changing for ${source_default.underline(
68131
+ column9
68132
+ )} column, which contains ${count} items`
68133
+ );
68134
+ shouldAskForApprove = true;
68135
+ tablesToTruncate.push(tableName);
68136
+ statementsToExecute.push(`TRUNCATE TABLE \`${tableName}\`;`);
68137
+ }
68138
+ }
68139
+ }
68140
+ const stmnt = fromJson([statement], "singlestore", "push");
68141
+ if (typeof stmnt !== "undefined") {
68142
+ statementsToExecute.push(...stmnt);
65964
68143
  }
65965
68144
  }
65966
68145
  return {
@@ -67811,30 +69990,16 @@ var init_push = __esm({
67811
69990
  } = await logSuggestionsAndReturn3(
67812
69991
  db,
67813
69992
  filteredStatements,
67814
- statements.validatedCur
69993
+ statements.validatedCur,
69994
+ statements.validatedPrev
67815
69995
  );
67816
- const filteredSqlStatements = fromJson(filteredStatements, "singlestore");
67817
- const uniqueSqlStatementsToExecute = [];
67818
- statementsToExecute.forEach((ss) => {
67819
- if (!uniqueSqlStatementsToExecute.includes(ss)) {
67820
- uniqueSqlStatementsToExecute.push(ss);
67821
- }
67822
- });
67823
- const uniqueFilteredSqlStatements = [];
67824
- filteredSqlStatements.forEach((ss) => {
67825
- if (!uniqueFilteredSqlStatements.includes(ss)) {
67826
- uniqueFilteredSqlStatements.push(ss);
67827
- }
67828
- });
67829
69996
  if (verbose) {
67830
69997
  console.log();
67831
69998
  console.log(
67832
69999
  withStyle.warning("You are about to execute current statements:")
67833
70000
  );
67834
70001
  console.log();
67835
- console.log(
67836
- [...uniqueSqlStatementsToExecute, ...uniqueFilteredSqlStatements].map((s2) => source_default.blue(s2)).join("\n")
67837
- );
70002
+ console.log(statementsToExecute.map((s2) => source_default.blue(s2)).join("\n"));
67838
70003
  console.log();
67839
70004
  }
67840
70005
  if (!force && strict) {
@@ -67869,12 +70034,9 @@ var init_push = __esm({
67869
70034
  process.exit(0);
67870
70035
  }
67871
70036
  }
67872
- for (const dStmnt of uniqueSqlStatementsToExecute) {
70037
+ for (const dStmnt of statementsToExecute) {
67873
70038
  await db.query(dStmnt);
67874
70039
  }
67875
- for (const statement of uniqueFilteredSqlStatements) {
67876
- await db.query(statement);
67877
- }
67878
70040
  if (filteredStatements.length > 0) {
67879
70041
  (0, import_hanji13.render)(`[${source_default.green("\u2713")}] Changes applied`);
67880
70042
  } else {
@@ -68495,7 +70657,6 @@ var init_introspect_mysql = __esm({
68495
70657
  import_casing3 = require("drizzle-orm/casing");
68496
70658
  init_utils();
68497
70659
  init_global();
68498
- init_mysqlSerializer();
68499
70660
  init_utils2();
68500
70661
  mysqlImportsList = /* @__PURE__ */ new Set([
68501
70662
  "mysqlTable",
@@ -69078,12 +71239,9 @@ import { sql } from "drizzle-orm"
69078
71239
  let idxKey = it.name.startsWith(tableName) && it.name !== tableName ? it.name.slice(tableName.length + 1) : it.name;
69079
71240
  idxKey = idxKey.endsWith("_index") ? idxKey.slice(0, -"_index".length) + "_idx" : idxKey;
69080
71241
  idxKey = casing2(idxKey);
69081
- const indexGeneratedName = indexName(tableName, it.columns);
69082
- const escapedIndexName = indexGeneratedName === it.name ? "" : `"${it.name}"`;
69083
- statement += `
69084
- `;
71242
+ statement += ` ${idxKey}: `;
69085
71243
  statement += it.isUnique ? "uniqueIndex(" : "index(";
69086
- statement += `${escapedIndexName})`;
71244
+ statement += `"${it.name}")`;
69087
71245
  statement += `.on(${it.columns.map((it2) => `table.${casing2(it2)}`).join(", ")}),`;
69088
71246
  });
69089
71247
  return statement;
@@ -69183,7 +71341,7 @@ var init_introspect_pg = __esm({
69183
71341
  "src/introspect-pg.ts"() {
69184
71342
  "use strict";
69185
71343
  import_drizzle_orm9 = require("drizzle-orm");
69186
- import_relations = require("drizzle-orm/_relations");
71344
+ import_relations = require("drizzle-orm/relations");
69187
71345
  init_utils();
69188
71346
  import_casing4 = require("drizzle-orm/casing");
69189
71347
  init_global();
@@ -71034,7 +73192,7 @@ var init_introspect = __esm({
71034
73192
  });
71035
73193
  });
71036
73194
  const uniqueImports = [...new Set(imports)];
71037
- const importsTs = `import { relations } from "drizzle-orm/_relations";
73195
+ const importsTs = `import { relations } from "drizzle-orm/relations";
71038
73196
  import { ${uniqueImports.join(
71039
73197
  ", "
71040
73198
  )} } from "./schema";
@@ -74400,7 +76558,7 @@ __export(studio_exports, {
74400
76558
  prepareServer: () => prepareServer,
74401
76559
  prepareSingleStoreSchema: () => prepareSingleStoreSchema
74402
76560
  });
74403
- 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;
76561
+ 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;
74404
76562
  var init_studio2 = __esm({
74405
76563
  "src/serializer/studio.ts"() {
74406
76564
  "use strict";
@@ -74408,7 +76566,6 @@ var init_studio2 = __esm({
74408
76566
  init_esm();
74409
76567
  import_crypto9 = require("crypto");
74410
76568
  import_drizzle_orm10 = require("drizzle-orm");
74411
- import_relations2 = require("drizzle-orm/_relations");
74412
76569
  import_mysql_core3 = require("drizzle-orm/mysql-core");
74413
76570
  import_pg_core3 = require("drizzle-orm/pg-core");
74414
76571
  import_singlestore_core3 = require("drizzle-orm/singlestore-core");
@@ -74443,7 +76600,7 @@ var init_studio2 = __esm({
74443
76600
  pgSchema2[schema6] = pgSchema2[schema6] || {};
74444
76601
  pgSchema2[schema6][k] = t2;
74445
76602
  }
74446
- if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76603
+ if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74447
76604
  relations4[k] = t2;
74448
76605
  }
74449
76606
  });
@@ -74472,7 +76629,7 @@ var init_studio2 = __esm({
74472
76629
  const schema6 = (0, import_mysql_core3.getTableConfig)(t2).schema || "public";
74473
76630
  mysqlSchema3[schema6][k] = t2;
74474
76631
  }
74475
- if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76632
+ if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74476
76633
  relations4[k] = t2;
74477
76634
  }
74478
76635
  });
@@ -74501,7 +76658,7 @@ var init_studio2 = __esm({
74501
76658
  const schema6 = "public";
74502
76659
  sqliteSchema2[schema6][k] = t2;
74503
76660
  }
74504
- if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76661
+ if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74505
76662
  relations4[k] = t2;
74506
76663
  }
74507
76664
  });
@@ -74511,7 +76668,7 @@ var init_studio2 = __esm({
74511
76668
  };
74512
76669
  prepareSingleStoreSchema = async (path4) => {
74513
76670
  const imports = prepareFilenames(path4);
74514
- const singlestoreSchema3 = {
76671
+ const singlestoreSchema2 = {
74515
76672
  public: {}
74516
76673
  };
74517
76674
  const relations4 = {};
@@ -74528,15 +76685,15 @@ var init_studio2 = __esm({
74528
76685
  i0values.forEach(([k, t2]) => {
74529
76686
  if ((0, import_drizzle_orm10.is)(t2, import_singlestore_core3.SingleStoreTable)) {
74530
76687
  const schema6 = (0, import_singlestore_core3.getTableConfig)(t2).schema || "public";
74531
- singlestoreSchema3[schema6][k] = t2;
76688
+ singlestoreSchema2[schema6][k] = t2;
74532
76689
  }
74533
- if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76690
+ if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74534
76691
  relations4[k] = t2;
74535
76692
  }
74536
76693
  });
74537
76694
  }
74538
76695
  unregister();
74539
- return { schema: singlestoreSchema3, relations: relations4, files };
76696
+ return { schema: singlestoreSchema2, relations: relations4, files };
74540
76697
  };
74541
76698
  getCustomDefaults = (schema6) => {
74542
76699
  const customDefaults = [];
@@ -74662,10 +76819,10 @@ var init_studio2 = __esm({
74662
76819
  schemaFiles
74663
76820
  };
74664
76821
  };
74665
- drizzleForSingleStore = async (credentials2, singlestoreSchema3, relations4, schemaFiles) => {
76822
+ drizzleForSingleStore = async (credentials2, singlestoreSchema2, relations4, schemaFiles) => {
74666
76823
  const { connectToSingleStore: connectToSingleStore2 } = await Promise.resolve().then(() => (init_connections(), connections_exports));
74667
76824
  const { proxy } = await connectToSingleStore2(credentials2);
74668
- const customDefaults = getCustomDefaults(singlestoreSchema3);
76825
+ const customDefaults = getCustomDefaults(singlestoreSchema2);
74669
76826
  let dbUrl;
74670
76827
  if ("url" in credentials2) {
74671
76828
  dbUrl = credentials2.url;
@@ -74678,7 +76835,7 @@ var init_studio2 = __esm({
74678
76835
  dialect: "singlestore",
74679
76836
  proxy,
74680
76837
  customDefaults,
74681
- schema: singlestoreSchema3,
76838
+ schema: singlestoreSchema2,
74682
76839
  relations: relations4,
74683
76840
  schemaFiles
74684
76841
  };
@@ -74686,7 +76843,7 @@ var init_studio2 = __esm({
74686
76843
  extractRelations = (tablesConfig) => {
74687
76844
  const relations4 = Object.values(tablesConfig.tables).map(
74688
76845
  (it) => Object.entries(it.relations).map(([name, relation]) => {
74689
- const normalized = (0, import_relations2.normalizeRelation)(
76846
+ const normalized = (0, import_drizzle_orm10.normalizeRelation)(
74690
76847
  tablesConfig.tables,
74691
76848
  tablesConfig.tableNamesMap,
74692
76849
  relation
@@ -74709,9 +76866,9 @@ var init_studio2 = __esm({
74709
76866
  throw new Error("unsupported dialect");
74710
76867
  }
74711
76868
  let type;
74712
- if ((0, import_drizzle_orm10.is)(rel, import_relations2.One)) {
76869
+ if ((0, import_drizzle_orm10.is)(rel, import_drizzle_orm10.One)) {
74713
76870
  type = "one";
74714
- } else if ((0, import_drizzle_orm10.is)(rel, import_relations2.Many)) {
76871
+ } else if ((0, import_drizzle_orm10.is)(rel, import_drizzle_orm10.Many)) {
74715
76872
  type = "many";
74716
76873
  } else {
74717
76874
  throw new Error("unsupported relation type");
@@ -74816,9 +76973,9 @@ var init_studio2 = __esm({
74816
76973
  ),
74817
76974
  ...relations4
74818
76975
  };
74819
- const relationsConfig = (0, import_relations2.extractTablesRelationalConfig)(
76976
+ const relationsConfig = (0, import_drizzle_orm10.extractTablesRelationalConfig)(
74820
76977
  relationalSchema,
74821
- import_relations2.createTableRelationsHelpers
76978
+ import_drizzle_orm10.createTableRelationsHelpers
74822
76979
  );
74823
76980
  app.post("/", zValidator("json", schema5), async (c) => {
74824
76981
  const body = c.req.valid("json");
@@ -77384,7 +79541,7 @@ init_utils5();
77384
79541
  var version2 = async () => {
77385
79542
  const { npmVersion } = await ormCoreVersions();
77386
79543
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
77387
- const envVersion = "0.30.3-b06bbcd";
79544
+ const envVersion = "0.30.3";
77388
79545
  const kitVersion = envVersion ? `v${envVersion}` : "--";
77389
79546
  const versions = `drizzle-kit: ${kitVersion}
77390
79547
  ${ormVersion}`;