drizzle-kit 0.30.3-2c67783 → 0.30.3-563f370

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 +3482 -2732
  2. package/api.mjs +3482 -2732
  3. package/bin.cjs +354 -2511
  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, SingleStoreRecreateTableConvertor, 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, 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 \`${compositePK5.name}\` PRIMARY KEY(\`${compositePK5.columns.join(`\`,\``)}\`)`;
24378
+ statement += ` CONSTRAINT \`${st.compositePkName}\` 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 `ALTER TABLE \`${tableNameFrom}\` RENAME TO \`${tableNameTo}\`;`;
25038
+ return `RENAME TABLE \`${tableNameFrom}\` 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}\` CHANGE \`${oldColumnName}\` \`${newColumnName}\`;`;
25066
+ return `ALTER TABLE \`${tableName}\` RENAME COLUMN \`${oldColumnName}\` TO \`${newColumnName}\`;`;
25067
25067
  }
25068
25068
  };
25069
25069
  SQLiteAlterTableRenameColumnConvertor = class extends Convertor {
@@ -26378,52 +26378,10 @@ ${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
- };
26422
26381
  convertors = [];
26423
26382
  convertors.push(new PgCreateTableConvertor());
26424
26383
  convertors.push(new MySqlCreateTableConvertor());
26425
26384
  convertors.push(new SingleStoreCreateTableConvertor());
26426
- convertors.push(new SingleStoreRecreateTableConvertor());
26427
26385
  convertors.push(new SQLiteCreateTableConvertor());
26428
26386
  convertors.push(new SQLiteRecreateTableConvertor());
26429
26387
  convertors.push(new LibSQLRecreateTableConvertor());
@@ -28432,7 +28390,7 @@ var init_jsonStatements = __esm({
28432
28390
  });
28433
28391
 
28434
28392
  // src/statementCombiner.ts
28435
- var prepareLibSQLRecreateTable, prepareSQLiteRecreateTable, libSQLCombineStatements, sqliteCombineStatements, prepareSingleStoreRecreateTable, singleStoreCombineStatements;
28393
+ var prepareLibSQLRecreateTable, prepareSQLiteRecreateTable, libSQLCombineStatements, sqliteCombineStatements;
28436
28394
  var init_statementCombiner = __esm({
28437
28395
  "src/statementCombiner.ts"() {
28438
28396
  "use strict";
@@ -28711,101 +28669,6 @@ var init_statementCombiner = __esm({
28711
28669
  const rest = combinedStatements.filter((it) => it.type !== "rename_table" && it.type !== "alter_table_rename_column");
28712
28670
  return [...renamedTables, ...renamedColumns, ...rest];
28713
28671
  };
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
- };
28809
28672
  }
28810
28673
  });
28811
28674
 
@@ -30715,7 +30578,7 @@ var init_snapshotsDiffer = __esm({
30715
30578
  return [tableKey2, tableValue];
30716
30579
  }
30717
30580
  );
30718
- const diffResult = applyJsonDiff(columnsPatchedSnap1, json2);
30581
+ const diffResult = applyJsonDiff(tablesPatchedSnap1, json2);
30719
30582
  const typedResult = diffResultSchemeSingleStore.parse(diffResult);
30720
30583
  const jsonStatements = [];
30721
30584
  const jsonCreateIndexesForCreatedTables = createdTables.map((it) => {
@@ -30879,8 +30742,7 @@ var init_snapshotsDiffer = __esm({
30879
30742
  jsonStatements.push(...jsonDropColumnsStatemets);
30880
30743
  jsonStatements.push(...jsonAddedCompositePKs);
30881
30744
  jsonStatements.push(...jsonAlteredUniqueConstraints);
30882
- const combinedJsonStatements = singleStoreCombineStatements(jsonStatements, json2);
30883
- const sqlStatements = fromJson(combinedJsonStatements, "singlestore");
30745
+ const sqlStatements = fromJson(jsonStatements, "singlestore");
30884
30746
  const uniqueSqlStatements = [];
30885
30747
  sqlStatements.forEach((ss) => {
30886
30748
  if (!uniqueSqlStatements.includes(ss)) {
@@ -30892,7 +30754,7 @@ var init_snapshotsDiffer = __esm({
30892
30754
  });
30893
30755
  const _meta = prepareMigrationMeta([], rTables, rColumns);
30894
30756
  return {
30895
- statements: combinedJsonStatements,
30757
+ statements: jsonStatements,
30896
30758
  sqlStatements: uniqueSqlStatements,
30897
30759
  _meta
30898
30760
  };
@@ -35938,7 +35800,7 @@ var init_utils5 = __esm({
35938
35800
  assertOrmCoreVersion = async () => {
35939
35801
  try {
35940
35802
  const { compatibilityVersion } = await import("drizzle-orm/version");
35941
- await import("drizzle-orm/relations");
35803
+ await import("drizzle-orm/_relations");
35942
35804
  if (compatibilityVersion && compatibilityVersion === requiredApiVersion) {
35943
35805
  return;
35944
35806
  }
@@ -58957,9 +58819,9 @@ var require_dist_cjs46 = __commonJS({
58957
58819
  }
58958
58820
  });
58959
58821
 
58960
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js
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
58961
58823
  var require_httpAuthSchemeProvider3 = __commonJS({
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) {
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) {
58963
58825
  "use strict";
58964
58826
  Object.defineProperty(exports2, "__esModule", { value: true });
58965
58827
  exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOOIDCHttpAuthSchemeProvider = exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;
@@ -59026,9 +58888,9 @@ var require_httpAuthSchemeProvider3 = __commonJS({
59026
58888
  }
59027
58889
  });
59028
58890
 
59029
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json
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
59030
58892
  var require_package4 = __commonJS({
59031
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/package.json"(exports2, module2) {
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) {
59032
58894
  module2.exports = {
59033
58895
  name: "@aws-sdk/client-sso-oidc",
59034
58896
  description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
@@ -59132,9 +58994,9 @@ var require_package4 = __commonJS({
59132
58994
  }
59133
58995
  });
59134
58996
 
59135
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js
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
59136
58998
  var require_ruleset2 = __commonJS({
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) {
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) {
59138
59000
  "use strict";
59139
59001
  Object.defineProperty(exports2, "__esModule", { value: true });
59140
59002
  exports2.ruleSet = void 0;
@@ -59167,9 +59029,9 @@ var require_ruleset2 = __commonJS({
59167
59029
  }
59168
59030
  });
59169
59031
 
59170
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js
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
59171
59033
  var require_endpointResolver2 = __commonJS({
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) {
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) {
59173
59035
  "use strict";
59174
59036
  Object.defineProperty(exports2, "__esModule", { value: true });
59175
59037
  exports2.defaultEndpointResolver = void 0;
@@ -59187,9 +59049,9 @@ var require_endpointResolver2 = __commonJS({
59187
59049
  }
59188
59050
  });
59189
59051
 
59190
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js
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
59191
59053
  var require_runtimeConfig_shared2 = __commonJS({
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) {
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) {
59193
59055
  "use strict";
59194
59056
  Object.defineProperty(exports2, "__esModule", { value: true });
59195
59057
  exports2.getRuntimeConfig = void 0;
@@ -59233,16 +59095,16 @@ var require_runtimeConfig_shared2 = __commonJS({
59233
59095
  }
59234
59096
  });
59235
59097
 
59236
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js
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
59237
59099
  var require_runtimeConfig2 = __commonJS({
59238
- "../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports2) {
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) {
59239
59101
  "use strict";
59240
59102
  Object.defineProperty(exports2, "__esModule", { value: true });
59241
59103
  exports2.getRuntimeConfig = void 0;
59242
59104
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
59243
59105
  var package_json_1 = tslib_1.__importDefault(require_package4());
59244
59106
  var core_1 = require_dist_cjs37();
59245
- var credential_provider_node_1 = require_dist_cjs59();
59107
+ var credential_provider_node_1 = require_dist_cjs54();
59246
59108
  var util_user_agent_node_1 = require_dist_cjs41();
59247
59109
  var config_resolver_1 = require_dist_cjs11();
59248
59110
  var hash_node_1 = require_dist_cjs42();
@@ -59286,9 +59148,9 @@ var require_runtimeConfig2 = __commonJS({
59286
59148
  }
59287
59149
  });
59288
59150
 
59289
- // ../node_modules/.pnpm/@aws-sdk+client-sso-oidc@3.583.0/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js
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
59290
59152
  var require_dist_cjs47 = __commonJS({
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) {
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) {
59292
59154
  "use strict";
59293
59155
  var __defProp3 = Object.defineProperty;
59294
59156
  var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
@@ -60840,219 +60702,56 @@ var require_package5 = __commonJS({
60840
60702
  }
60841
60703
  });
60842
60704
 
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
60705
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js
61019
60706
  var require_ruleset3 = __commonJS({
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) {
60707
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) {
61021
60708
  "use strict";
61022
60709
  Object.defineProperty(exports2, "__esModule", { value: true });
61023
60710
  exports2.ruleSet = void 0;
61024
- var u = "required";
61025
- var v = "fn";
61026
- var w = "argv";
61027
- var x2 = "ref";
61028
- var a = true;
61029
- var b = "isSet";
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;
61030
60718
  var c = "booleanEquals";
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 }] };
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 }] };
61049
60748
  exports2.ruleSet = _data;
61050
60749
  }
61051
60750
  });
61052
60751
 
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
60752
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js
61054
60753
  var require_endpointResolver3 = __commonJS({
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) {
60754
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) {
61056
60755
  "use strict";
61057
60756
  Object.defineProperty(exports2, "__esModule", { value: true });
61058
60757
  exports2.defaultEndpointResolver = void 0;
@@ -61070,9 +60769,9 @@ var require_endpointResolver3 = __commonJS({
61070
60769
  }
61071
60770
  });
61072
60771
 
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
60772
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js
61074
60773
  var require_runtimeConfig_shared3 = __commonJS({
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) {
60774
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) {
61076
60775
  "use strict";
61077
60776
  Object.defineProperty(exports2, "__esModule", { value: true });
61078
60777
  exports2.getRuntimeConfig = void 0;
@@ -61082,17 +60781,17 @@ var require_runtimeConfig_shared3 = __commonJS({
61082
60781
  var url_parser_1 = require_dist_cjs16();
61083
60782
  var util_base64_1 = require_dist_cjs25();
61084
60783
  var util_utf8_1 = require_dist_cjs24();
61085
- var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider5();
60784
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4();
61086
60785
  var endpointResolver_1 = require_endpointResolver3();
61087
60786
  var getRuntimeConfig = (config) => {
61088
60787
  return {
61089
- apiVersion: "2019-06-10",
60788
+ apiVersion: "2011-06-15",
61090
60789
  base64Decoder: (config == null ? void 0 : config.base64Decoder) ?? util_base64_1.fromBase64,
61091
60790
  base64Encoder: (config == null ? void 0 : config.base64Encoder) ?? util_base64_1.toBase64,
61092
60791
  disableHostPrefix: (config == null ? void 0 : config.disableHostPrefix) ?? false,
61093
60792
  endpointProvider: (config == null ? void 0 : config.endpointProvider) ?? endpointResolver_1.defaultEndpointResolver,
61094
60793
  extensions: (config == null ? void 0 : config.extensions) ?? [],
61095
- httpAuthSchemeProvider: (config == null ? void 0 : config.httpAuthSchemeProvider) ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider,
60794
+ httpAuthSchemeProvider: (config == null ? void 0 : config.httpAuthSchemeProvider) ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
61096
60795
  httpAuthSchemes: (config == null ? void 0 : config.httpAuthSchemes) ?? [
61097
60796
  {
61098
60797
  schemeId: "aws.auth#sigv4",
@@ -61106,7 +60805,7 @@ var require_runtimeConfig_shared3 = __commonJS({
61106
60805
  }
61107
60806
  ],
61108
60807
  logger: (config == null ? void 0 : config.logger) ?? new smithy_client_1.NoOpLogger(),
61109
- serviceId: (config == null ? void 0 : config.serviceId) ?? "SSO OIDC",
60808
+ serviceId: (config == null ? void 0 : config.serviceId) ?? "STS",
61110
60809
  urlParser: (config == null ? void 0 : config.urlParser) ?? url_parser_1.parseUrl,
61111
60810
  utf8Decoder: (config == null ? void 0 : config.utf8Decoder) ?? util_utf8_1.fromUtf8,
61112
60811
  utf8Encoder: (config == null ? void 0 : config.utf8Encoder) ?? util_utf8_1.toUtf8
@@ -61116,18 +60815,19 @@ var require_runtimeConfig_shared3 = __commonJS({
61116
60815
  }
61117
60816
  });
61118
60817
 
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
60818
+ // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js
61120
60819
  var require_runtimeConfig3 = __commonJS({
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) {
60820
+ "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) {
61122
60821
  "use strict";
61123
60822
  Object.defineProperty(exports2, "__esModule", { value: true });
61124
60823
  exports2.getRuntimeConfig = void 0;
61125
60824
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
61126
- var package_json_1 = tslib_1.__importDefault(require_package6());
60825
+ var package_json_1 = tslib_1.__importDefault(require_package5());
61127
60826
  var core_1 = require_dist_cjs37();
61128
- var credential_provider_node_1 = require_dist_cjs56();
60827
+ var credential_provider_node_1 = require_dist_cjs54();
61129
60828
  var util_user_agent_node_1 = require_dist_cjs41();
61130
60829
  var config_resolver_1 = require_dist_cjs11();
60830
+ var core_2 = require_dist_cjs34();
61131
60831
  var hash_node_1 = require_dist_cjs42();
61132
60832
  var middleware_retry_1 = require_dist_cjs33();
61133
60833
  var node_config_provider_1 = require_dist_cjs14();
@@ -61138,2015 +60838,6 @@ var require_runtimeConfig3 = __commonJS({
61138
60838
  var smithy_client_1 = require_dist_cjs32();
61139
60839
  var util_defaults_mode_node_1 = require_dist_cjs44();
61140
60840
  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();
63150
60841
  var getRuntimeConfig = (config) => {
63151
60842
  (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
63152
60843
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
@@ -63290,7 +60981,7 @@ var require_STSClient = __commonJS({
63290
60981
  } });
63291
60982
  var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4();
63292
60983
  var EndpointParameters_1 = require_EndpointParameters();
63293
- var runtimeConfig_1 = require_runtimeConfig4();
60984
+ var runtimeConfig_1 = require_runtimeConfig3();
63294
60985
  var runtimeExtensions_1 = require_runtimeExtensions();
63295
60986
  var STSClient2 = class extends smithy_client_1.Client {
63296
60987
  constructor(...[configuration]) {
@@ -63334,7 +61025,7 @@ var require_STSClient = __commonJS({
63334
61025
  });
63335
61026
 
63336
61027
  // ../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js
63337
- var require_dist_cjs57 = __commonJS({
61028
+ var require_dist_cjs50 = __commonJS({
63338
61029
  "../node_modules/.pnpm/@aws-sdk+client-sts@3.583.0/node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2, module2) {
63339
61030
  "use strict";
63340
61031
  var __defProp3 = Object.defineProperty;
@@ -64689,8 +62380,217 @@ var require_dist_cjs57 = __commonJS({
64689
62380
  }
64690
62381
  });
64691
62382
 
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
+
64692
62592
  // ../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
64693
- var require_dist_cjs58 = __commonJS({
62593
+ var require_dist_cjs53 = __commonJS({
64694
62594
  "../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) {
64695
62595
  "use strict";
64696
62596
  var __create3 = Object.create;
@@ -64750,7 +62650,7 @@ var require_dist_cjs58 = __commonJS({
64750
62650
  (_a = options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveAssumeRoleCredentials (STS)");
64751
62651
  const data = profiles[profileName];
64752
62652
  if (!options.roleAssumer) {
64753
- const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM3(require_dist_cjs57()));
62653
+ const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM3(require_dist_cjs50()));
64754
62654
  options.roleAssumer = getDefaultRoleAssumer(
64755
62655
  {
64756
62656
  ...options.clientConfig,
@@ -64792,7 +62692,7 @@ var require_dist_cjs58 = __commonJS({
64792
62692
  return options.roleAssumer(sourceCreds, params);
64793
62693
  }, "resolveAssumeRoleCredentials");
64794
62694
  var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile");
64795
- var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM3(require_dist_cjs53())).then(
62695
+ var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM3(require_dist_cjs51())).then(
64796
62696
  ({ fromProcess }) => fromProcess({
64797
62697
  ...options,
64798
62698
  profile
@@ -64818,7 +62718,7 @@ var require_dist_cjs58 = __commonJS({
64818
62718
  });
64819
62719
  }, "resolveStaticCredentials");
64820
62720
  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");
64821
- var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM3(require_dist_cjs54())).then(
62721
+ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM3(require_dist_cjs52())).then(
64822
62722
  ({ fromTokenFile: fromTokenFile2 }) => fromTokenFile2({
64823
62723
  webIdentityTokenFile: profile.web_identity_token_file,
64824
62724
  roleArn: profile.role_arn,
@@ -64860,7 +62760,7 @@ var require_dist_cjs58 = __commonJS({
64860
62760
  });
64861
62761
 
64862
62762
  // ../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
64863
- var require_dist_cjs59 = __commonJS({
62763
+ var require_dist_cjs54 = __commonJS({
64864
62764
  "../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) {
64865
62765
  "use strict";
64866
62766
  var __create3 = Object.create;
@@ -64942,19 +62842,19 @@ var require_dist_cjs59 = __commonJS({
64942
62842
  async () => {
64943
62843
  var _a;
64944
62844
  (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromIni");
64945
- const { fromIni } = await Promise.resolve().then(() => __toESM3(require_dist_cjs58()));
62845
+ const { fromIni } = await Promise.resolve().then(() => __toESM3(require_dist_cjs53()));
64946
62846
  return fromIni(init2)();
64947
62847
  },
64948
62848
  async () => {
64949
62849
  var _a;
64950
62850
  (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromProcess");
64951
- const { fromProcess } = await Promise.resolve().then(() => __toESM3(require_dist_cjs53()));
62851
+ const { fromProcess } = await Promise.resolve().then(() => __toESM3(require_dist_cjs51()));
64952
62852
  return fromProcess(init2)();
64953
62853
  },
64954
62854
  async () => {
64955
62855
  var _a;
64956
62856
  (_a = init2.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromTokenFile");
64957
- const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM3(require_dist_cjs54()));
62857
+ const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM3(require_dist_cjs52()));
64958
62858
  return fromTokenFile2(init2)();
64959
62859
  },
64960
62860
  async () => {
@@ -64975,7 +62875,7 @@ var require_dist_cjs59 = __commonJS({
64975
62875
  });
64976
62876
 
64977
62877
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/ruleset.js
64978
- var require_ruleset5 = __commonJS({
62878
+ var require_ruleset4 = __commonJS({
64979
62879
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/ruleset.js"(exports2) {
64980
62880
  "use strict";
64981
62881
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -65008,14 +62908,14 @@ var require_ruleset5 = __commonJS({
65008
62908
  });
65009
62909
 
65010
62910
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/endpointResolver.js
65011
- var require_endpointResolver5 = __commonJS({
62911
+ var require_endpointResolver4 = __commonJS({
65012
62912
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/endpoint/endpointResolver.js"(exports2) {
65013
62913
  "use strict";
65014
62914
  Object.defineProperty(exports2, "__esModule", { value: true });
65015
62915
  exports2.defaultEndpointResolver = void 0;
65016
62916
  var util_endpoints_1 = require_dist_cjs7();
65017
62917
  var util_endpoints_2 = require_dist_cjs6();
65018
- var ruleset_1 = require_ruleset5();
62918
+ var ruleset_1 = require_ruleset4();
65019
62919
  var defaultEndpointResolver = (endpointParams, context = {}) => {
65020
62920
  return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
65021
62921
  endpointParams,
@@ -65028,7 +62928,7 @@ var require_endpointResolver5 = __commonJS({
65028
62928
  });
65029
62929
 
65030
62930
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.shared.js
65031
- var require_runtimeConfig_shared5 = __commonJS({
62931
+ var require_runtimeConfig_shared4 = __commonJS({
65032
62932
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.shared.js"(exports2) {
65033
62933
  "use strict";
65034
62934
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -65039,7 +62939,7 @@ var require_runtimeConfig_shared5 = __commonJS({
65039
62939
  var util_base64_1 = require_dist_cjs25();
65040
62940
  var util_utf8_1 = require_dist_cjs24();
65041
62941
  var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
65042
- var endpointResolver_1 = require_endpointResolver5();
62942
+ var endpointResolver_1 = require_endpointResolver4();
65043
62943
  var getRuntimeConfig = (config) => {
65044
62944
  return {
65045
62945
  apiVersion: "2018-08-01",
@@ -65068,7 +62968,7 @@ var require_runtimeConfig_shared5 = __commonJS({
65068
62968
  });
65069
62969
 
65070
62970
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.js
65071
- var require_runtimeConfig5 = __commonJS({
62971
+ var require_runtimeConfig4 = __commonJS({
65072
62972
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/runtimeConfig.js"(exports2) {
65073
62973
  "use strict";
65074
62974
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -65076,7 +62976,7 @@ var require_runtimeConfig5 = __commonJS({
65076
62976
  var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));
65077
62977
  var package_json_1 = tslib_1.__importDefault(require_package2());
65078
62978
  var core_1 = require_dist_cjs37();
65079
- var credential_provider_node_1 = require_dist_cjs59();
62979
+ var credential_provider_node_1 = require_dist_cjs54();
65080
62980
  var util_user_agent_node_1 = require_dist_cjs41();
65081
62981
  var config_resolver_1 = require_dist_cjs11();
65082
62982
  var hash_node_1 = require_dist_cjs42();
@@ -65085,7 +62985,7 @@ var require_runtimeConfig5 = __commonJS({
65085
62985
  var node_http_handler_1 = require_dist_cjs28();
65086
62986
  var util_body_length_node_1 = require_dist_cjs43();
65087
62987
  var util_retry_1 = require_dist_cjs20();
65088
- var runtimeConfig_shared_1 = require_runtimeConfig_shared5();
62988
+ var runtimeConfig_shared_1 = require_runtimeConfig_shared4();
65089
62989
  var smithy_client_1 = require_dist_cjs32();
65090
62990
  var util_defaults_mode_node_1 = require_dist_cjs44();
65091
62991
  var smithy_client_2 = require_dist_cjs32();
@@ -65121,7 +63021,7 @@ var require_runtimeConfig5 = __commonJS({
65121
63021
  });
65122
63022
 
65123
63023
  // ../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/index.js
65124
- var require_dist_cjs60 = __commonJS({
63024
+ var require_dist_cjs55 = __commonJS({
65125
63025
  "../node_modules/.pnpm/@aws-sdk+client-rds-data@3.583.0/node_modules/@aws-sdk/client-rds-data/dist-cjs/index.js"(exports2, module2) {
65126
63026
  "use strict";
65127
63027
  var __defProp3 = Object.defineProperty;
@@ -65202,7 +63102,7 @@ var require_dist_cjs60 = __commonJS({
65202
63102
  Region: { type: "builtInParams", name: "region" },
65203
63103
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
65204
63104
  };
65205
- var import_runtimeConfig = require_runtimeConfig5();
63105
+ var import_runtimeConfig = require_runtimeConfig4();
65206
63106
  var import_region_config_resolver = require_dist_cjs45();
65207
63107
  var import_protocol_http = require_dist_cjs2();
65208
63108
  var import_smithy_client = require_dist_cjs32();
@@ -66452,7 +64352,7 @@ var init_connections = __esm({
66452
64352
  const { driver: driver2 } = credentials2;
66453
64353
  if (driver2 === "aws-data-api") {
66454
64354
  assertPackages("@aws-sdk/client-rds-data");
66455
- const { RDSDataClient, ExecuteStatementCommand, TypeHint } = await Promise.resolve().then(() => __toESM(require_dist_cjs60()));
64355
+ const { RDSDataClient, ExecuteStatementCommand, TypeHint } = await Promise.resolve().then(() => __toESM(require_dist_cjs55()));
66456
64356
  const { AwsDataApiSession, drizzle } = await import("drizzle-orm/aws-data-api/pg");
66457
64357
  const { migrate: migrate2 } = await import("drizzle-orm/aws-data-api/pg/migrator");
66458
64358
  const { PgDialect: PgDialect2 } = await import("drizzle-orm/pg-core");
@@ -66466,6 +64366,7 @@ var init_connections = __esm({
66466
64366
  rdsClient,
66467
64367
  new PgDialect2(),
66468
64368
  void 0,
64369
+ void 0,
66469
64370
  config,
66470
64371
  void 0
66471
64372
  );
@@ -67829,28 +65730,13 @@ var init_pgPushUtils = __esm({
67829
65730
  });
67830
65731
 
67831
65732
  // 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
- }
67845
65733
  var import_hanji8, filterStatements2, logSuggestionsAndReturn3;
67846
65734
  var init_singlestorePushUtils = __esm({
67847
65735
  "src/cli/commands/singlestorePushUtils.ts"() {
67848
65736
  "use strict";
67849
65737
  init_source();
67850
65738
  import_hanji8 = __toESM(require_hanji());
67851
- init_sqlgenerator();
67852
65739
  init_singlestoreSchema();
67853
- init_utils2();
67854
65740
  init_selector_ui();
67855
65741
  init_outputs();
67856
65742
  filterStatements2 = (statements, currentSchema, prevSchema) => {
@@ -67894,7 +65780,7 @@ var init_singlestorePushUtils = __esm({
67894
65780
  return true;
67895
65781
  });
67896
65782
  };
67897
- logSuggestionsAndReturn3 = async (db, statements, json2, json1) => {
65783
+ logSuggestionsAndReturn3 = async (db, statements, json2) => {
67898
65784
  let shouldAskForApprove = false;
67899
65785
  const statementsToExecute = [];
67900
65786
  const infoToPrint = [];
@@ -68075,71 +65961,6 @@ var init_singlestorePushUtils = __esm({
68075
65961
  shouldAskForApprove = true;
68076
65962
  }
68077
65963
  }
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);
68143
65964
  }
68144
65965
  }
68145
65966
  return {
@@ -69990,16 +67811,30 @@ var init_push = __esm({
69990
67811
  } = await logSuggestionsAndReturn3(
69991
67812
  db,
69992
67813
  filteredStatements,
69993
- statements.validatedCur,
69994
- statements.validatedPrev
67814
+ statements.validatedCur
69995
67815
  );
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
+ });
69996
67829
  if (verbose) {
69997
67830
  console.log();
69998
67831
  console.log(
69999
67832
  withStyle.warning("You are about to execute current statements:")
70000
67833
  );
70001
67834
  console.log();
70002
- console.log(statementsToExecute.map((s2) => source_default.blue(s2)).join("\n"));
67835
+ console.log(
67836
+ [...uniqueSqlStatementsToExecute, ...uniqueFilteredSqlStatements].map((s2) => source_default.blue(s2)).join("\n")
67837
+ );
70003
67838
  console.log();
70004
67839
  }
70005
67840
  if (!force && strict) {
@@ -70034,9 +67869,12 @@ var init_push = __esm({
70034
67869
  process.exit(0);
70035
67870
  }
70036
67871
  }
70037
- for (const dStmnt of statementsToExecute) {
67872
+ for (const dStmnt of uniqueSqlStatementsToExecute) {
70038
67873
  await db.query(dStmnt);
70039
67874
  }
67875
+ for (const statement of uniqueFilteredSqlStatements) {
67876
+ await db.query(statement);
67877
+ }
70040
67878
  if (filteredStatements.length > 0) {
70041
67879
  (0, import_hanji13.render)(`[${source_default.green("\u2713")}] Changes applied`);
70042
67880
  } else {
@@ -70657,6 +68495,7 @@ var init_introspect_mysql = __esm({
70657
68495
  import_casing3 = require("drizzle-orm/casing");
70658
68496
  init_utils();
70659
68497
  init_global();
68498
+ init_mysqlSerializer();
70660
68499
  init_utils2();
70661
68500
  mysqlImportsList = /* @__PURE__ */ new Set([
70662
68501
  "mysqlTable",
@@ -71239,9 +69078,12 @@ import { sql } from "drizzle-orm"
71239
69078
  let idxKey = it.name.startsWith(tableName) && it.name !== tableName ? it.name.slice(tableName.length + 1) : it.name;
71240
69079
  idxKey = idxKey.endsWith("_index") ? idxKey.slice(0, -"_index".length) + "_idx" : idxKey;
71241
69080
  idxKey = casing2(idxKey);
71242
- statement += ` ${idxKey}: `;
69081
+ const indexGeneratedName = indexName(tableName, it.columns);
69082
+ const escapedIndexName = indexGeneratedName === it.name ? "" : `"${it.name}"`;
69083
+ statement += `
69084
+ `;
71243
69085
  statement += it.isUnique ? "uniqueIndex(" : "index(";
71244
- statement += `"${it.name}")`;
69086
+ statement += `${escapedIndexName})`;
71245
69087
  statement += `.on(${it.columns.map((it2) => `table.${casing2(it2)}`).join(", ")}),`;
71246
69088
  });
71247
69089
  return statement;
@@ -71341,7 +69183,7 @@ var init_introspect_pg = __esm({
71341
69183
  "src/introspect-pg.ts"() {
71342
69184
  "use strict";
71343
69185
  import_drizzle_orm9 = require("drizzle-orm");
71344
- import_relations = require("drizzle-orm/relations");
69186
+ import_relations = require("drizzle-orm/_relations");
71345
69187
  init_utils();
71346
69188
  import_casing4 = require("drizzle-orm/casing");
71347
69189
  init_global();
@@ -73192,7 +71034,7 @@ var init_introspect = __esm({
73192
71034
  });
73193
71035
  });
73194
71036
  const uniqueImports = [...new Set(imports)];
73195
- const importsTs = `import { relations } from "drizzle-orm/relations";
71037
+ const importsTs = `import { relations } from "drizzle-orm/_relations";
73196
71038
  import { ${uniqueImports.join(
73197
71039
  ", "
73198
71040
  )} } from "./schema";
@@ -76558,7 +74400,7 @@ __export(studio_exports, {
76558
74400
  prepareServer: () => prepareServer,
76559
74401
  prepareSingleStoreSchema: () => prepareSingleStoreSchema
76560
74402
  });
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;
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;
76562
74404
  var init_studio2 = __esm({
76563
74405
  "src/serializer/studio.ts"() {
76564
74406
  "use strict";
@@ -76566,6 +74408,7 @@ var init_studio2 = __esm({
76566
74408
  init_esm();
76567
74409
  import_crypto9 = require("crypto");
76568
74410
  import_drizzle_orm10 = require("drizzle-orm");
74411
+ import_relations2 = require("drizzle-orm/_relations");
76569
74412
  import_mysql_core3 = require("drizzle-orm/mysql-core");
76570
74413
  import_pg_core3 = require("drizzle-orm/pg-core");
76571
74414
  import_singlestore_core3 = require("drizzle-orm/singlestore-core");
@@ -76600,7 +74443,7 @@ var init_studio2 = __esm({
76600
74443
  pgSchema2[schema6] = pgSchema2[schema6] || {};
76601
74444
  pgSchema2[schema6][k] = t2;
76602
74445
  }
76603
- if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74446
+ if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76604
74447
  relations4[k] = t2;
76605
74448
  }
76606
74449
  });
@@ -76629,7 +74472,7 @@ var init_studio2 = __esm({
76629
74472
  const schema6 = (0, import_mysql_core3.getTableConfig)(t2).schema || "public";
76630
74473
  mysqlSchema3[schema6][k] = t2;
76631
74474
  }
76632
- if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74475
+ if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76633
74476
  relations4[k] = t2;
76634
74477
  }
76635
74478
  });
@@ -76658,7 +74501,7 @@ var init_studio2 = __esm({
76658
74501
  const schema6 = "public";
76659
74502
  sqliteSchema2[schema6][k] = t2;
76660
74503
  }
76661
- if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74504
+ if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76662
74505
  relations4[k] = t2;
76663
74506
  }
76664
74507
  });
@@ -76668,7 +74511,7 @@ var init_studio2 = __esm({
76668
74511
  };
76669
74512
  prepareSingleStoreSchema = async (path4) => {
76670
74513
  const imports = prepareFilenames(path4);
76671
- const singlestoreSchema2 = {
74514
+ const singlestoreSchema3 = {
76672
74515
  public: {}
76673
74516
  };
76674
74517
  const relations4 = {};
@@ -76685,15 +74528,15 @@ var init_studio2 = __esm({
76685
74528
  i0values.forEach(([k, t2]) => {
76686
74529
  if ((0, import_drizzle_orm10.is)(t2, import_singlestore_core3.SingleStoreTable)) {
76687
74530
  const schema6 = (0, import_singlestore_core3.getTableConfig)(t2).schema || "public";
76688
- singlestoreSchema2[schema6][k] = t2;
74531
+ singlestoreSchema3[schema6][k] = t2;
76689
74532
  }
76690
- if ((0, import_drizzle_orm10.is)(t2, import_drizzle_orm10.Relations)) {
74533
+ if ((0, import_drizzle_orm10.is)(t2, import_relations2.Relations)) {
76691
74534
  relations4[k] = t2;
76692
74535
  }
76693
74536
  });
76694
74537
  }
76695
74538
  unregister();
76696
- return { schema: singlestoreSchema2, relations: relations4, files };
74539
+ return { schema: singlestoreSchema3, relations: relations4, files };
76697
74540
  };
76698
74541
  getCustomDefaults = (schema6) => {
76699
74542
  const customDefaults = [];
@@ -76819,10 +74662,10 @@ var init_studio2 = __esm({
76819
74662
  schemaFiles
76820
74663
  };
76821
74664
  };
76822
- drizzleForSingleStore = async (credentials2, singlestoreSchema2, relations4, schemaFiles) => {
74665
+ drizzleForSingleStore = async (credentials2, singlestoreSchema3, relations4, schemaFiles) => {
76823
74666
  const { connectToSingleStore: connectToSingleStore2 } = await Promise.resolve().then(() => (init_connections(), connections_exports));
76824
74667
  const { proxy } = await connectToSingleStore2(credentials2);
76825
- const customDefaults = getCustomDefaults(singlestoreSchema2);
74668
+ const customDefaults = getCustomDefaults(singlestoreSchema3);
76826
74669
  let dbUrl;
76827
74670
  if ("url" in credentials2) {
76828
74671
  dbUrl = credentials2.url;
@@ -76835,7 +74678,7 @@ var init_studio2 = __esm({
76835
74678
  dialect: "singlestore",
76836
74679
  proxy,
76837
74680
  customDefaults,
76838
- schema: singlestoreSchema2,
74681
+ schema: singlestoreSchema3,
76839
74682
  relations: relations4,
76840
74683
  schemaFiles
76841
74684
  };
@@ -76843,7 +74686,7 @@ var init_studio2 = __esm({
76843
74686
  extractRelations = (tablesConfig) => {
76844
74687
  const relations4 = Object.values(tablesConfig.tables).map(
76845
74688
  (it) => Object.entries(it.relations).map(([name, relation]) => {
76846
- const normalized = (0, import_drizzle_orm10.normalizeRelation)(
74689
+ const normalized = (0, import_relations2.normalizeRelation)(
76847
74690
  tablesConfig.tables,
76848
74691
  tablesConfig.tableNamesMap,
76849
74692
  relation
@@ -76866,9 +74709,9 @@ var init_studio2 = __esm({
76866
74709
  throw new Error("unsupported dialect");
76867
74710
  }
76868
74711
  let type;
76869
- if ((0, import_drizzle_orm10.is)(rel, import_drizzle_orm10.One)) {
74712
+ if ((0, import_drizzle_orm10.is)(rel, import_relations2.One)) {
76870
74713
  type = "one";
76871
- } else if ((0, import_drizzle_orm10.is)(rel, import_drizzle_orm10.Many)) {
74714
+ } else if ((0, import_drizzle_orm10.is)(rel, import_relations2.Many)) {
76872
74715
  type = "many";
76873
74716
  } else {
76874
74717
  throw new Error("unsupported relation type");
@@ -76973,9 +74816,9 @@ var init_studio2 = __esm({
76973
74816
  ),
76974
74817
  ...relations4
76975
74818
  };
76976
- const relationsConfig = (0, import_drizzle_orm10.extractTablesRelationalConfig)(
74819
+ const relationsConfig = (0, import_relations2.extractTablesRelationalConfig)(
76977
74820
  relationalSchema,
76978
- import_drizzle_orm10.createTableRelationsHelpers
74821
+ import_relations2.createTableRelationsHelpers
76979
74822
  );
76980
74823
  app.post("/", zValidator("json", schema5), async (c) => {
76981
74824
  const body = c.req.valid("json");
@@ -79541,7 +77384,7 @@ init_utils5();
79541
77384
  var version2 = async () => {
79542
77385
  const { npmVersion } = await ormCoreVersions();
79543
77386
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
79544
- const envVersion = "0.30.3-2c67783";
77387
+ const envVersion = "0.30.3-563f370";
79545
77388
  const kitVersion = envVersion ? `v${envVersion}` : "--";
79546
77389
  const versions = `drizzle-kit: ${kitVersion}
79547
77390
  ${ormVersion}`;