@settlemint/sdk-cli 0.6.50 → 0.6.51-main6b1a716

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 (3) hide show
  1. package/dist/cli.js +486 -154
  2. package/dist/cli.js.map +26 -19
  3. package/package.json +3 -3
package/dist/cli.js CHANGED
@@ -169828,11 +169828,11 @@ var require_version = __commonJS((exports) => {
169828
169828
  value: true
169829
169829
  });
169830
169830
  exports.versionInfo = exports.version = undefined;
169831
- var version = "16.9.0";
169831
+ var version = "16.10.0";
169832
169832
  exports.version = version;
169833
169833
  var versionInfo = Object.freeze({
169834
169834
  major: 16,
169835
- minor: 9,
169835
+ minor: 10,
169836
169836
  patch: 0,
169837
169837
  preReleaseTag: null
169838
169838
  });
@@ -171104,7 +171104,12 @@ var require_parser = __commonJS((exports) => {
171104
171104
  var _tokenKind = require_tokenKind();
171105
171105
  function parse(source, options) {
171106
171106
  const parser = new Parser(source, options);
171107
- return parser.parseDocument();
171107
+ const document2 = parser.parseDocument();
171108
+ Object.defineProperty(document2, "tokenCount", {
171109
+ enumerable: false,
171110
+ value: parser.tokenCount
171111
+ });
171112
+ return document2;
171108
171113
  }
171109
171114
  function parseValue(source, options) {
171110
171115
  const parser = new Parser(source, options);
@@ -171135,6 +171140,9 @@ var require_parser = __commonJS((exports) => {
171135
171140
  this._options = options;
171136
171141
  this._tokenCounter = 0;
171137
171142
  }
171143
+ get tokenCount() {
171144
+ return this._tokenCounter;
171145
+ }
171138
171146
  parseName() {
171139
171147
  const token = this.expectToken(_tokenKind.TokenKind.NAME);
171140
171148
  return this.node(token, {
@@ -171930,9 +171938,9 @@ var require_parser = __commonJS((exports) => {
171930
171938
  advanceLexer() {
171931
171939
  const { maxTokens } = this._options;
171932
171940
  const token = this._lexer.advance();
171933
- if (maxTokens !== undefined && token.kind !== _tokenKind.TokenKind.EOF) {
171941
+ if (token.kind !== _tokenKind.TokenKind.EOF) {
171934
171942
  ++this._tokenCounter;
171935
- if (this._tokenCounter > maxTokens) {
171943
+ if (maxTokens !== undefined && this._tokenCounter > maxTokens) {
171936
171944
  throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Document contains more that ${maxTokens} tokens. Parsing aborted.`);
171937
171945
  }
171938
171946
  }
@@ -174938,6 +174946,9 @@ var require_validate = __commonJS((exports) => {
174938
174946
  continue;
174939
174947
  }
174940
174948
  validateName(context, directive);
174949
+ if (directive.locations.length === 0) {
174950
+ context.reportError(`Directive @${directive.name} must include 1 or more locations.`, directive.astNode);
174951
+ }
174941
174952
  for (const arg of directive.args) {
174942
174953
  validateName(context, arg);
174943
174954
  if (!(0, _definition.isInputType)(arg.type)) {
@@ -176238,11 +176249,12 @@ var require_OverlappingFieldsCanBeMergedRule = __commonJS((exports) => {
176238
176249
  return reason;
176239
176250
  }
176240
176251
  function OverlappingFieldsCanBeMergedRule(context) {
176252
+ const comparedFieldsAndFragmentPairs = new OrderedPairSet;
176241
176253
  const comparedFragmentPairs = new PairSet;
176242
176254
  const cachedFieldsAndFragmentNames = new Map;
176243
176255
  return {
176244
176256
  SelectionSet(selectionSet) {
176245
- const conflicts = findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, context.getParentType(), selectionSet);
176257
+ const conflicts = findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, context.getParentType(), selectionSet);
176246
176258
  for (const [[responseName, reason], fields1, fields2] of conflicts) {
176247
176259
  const reasonMsg = reasonMessage(reason);
176248
176260
  context.reportError(new _GraphQLError.GraphQLError(`Fields "${responseName}" conflict because ${reasonMsg}. Use different aliases on the fields to fetch both if this was intentional.`, {
@@ -176252,21 +176264,25 @@ var require_OverlappingFieldsCanBeMergedRule = __commonJS((exports) => {
176252
176264
  }
176253
176265
  };
176254
176266
  }
176255
- function findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentType, selectionSet) {
176267
+ function findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, parentType, selectionSet) {
176256
176268
  const conflicts = [];
176257
176269
  const [fieldMap, fragmentNames] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet);
176258
- collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap);
176270
+ collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, fieldMap);
176259
176271
  if (fragmentNames.length !== 0) {
176260
176272
  for (let i = 0;i < fragmentNames.length; i++) {
176261
- collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fieldMap, fragmentNames[i]);
176273
+ collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, false, fieldMap, fragmentNames[i]);
176262
176274
  for (let j = i + 1;j < fragmentNames.length; j++) {
176263
- collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fragmentNames[i], fragmentNames[j]);
176275
+ collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, false, fragmentNames[i], fragmentNames[j]);
176264
176276
  }
176265
176277
  }
176266
176278
  }
176267
176279
  return conflicts;
176268
176280
  }
176269
- function collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName) {
176281
+ function collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName) {
176282
+ if (comparedFieldsAndFragmentPairs.has(fieldMap, fragmentName, areMutuallyExclusive)) {
176283
+ return;
176284
+ }
176285
+ comparedFieldsAndFragmentPairs.add(fieldMap, fragmentName, areMutuallyExclusive);
176270
176286
  const fragment = context.getFragment(fragmentName);
176271
176287
  if (!fragment) {
176272
176288
  return;
@@ -176275,16 +176291,12 @@ var require_OverlappingFieldsCanBeMergedRule = __commonJS((exports) => {
176275
176291
  if (fieldMap === fieldMap2) {
176276
176292
  return;
176277
176293
  }
176278
- collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fieldMap2);
176294
+ collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fieldMap2);
176279
176295
  for (const referencedFragmentName of referencedFragmentNames) {
176280
- if (comparedFragmentPairs.has(referencedFragmentName, fragmentName, areMutuallyExclusive)) {
176281
- continue;
176282
- }
176283
- comparedFragmentPairs.add(referencedFragmentName, fragmentName, areMutuallyExclusive);
176284
- collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, referencedFragmentName);
176296
+ collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap, referencedFragmentName);
176285
176297
  }
176286
176298
  }
176287
- function collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2) {
176299
+ function collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2) {
176288
176300
  if (fragmentName1 === fragmentName2) {
176289
176301
  return;
176290
176302
  }
@@ -176299,38 +176311,38 @@ var require_OverlappingFieldsCanBeMergedRule = __commonJS((exports) => {
176299
176311
  }
176300
176312
  const [fieldMap1, referencedFragmentNames1] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment1);
176301
176313
  const [fieldMap2, referencedFragmentNames2] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment2);
176302
- collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2);
176314
+ collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2);
176303
176315
  for (const referencedFragmentName2 of referencedFragmentNames2) {
176304
- collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, referencedFragmentName2);
176316
+ collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, referencedFragmentName2);
176305
176317
  }
176306
176318
  for (const referencedFragmentName1 of referencedFragmentNames1) {
176307
- collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, referencedFragmentName1, fragmentName2);
176319
+ collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, referencedFragmentName1, fragmentName2);
176308
176320
  }
176309
176321
  }
176310
- function findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2) {
176322
+ function findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2) {
176311
176323
  const conflicts = [];
176312
176324
  const [fieldMap1, fragmentNames1] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType1, selectionSet1);
176313
176325
  const [fieldMap2, fragmentNames2] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType2, selectionSet2);
176314
- collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2);
176326
+ collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2);
176315
176327
  for (const fragmentName2 of fragmentNames2) {
176316
- collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fragmentName2);
176328
+ collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fragmentName2);
176317
176329
  }
176318
176330
  for (const fragmentName1 of fragmentNames1) {
176319
- collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap2, fragmentName1);
176331
+ collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap2, fragmentName1);
176320
176332
  }
176321
176333
  for (const fragmentName1 of fragmentNames1) {
176322
176334
  for (const fragmentName2 of fragmentNames2) {
176323
- collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2);
176335
+ collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2);
176324
176336
  }
176325
176337
  }
176326
176338
  return conflicts;
176327
176339
  }
176328
- function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap) {
176340
+ function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, fieldMap) {
176329
176341
  for (const [responseName, fields] of Object.entries(fieldMap)) {
176330
176342
  if (fields.length > 1) {
176331
176343
  for (let i = 0;i < fields.length; i++) {
176332
176344
  for (let j = i + 1;j < fields.length; j++) {
176333
- const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, responseName, fields[i], fields[j]);
176345
+ const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, false, responseName, fields[i], fields[j]);
176334
176346
  if (conflict) {
176335
176347
  conflicts.push(conflict);
176336
176348
  }
@@ -176339,13 +176351,13 @@ var require_OverlappingFieldsCanBeMergedRule = __commonJS((exports) => {
176339
176351
  }
176340
176352
  }
176341
176353
  }
176342
- function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {
176354
+ function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {
176343
176355
  for (const [responseName, fields1] of Object.entries(fieldMap1)) {
176344
176356
  const fields2 = fieldMap2[responseName];
176345
176357
  if (fields2) {
176346
176358
  for (const field1 of fields1) {
176347
176359
  for (const field2 of fields2) {
176348
- const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2);
176360
+ const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2);
176349
176361
  if (conflict) {
176350
176362
  conflicts.push(conflict);
176351
176363
  }
@@ -176354,7 +176366,7 @@ var require_OverlappingFieldsCanBeMergedRule = __commonJS((exports) => {
176354
176366
  }
176355
176367
  }
176356
176368
  }
176357
- function findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2) {
176369
+ function findConflict(context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2) {
176358
176370
  const [parentType1, node1, def1] = field1;
176359
176371
  const [parentType2, node2, def2] = field2;
176360
176372
  const areMutuallyExclusive = parentFieldsAreMutuallyExclusive || parentType1 !== parentType2 && (0, _definition.isObjectType)(parentType1) && (0, _definition.isObjectType)(parentType2);
@@ -176391,7 +176403,7 @@ var require_OverlappingFieldsCanBeMergedRule = __commonJS((exports) => {
176391
176403
  const selectionSet1 = node1.selectionSet;
176392
176404
  const selectionSet2 = node2.selectionSet;
176393
176405
  if (selectionSet1 && selectionSet2) {
176394
- const conflicts = findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, (0, _definition.getNamedType)(type1), selectionSet1, (0, _definition.getNamedType)(type2), selectionSet2);
176406
+ const conflicts = findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, (0, _definition.getNamedType)(type1), selectionSet1, (0, _definition.getNamedType)(type2), selectionSet2);
176395
176407
  return subfieldConflicts(conflicts, responseName, node1, node2);
176396
176408
  }
176397
176409
  }
@@ -176496,26 +176508,40 @@ var require_OverlappingFieldsCanBeMergedRule = __commonJS((exports) => {
176496
176508
  }
176497
176509
  }
176498
176510
 
176499
- class PairSet {
176511
+ class OrderedPairSet {
176500
176512
  constructor() {
176501
176513
  this._data = new Map;
176502
176514
  }
176503
- has(a, b, areMutuallyExclusive) {
176515
+ has(a, b, weaklyPresent) {
176504
176516
  var _this$_data$get;
176505
- const [key1, key2] = a < b ? [a, b] : [b, a];
176506
- const result = (_this$_data$get = this._data.get(key1)) === null || _this$_data$get === undefined ? undefined : _this$_data$get.get(key2);
176517
+ const result = (_this$_data$get = this._data.get(a)) === null || _this$_data$get === undefined ? undefined : _this$_data$get.get(b);
176507
176518
  if (result === undefined) {
176508
176519
  return false;
176509
176520
  }
176510
- return areMutuallyExclusive ? true : areMutuallyExclusive === result;
176521
+ return weaklyPresent ? true : weaklyPresent === result;
176511
176522
  }
176512
- add(a, b, areMutuallyExclusive) {
176513
- const [key1, key2] = a < b ? [a, b] : [b, a];
176514
- const map = this._data.get(key1);
176523
+ add(a, b, weaklyPresent) {
176524
+ const map = this._data.get(a);
176515
176525
  if (map === undefined) {
176516
- this._data.set(key1, new Map([[key2, areMutuallyExclusive]]));
176526
+ this._data.set(a, new Map([[b, weaklyPresent]]));
176527
+ } else {
176528
+ map.set(b, weaklyPresent);
176529
+ }
176530
+ }
176531
+ }
176532
+
176533
+ class PairSet {
176534
+ constructor() {
176535
+ this._orderedPairSet = new OrderedPairSet;
176536
+ }
176537
+ has(a, b, weaklyPresent) {
176538
+ return a < b ? this._orderedPairSet.has(a, b, weaklyPresent) : this._orderedPairSet.has(b, a, weaklyPresent);
176539
+ }
176540
+ add(a, b, weaklyPresent) {
176541
+ if (a < b) {
176542
+ this._orderedPairSet.add(a, b, weaklyPresent);
176517
176543
  } else {
176518
- map.set(key2, areMutuallyExclusive);
176544
+ this._orderedPairSet.add(b, a, weaklyPresent);
176519
176545
  }
176520
176546
  }
176521
176547
  }
@@ -176787,6 +176813,12 @@ var require_ScalarLeafsRule = __commonJS((exports) => {
176787
176813
  context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldName}" of type "${typeStr}" must have a selection of subfields. Did you mean "${fieldName} { ... }"?`, {
176788
176814
  nodes: node
176789
176815
  }));
176816
+ } else if (selectionSet.selections.length === 0) {
176817
+ const fieldName = node.name.value;
176818
+ const typeStr = (0, _inspect.inspect)(type);
176819
+ context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldName}" of type "${typeStr}" must have at least one field selected.`, {
176820
+ nodes: node
176821
+ }));
176790
176822
  }
176791
176823
  }
176792
176824
  }
@@ -180439,9 +180471,9 @@ var require_getIntrospectionQuery = __commonJS((exports) => {
180439
180471
  query IntrospectionQuery {
180440
180472
  __schema {
180441
180473
  ${schemaDescription}
180442
- queryType { name }
180443
- mutationType { name }
180444
- subscriptionType { name }
180474
+ queryType { name kind }
180475
+ mutationType { name kind }
180476
+ subscriptionType { name kind }
180445
180477
  types {
180446
180478
  ...FullType
180447
180479
  }
@@ -197395,7 +197427,7 @@ ${Bt.cyan(Yt)}
197395
197427
  code: "ENOENT"
197396
197428
  }), getPathInfo = (e9, t7) => {
197397
197429
  var r6 = t7.colon || or;
197398
- var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.Skojjx1piL:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
197430
+ var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.FXOsdiUQc4:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
197399
197431
  var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
197400
197432
  var a5 = nr ? n6.split(r6) : [""];
197401
197433
  if (nr) {
@@ -200532,7 +200564,7 @@ ${whileRunning(e9)}`;
200532
200564
  };
200533
200565
  ni = Object.assign(async function _main() {
200534
200566
  var e9 = new Cli({
200535
- binaryVersion: "0.6.50",
200567
+ binaryVersion: "0.6.51-main6b1a716",
200536
200568
  binaryLabel: "gql.tada CLI",
200537
200569
  binaryName: "gql.tada"
200538
200570
  });
@@ -200550,7 +200582,7 @@ ${whileRunning(e9)}`;
200550
200582
  // ../../node_modules/@dotenvx/dotenvx/package.json
200551
200583
  var require_package = __commonJS((exports, module) => {
200552
200584
  module.exports = {
200553
- version: "1.29.0",
200585
+ version: "1.31.0",
200554
200586
  name: "@dotenvx/dotenvx",
200555
200587
  description: "a better dotenv–from the creator of `dotenv`",
200556
200588
  author: "@motdotla",
@@ -200579,7 +200611,6 @@ var require_package = __commonJS((exports, module) => {
200579
200611
  "standard:fix": "standard --fix",
200580
200612
  test: "tap run --allow-empty-coverage --disable-coverage --timeout=60000",
200581
200613
  "test-coverage": "tap run --show-full-coverage --timeout=60000",
200582
- "test-single": "tap run --coverage-report=none tests/cli/actions/decrypt.test.js",
200583
200614
  testshell: "bash shellspec",
200584
200615
  prerelease: "npm test && npm run testshell",
200585
200616
  release: "standard-version"
@@ -209326,9 +209357,9 @@ var require_parse2 = __commonJS((exports, module) => {
209326
209357
  }
209327
209358
  eval(value4) {
209328
209359
  const matches = value4.match(/\$\(([^)]+(?:\)[^(]*)*)\)/g) || [];
209329
- return matches.reduce(function(newValue, match) {
209360
+ return matches.reduce((newValue, match) => {
209330
209361
  const command = match.slice(2, -1);
209331
- const result = chomp(execSync(command).toString());
209362
+ const result = chomp(execSync(command, { env: { ...this.processEnv, ...this.runningParsed } }).toString());
209332
209363
  return newValue.replace(match, result);
209333
209364
  }, value4);
209334
209365
  }
@@ -209469,6 +209500,41 @@ var require_guessPublicKeyName = __commonJS((exports, module) => {
209469
209500
  module.exports = guessPublicKeyName;
209470
209501
  });
209471
209502
 
209503
+ // ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/proKeypair.js
209504
+ var require_proKeypair = __commonJS((exports, module) => {
209505
+ var path3 = __require("path");
209506
+ var childProcess = __require("child_process");
209507
+ var guessPrivateKeyName = require_guessPrivateKeyName();
209508
+ var guessPublicKeyName = require_guessPublicKeyName();
209509
+
209510
+ class ProKeypair {
209511
+ constructor(envFilepath) {
209512
+ this.envFilepath = envFilepath;
209513
+ }
209514
+ run() {
209515
+ let result = {};
209516
+ try {
209517
+ const projectRoot2 = path3.resolve(process.cwd());
209518
+ const dotenvxProPath = __require.resolve("@dotenvx/dotenvx-pro", { paths: [projectRoot2] });
209519
+ const { keypair } = __require(dotenvxProPath);
209520
+ result = keypair(this.envFilepath);
209521
+ } catch (_e2) {
209522
+ try {
209523
+ const output = childProcess.execSync(`dotenvx-pro keypair -f ${this.envFilepath}`, { stdio: ["pipe", "pipe", "ignore"] }).toString().trim();
209524
+ result = JSON.parse(output);
209525
+ } catch (_e3) {
209526
+ const privateKeyName = guessPrivateKeyName(this.envFilepath);
209527
+ const publicKeyName = guessPublicKeyName(this.envFilepath);
209528
+ result[privateKeyName] = null;
209529
+ result[publicKeyName] = null;
209530
+ }
209531
+ }
209532
+ return result;
209533
+ }
209534
+ }
209535
+ module.exports = ProKeypair;
209536
+ });
209537
+
209472
209538
  // ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/smartDotenvPublicKey.js
209473
209539
  var require_smartDotenvPublicKey = __commonJS((exports, module) => {
209474
209540
  var fsx = require_fsx();
@@ -209517,11 +209583,13 @@ var require_smartDotenvPrivateKey = __commonJS((exports, module) => {
209517
209583
  return process.env[privateKeyName];
209518
209584
  }
209519
209585
  }
209520
- function searchKeysFile(privateKeyName, envFilepath) {
209521
- const directory = path3.dirname(envFilepath);
209522
- const envKeysFilepath = path3.resolve(directory, ".env.keys");
209523
- if (fsx.existsSync(envKeysFilepath)) {
209524
- const keysSrc = fsx.readFileX(envKeysFilepath);
209586
+ function searchKeysFile(privateKeyName, envFilepath, envKeysFilepath = null) {
209587
+ let keysFilepath = path3.resolve(path3.dirname(envFilepath), ".env.keys");
209588
+ if (envKeysFilepath) {
209589
+ keysFilepath = path3.resolve(envKeysFilepath);
209590
+ }
209591
+ if (fsx.existsSync(keysFilepath)) {
209592
+ const keysSrc = fsx.readFileX(keysFilepath);
209525
209593
  const keysParsed = dotenv.parse(keysSrc);
209526
209594
  if (keysParsed[privateKeyName] && keysParsed[privateKeyName].length > 0) {
209527
209595
  return keysParsed[privateKeyName];
@@ -209545,14 +209613,14 @@ var require_smartDotenvPrivateKey = __commonJS((exports, module) => {
209545
209613
  }
209546
209614
  return null;
209547
209615
  }
209548
- function smartDotenvPrivateKey(envFilepath) {
209616
+ function smartDotenvPrivateKey(envFilepath, envKeysFilepath = null) {
209549
209617
  let privateKey = null;
209550
209618
  let privateKeyName = guessPrivateKeyName(envFilepath);
209551
209619
  privateKey = searchProcessEnv(privateKeyName);
209552
209620
  if (privateKey) {
209553
209621
  return privateKey;
209554
209622
  }
209555
- privateKey = searchKeysFile(privateKeyName, envFilepath);
209623
+ privateKey = searchKeysFile(privateKeyName, envFilepath, envKeysFilepath);
209556
209624
  if (privateKey) {
209557
209625
  return privateKey;
209558
209626
  }
@@ -209562,7 +209630,7 @@ var require_smartDotenvPrivateKey = __commonJS((exports, module) => {
209562
209630
  if (privateKey) {
209563
209631
  return privateKey;
209564
209632
  }
209565
- privateKey = searchKeysFile(privateKeyName, envFilepath);
209633
+ privateKey = searchKeysFile(privateKeyName, envFilepath, envKeysFilepath);
209566
209634
  if (privateKey) {
209567
209635
  return privateKey;
209568
209636
  }
@@ -209580,9 +209648,9 @@ var require_keypair = __commonJS((exports, module) => {
209580
209648
  var smartDotenvPrivateKey = require_smartDotenvPrivateKey();
209581
209649
 
209582
209650
  class Keypair {
209583
- constructor(envFile = ".env", key = undefined) {
209651
+ constructor(envFile = ".env", envKeysFilepath = null) {
209584
209652
  this.envFile = envFile;
209585
- this.key = key;
209653
+ this.envKeysFilepath = envKeysFilepath;
209586
209654
  }
209587
209655
  run() {
209588
209656
  const out = {};
@@ -209592,14 +209660,10 @@ var require_keypair = __commonJS((exports, module) => {
209592
209660
  const publicKeyValue = smartDotenvPublicKey(envFilepath);
209593
209661
  out[publicKeyName] = publicKeyValue;
209594
209662
  const privateKeyName = guessPrivateKeyName(envFilepath);
209595
- const privateKeyValue = smartDotenvPrivateKey(envFilepath);
209663
+ const privateKeyValue = smartDotenvPrivateKey(envFilepath, this.envKeysFilepath);
209596
209664
  out[privateKeyName] = privateKeyValue;
209597
209665
  }
209598
- if (this.key) {
209599
- return out[this.key];
209600
- } else {
209601
- return out;
209602
- }
209666
+ return out;
209603
209667
  }
209604
209668
  _envFilepaths() {
209605
209669
  if (!Array.isArray(this.envFile)) {
@@ -209613,26 +209677,14 @@ var require_keypair = __commonJS((exports, module) => {
209613
209677
 
209614
209678
  // ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/findPrivateKey.js
209615
209679
  var require_findPrivateKey = __commonJS((exports, module) => {
209616
- var path3 = __require("path");
209617
- var childProcess = __require("child_process");
209618
209680
  var guessPrivateKeyName = require_guessPrivateKeyName();
209681
+ var ProKeypair = require_proKeypair();
209619
209682
  var Keypair = require_keypair();
209620
- function findPrivateKey(envFilepath) {
209683
+ function findPrivateKey(envFilepath, envKeysFilepath = null) {
209621
209684
  const privateKeyName = guessPrivateKeyName(envFilepath);
209622
- let privateKey;
209623
- try {
209624
- const projectRoot2 = path3.resolve(process.cwd());
209625
- const dotenvxProPath = __require.resolve("@dotenvx/dotenvx-pro", { paths: [projectRoot2] });
209626
- const { keypair } = __require(dotenvxProPath);
209627
- privateKey = keypair(envFilepath, privateKeyName);
209628
- } catch (_e2) {
209629
- try {
209630
- privateKey = childProcess.execSync(`dotenvx-pro keypair ${privateKeyName} -f ${envFilepath}`, { stdio: ["pipe", "pipe", "ignore"] }).toString().trim();
209631
- } catch (_e3) {
209632
- privateKey = new Keypair(envFilepath, privateKeyName).run();
209633
- }
209634
- }
209635
- return privateKey;
209685
+ const proKeypairs = new ProKeypair(envFilepath).run();
209686
+ const keypairs = new Keypair(envFilepath, envKeysFilepath).run();
209687
+ return proKeypairs[privateKeyName] || keypairs[privateKeyName];
209636
209688
  }
209637
209689
  module.exports = findPrivateKey;
209638
209690
  });
@@ -209727,11 +209779,12 @@ var require_run = __commonJS((exports, module) => {
209727
209779
  var determineEnvs = require_determineEnvs();
209728
209780
 
209729
209781
  class Run {
209730
- constructor(envs = [], overload = false, DOTENV_KEY = "", processEnv = process.env) {
209782
+ constructor(envs = [], overload = false, DOTENV_KEY = "", processEnv = process.env, envKeysFilepath = null) {
209731
209783
  this.envs = determineEnvs(envs, processEnv, DOTENV_KEY);
209732
209784
  this.overload = overload;
209733
209785
  this.DOTENV_KEY = DOTENV_KEY;
209734
209786
  this.processEnv = processEnv;
209787
+ this.envKeysFilepath = envKeysFilepath;
209735
209788
  this.processedEnvs = [];
209736
209789
  this.readableFilepaths = new Set;
209737
209790
  this.readableStrings = new Set;
@@ -209783,7 +209836,7 @@ var require_run = __commonJS((exports, module) => {
209783
209836
  const encoding = detectEncoding(filepath);
209784
209837
  const src = fsx.readFileX(filepath, { encoding });
209785
209838
  this.readableFilepaths.add(envFilepath);
209786
- const privateKey = findPrivateKey(envFilepath);
209839
+ const privateKey = findPrivateKey(envFilepath, this.envKeysFilepath);
209787
209840
  const privateKeyName = guessPrivateKeyName(envFilepath);
209788
209841
  const { parsed, errors, injected, preExisted } = new Parse(src, privateKey, this.processEnv, this.overload, privateKeyName).run();
209789
209842
  row.parsed = parsed;
@@ -209879,26 +209932,16 @@ var require_run = __commonJS((exports, module) => {
209879
209932
  module.exports = Run;
209880
209933
  });
209881
209934
 
209882
- // ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/findEnvFiles.js
209883
- var require_findEnvFiles = __commonJS((exports, module) => {
209884
- var fsx = require_fsx();
209885
- var RESERVED_ENV_FILES = [".env.vault", ".env.project", ".env.keys", ".env.me", ".env.x", ".env.example"];
209886
- function findEnvFiles(directory) {
209887
- try {
209888
- const files = fsx.readdirSync(directory);
209889
- const envFiles = files.filter((file) => file.startsWith(".env") && !file.endsWith(".previous") && !RESERVED_ENV_FILES.includes(file));
209890
- return envFiles;
209891
- } catch (e9) {
209892
- if (e9.code === "ENOENT") {
209893
- const error5 = new Error(`missing directory (${directory})`);
209894
- error5.code = "MISSING_DIRECTORY";
209895
- throw error5;
209896
- } else {
209897
- throw e9;
209898
- }
209899
- }
209935
+ // ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/encryptValue.js
209936
+ var require_encryptValue = __commonJS((exports, module) => {
209937
+ var { encrypt } = require_dist2();
209938
+ var PREFIX = "encrypted:";
209939
+ function encryptValue(value4, publicKey) {
209940
+ const ciphertext = encrypt(publicKey, Buffer.from(value4));
209941
+ const encoded = Buffer.from(ciphertext, "hex").toString("base64");
209942
+ return `${PREFIX}${encoded}`;
209900
209943
  }
209901
- module.exports = findEnvFiles;
209944
+ module.exports = encryptValue;
209902
209945
  });
209903
209946
 
209904
209947
  // ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/quotes.js
@@ -209983,6 +210026,262 @@ var require_replace = __commonJS((exports, module) => {
209983
210026
  module.exports = replace;
209984
210027
  });
209985
210028
 
210029
+ // ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/findPublicKey.js
210030
+ var require_findPublicKey = __commonJS((exports, module) => {
210031
+ var guessPublicKeyName = require_guessPublicKeyName();
210032
+ var ProKeypair = require_proKeypair();
210033
+ var Keypair = require_keypair();
210034
+ function findPublicKey(envFilepath) {
210035
+ const publicKeyName = guessPublicKeyName(envFilepath);
210036
+ const proKeypairs = new ProKeypair(envFilepath).run();
210037
+ const keypairs = new Keypair(envFilepath).run();
210038
+ return proKeypairs[publicKeyName] || keypairs[publicKeyName];
210039
+ }
210040
+ module.exports = findPublicKey;
210041
+ });
210042
+
210043
+ // ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/keypair.js
210044
+ var require_keypair2 = __commonJS((exports, module) => {
210045
+ var { PrivateKey } = require_dist2();
210046
+ function keypair(existingPrivateKey) {
210047
+ let kp;
210048
+ if (existingPrivateKey) {
210049
+ kp = new PrivateKey(Buffer.from(existingPrivateKey, "hex"));
210050
+ } else {
210051
+ kp = new PrivateKey;
210052
+ }
210053
+ const publicKey = kp.publicKey.toHex();
210054
+ const privateKey = kp.secret.toString("hex");
210055
+ return {
210056
+ publicKey,
210057
+ privateKey
210058
+ };
210059
+ }
210060
+ module.exports = keypair;
210061
+ });
210062
+
210063
+ // ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/isEncrypted.js
210064
+ var require_isEncrypted = __commonJS((exports, module) => {
210065
+ var ENCRYPTION_PATTERN = /^encrypted:.+/;
210066
+ function isEncrypted(value4) {
210067
+ return ENCRYPTION_PATTERN.test(value4);
210068
+ }
210069
+ module.exports = isEncrypted;
210070
+ });
210071
+
210072
+ // ../../node_modules/@dotenvx/dotenvx/src/lib/services/sets.js
210073
+ var require_sets = __commonJS((exports, module) => {
210074
+ var fsx = require_fsx();
210075
+ var path3 = __require("path");
210076
+ var dotenv = require_main();
210077
+ var TYPE_ENV_FILE = "envFile";
210078
+ var Errors = require_errors();
210079
+ var guessPrivateKeyName = require_guessPrivateKeyName();
210080
+ var guessPublicKeyName = require_guessPublicKeyName();
210081
+ var encryptValue = require_encryptValue();
210082
+ var decryptKeyValue = require_decryptKeyValue();
210083
+ var replace = require_replace();
210084
+ var detectEncoding = require_detectEncoding();
210085
+ var determineEnvs = require_determineEnvs();
210086
+ var findPrivateKey = require_findPrivateKey();
210087
+ var findPublicKey = require_findPublicKey();
210088
+ var keypair = require_keypair2();
210089
+ var truncate = require_truncate();
210090
+ var isEncrypted = require_isEncrypted();
210091
+
210092
+ class Sets {
210093
+ constructor(key, value4, envs = [], encrypt = true, envKeysFilepath = null) {
210094
+ this.envs = determineEnvs(envs, process.env);
210095
+ this.key = key;
210096
+ this.value = value4;
210097
+ this.encrypt = encrypt;
210098
+ this.envKeysFilepath = envKeysFilepath;
210099
+ this.processedEnvs = [];
210100
+ this.changedFilepaths = new Set;
210101
+ this.unchangedFilepaths = new Set;
210102
+ this.readableFilepaths = new Set;
210103
+ }
210104
+ run() {
210105
+ for (const env2 of this.envs) {
210106
+ if (env2.type === TYPE_ENV_FILE) {
210107
+ this._setEnvFile(env2.value);
210108
+ }
210109
+ }
210110
+ return {
210111
+ processedEnvs: this.processedEnvs,
210112
+ changedFilepaths: [...this.changedFilepaths],
210113
+ unchangedFilepaths: [...this.unchangedFilepaths]
210114
+ };
210115
+ }
210116
+ _setEnvFile(envFilepath) {
210117
+ const row = {};
210118
+ row.key = this.key || null;
210119
+ row.value = this.value || null;
210120
+ row.type = TYPE_ENV_FILE;
210121
+ const filename = path3.basename(envFilepath);
210122
+ const filepath = path3.resolve(envFilepath);
210123
+ row.filepath = filepath;
210124
+ row.envFilepath = envFilepath;
210125
+ row.changed = false;
210126
+ try {
210127
+ const encoding = this._detectEncoding(filepath);
210128
+ let envSrc = fsx.readFileX(filepath, { encoding });
210129
+ const envParsed = dotenv.parse(envSrc);
210130
+ row.originalValue = envParsed[row.key] || null;
210131
+ const wasPlainText = !isEncrypted(row.originalValue);
210132
+ this.readableFilepaths.add(envFilepath);
210133
+ if (this.encrypt) {
210134
+ let publicKey;
210135
+ let privateKey;
210136
+ const publicKeyName = guessPublicKeyName(envFilepath);
210137
+ const privateKeyName = guessPrivateKeyName(envFilepath);
210138
+ const existingPrivateKey = findPrivateKey(envFilepath, this.envKeysFilepath);
210139
+ const existingPublicKey = findPublicKey(envFilepath);
210140
+ let envKeysFilepath = path3.join(path3.dirname(filepath), ".env.keys");
210141
+ if (this.envKeysFilepath) {
210142
+ envKeysFilepath = path3.resolve(this.envKeysFilepath);
210143
+ }
210144
+ const relativeFilepath = path3.relative(path3.dirname(filepath), envKeysFilepath);
210145
+ if (existingPrivateKey) {
210146
+ const kp = keypair(existingPrivateKey);
210147
+ publicKey = kp.publicKey;
210148
+ privateKey = kp.privateKey;
210149
+ if (row.originalValue) {
210150
+ row.originalValue = decryptKeyValue(row.key, row.originalValue, privateKeyName, privateKey);
210151
+ }
210152
+ if (existingPublicKey && existingPublicKey !== publicKey) {
210153
+ const error5 = new Error(`derived public key (${truncate(publicKey)}) does not match the existing public key (${truncate(existingPublicKey)})`);
210154
+ error5.code = "INVALID_DOTENV_PRIVATE_KEY";
210155
+ error5.help = `debug info: ${privateKeyName}=${truncate(existingPrivateKey)} (derived ${publicKeyName}=${truncate(publicKey)} vs existing ${publicKeyName}=${truncate(existingPublicKey)})`;
210156
+ throw error5;
210157
+ }
210158
+ if (!existingPublicKey) {
210159
+ const ps = this._preserveShebang(envSrc);
210160
+ const firstLinePreserved = ps.firstLinePreserved;
210161
+ envSrc = ps.envSrc;
210162
+ const prependPublicKey = this._prependPublicKey(publicKeyName, publicKey, filename, relativeFilepath);
210163
+ envSrc = `${firstLinePreserved}${prependPublicKey}
210164
+ ${envSrc}`;
210165
+ }
210166
+ } else if (existingPublicKey) {
210167
+ publicKey = existingPublicKey;
210168
+ } else {
210169
+ let keysSrc = "";
210170
+ if (fsx.existsSync(envKeysFilepath)) {
210171
+ keysSrc = fsx.readFileX(envKeysFilepath);
210172
+ }
210173
+ const ps = this._preserveShebang(envSrc);
210174
+ const firstLinePreserved = ps.firstLinePreserved;
210175
+ envSrc = ps.envSrc;
210176
+ const kp = keypair();
210177
+ publicKey = kp.publicKey;
210178
+ privateKey = kp.privateKey;
210179
+ const prependPublicKey = this._prependPublicKey(publicKeyName, publicKey, filename, relativeFilepath);
210180
+ const firstTimeKeysSrc = [
210181
+ "#/------------------!DOTENV_PRIVATE_KEYS!-------------------/",
210182
+ "#/ private decryption keys. DO NOT commit to source control /",
210183
+ "#/ [how it works](https://dotenvx.com/encryption) /",
210184
+ "#/----------------------------------------------------------/"
210185
+ ].join(`
210186
+ `);
210187
+ const appendPrivateKey = [
210188
+ `# ${filename}`,
210189
+ `${privateKeyName}=${privateKey}`,
210190
+ ""
210191
+ ].join(`
210192
+ `);
210193
+ envSrc = `${firstLinePreserved}${prependPublicKey}
210194
+ ${envSrc}`;
210195
+ keysSrc = keysSrc.length > 1 ? keysSrc : `${firstTimeKeysSrc}
210196
+ `;
210197
+ keysSrc = `${keysSrc}
210198
+ ${appendPrivateKey}`;
210199
+ fsx.writeFileX(envKeysFilepath, keysSrc);
210200
+ row.privateKeyAdded = true;
210201
+ row.envKeysFilepath = this.envKeysFilepath || path3.join(path3.dirname(envFilepath), path3.basename(envKeysFilepath));
210202
+ }
210203
+ row.publicKey = publicKey;
210204
+ row.privateKey = privateKey;
210205
+ row.encryptedValue = encryptValue(this.value, publicKey);
210206
+ row.privateKeyName = privateKeyName;
210207
+ }
210208
+ const goingFromPlainTextToEncrypted = wasPlainText && this.encrypt;
210209
+ const valueChanged = this.value !== row.originalValue;
210210
+ if (goingFromPlainTextToEncrypted || valueChanged) {
210211
+ row.envSrc = replace(envSrc, this.key, row.encryptedValue || this.value);
210212
+ this.changedFilepaths.add(envFilepath);
210213
+ row.changed = true;
210214
+ } else {
210215
+ row.envSrc = envSrc;
210216
+ this.unchangedFilepaths.add(envFilepath);
210217
+ row.changed = false;
210218
+ }
210219
+ } catch (e9) {
210220
+ if (e9.code === "ENOENT") {
210221
+ row.error = new Errors({ envFilepath, filepath }).missingEnvFile();
210222
+ } else {
210223
+ row.error = e9;
210224
+ }
210225
+ }
210226
+ this.processedEnvs.push(row);
210227
+ }
210228
+ _detectEncoding(filepath) {
210229
+ return detectEncoding(filepath);
210230
+ }
210231
+ _prependPublicKey(publicKeyName, publicKey, filename, relativeFilepath = ".env.keys") {
210232
+ const comment = relativeFilepath === ".env.keys" ? "" : ` # -fk ${relativeFilepath}`;
210233
+ return [
210234
+ "#/-------------------[DOTENV_PUBLIC_KEY]--------------------/",
210235
+ "#/ public-key encryption for .env files /",
210236
+ "#/ [how it works](https://dotenvx.com/encryption) /",
210237
+ "#/----------------------------------------------------------/",
210238
+ `${publicKeyName}="${publicKey}"${comment}`,
210239
+ "",
210240
+ `# ${filename}`
210241
+ ].join(`
210242
+ `);
210243
+ }
210244
+ _preserveShebang(envSrc) {
210245
+ const [firstLine, ...remainingLines] = envSrc.split(`
210246
+ `);
210247
+ let firstLinePreserved = "";
210248
+ if (firstLine.startsWith("#!")) {
210249
+ firstLinePreserved = firstLine + `
210250
+ `;
210251
+ envSrc = remainingLines.join(`
210252
+ `);
210253
+ }
210254
+ return {
210255
+ firstLinePreserved,
210256
+ envSrc
210257
+ };
210258
+ }
210259
+ }
210260
+ module.exports = Sets;
210261
+ });
210262
+
210263
+ // ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/findEnvFiles.js
210264
+ var require_findEnvFiles = __commonJS((exports, module) => {
210265
+ var fsx = require_fsx();
210266
+ var RESERVED_ENV_FILES = [".env.vault", ".env.project", ".env.keys", ".env.me", ".env.x", ".env.example"];
210267
+ function findEnvFiles(directory) {
210268
+ try {
210269
+ const files = fsx.readdirSync(directory);
210270
+ const envFiles = files.filter((file) => file.startsWith(".env") && !file.endsWith(".previous") && !RESERVED_ENV_FILES.includes(file));
210271
+ return envFiles;
210272
+ } catch (e9) {
210273
+ if (e9.code === "ENOENT") {
210274
+ const error5 = new Error(`missing directory (${directory})`);
210275
+ error5.code = "MISSING_DIRECTORY";
210276
+ throw error5;
210277
+ } else {
210278
+ throw e9;
210279
+ }
210280
+ }
210281
+ }
210282
+ module.exports = findEnvFiles;
210283
+ });
210284
+
209986
210285
  // ../../node_modules/@dotenvx/dotenvx/src/lib/services/genexample.js
209987
210286
  var require_genexample = __commonJS((exports, module) => {
209988
210287
  var fsx = require_fsx();
@@ -210141,6 +210440,34 @@ var require_deprecationNotice = __commonJS((exports, module) => {
210141
210440
  module.exports = DeprecationNotice;
210142
210441
  });
210143
210442
 
210443
+ // ../../node_modules/@dotenvx/dotenvx/src/lib/helpers/buildEnvs.js
210444
+ var require_buildEnvs = __commonJS((exports, module) => {
210445
+ var path3 = __require("path");
210446
+ var conventions = require_conventions();
210447
+ var dotenvOptionPaths = require_dotenvOptionPaths();
210448
+ var DeprecationNotice = require_deprecationNotice();
210449
+ function buildEnvs(options, DOTENV_KEY = undefined) {
210450
+ const optionPaths = dotenvOptionPaths(options);
210451
+ let envs = [];
210452
+ if (options.convention) {
210453
+ envs = conventions(options.convention).concat(envs);
210454
+ }
210455
+ new DeprecationNotice({ DOTENV_KEY }).dotenvKey();
210456
+ for (const optionPath of optionPaths) {
210457
+ if (DOTENV_KEY) {
210458
+ envs.push({
210459
+ type: "envVaultFile",
210460
+ value: path3.join(path3.dirname(optionPath), ".env.vault")
210461
+ });
210462
+ } else {
210463
+ envs.push({ type: "envFile", value: optionPath });
210464
+ }
210465
+ }
210466
+ return envs;
210467
+ }
210468
+ module.exports = buildEnvs;
210469
+ });
210470
+
210144
210471
  // ../../node_modules/@dotenvx/dotenvx/src/lib/main.js
210145
210472
  var require_main2 = __commonJS((exports, module) => {
210146
210473
  var path3 = __require("path");
@@ -210148,12 +210475,11 @@ var require_main2 = __commonJS((exports, module) => {
210148
210475
  var { getColor, bold: bold3 } = require_colors();
210149
210476
  var Ls = require_ls();
210150
210477
  var Run = require_run();
210478
+ var Sets = require_sets();
210151
210479
  var Keypair = require_keypair();
210152
210480
  var Genexample = require_genexample();
210153
- var conventions = require_conventions();
210154
- var dotenvOptionPaths = require_dotenvOptionPaths();
210481
+ var buildEnvs = require_buildEnvs();
210155
210482
  var Parse = require_parse2();
210156
- var DeprecationNotice = require_deprecationNotice();
210157
210483
  var config = function(options = {}) {
210158
210484
  let processEnv = process.env;
210159
210485
  if (options && options.processEnv != null) {
@@ -210162,34 +210488,20 @@ var require_main2 = __commonJS((exports, module) => {
210162
210488
  const overload = options.overload || options.override;
210163
210489
  const ignore = options.ignore || [];
210164
210490
  const strict = options.strict;
210491
+ const envKeysFile = options.envKeysFile;
210165
210492
  let DOTENV_KEY = process.env.DOTENV_KEY;
210166
210493
  if (options && options.DOTENV_KEY) {
210167
210494
  DOTENV_KEY = options.DOTENV_KEY;
210168
210495
  }
210169
210496
  if (options)
210170
210497
  setLogLevel(options);
210171
- const optionPaths = dotenvOptionPaths(options);
210172
210498
  try {
210173
- let envs = [];
210174
- if (options.convention) {
210175
- envs = conventions(options.convention).concat(envs);
210176
- }
210177
- new DeprecationNotice({ DOTENV_KEY }).dotenvKey();
210178
- for (const optionPath of optionPaths) {
210179
- if (DOTENV_KEY) {
210180
- envs.push({
210181
- type: "envVaultFile",
210182
- value: path3.join(path3.dirname(optionPath), ".env.vault")
210183
- });
210184
- } else {
210185
- envs.push({ type: "envFile", value: optionPath });
210186
- }
210187
- }
210499
+ const envs = buildEnvs(options, DOTENV_KEY);
210188
210500
  const {
210189
210501
  processedEnvs,
210190
210502
  readableFilepaths,
210191
210503
  uniqueInjectedKeys
210192
- } = new Run(envs, overload, DOTENV_KEY, processEnv).run();
210504
+ } = new Run(envs, overload, DOTENV_KEY, processEnv, envKeysFile).run();
210193
210505
  let lastError;
210194
210506
  const parsedAll = {};
210195
210507
  for (const processedEnv of processedEnvs) {
@@ -210269,18 +210581,35 @@ var require_main2 = __commonJS((exports, module) => {
210269
210581
  }
210270
210582
  return parsed;
210271
210583
  };
210584
+ var set = function(key, value4, options = {}) {
210585
+ let encrypt = true;
210586
+ if (options.plain) {
210587
+ encrypt = false;
210588
+ } else if (options.encrypt === false) {
210589
+ encrypt = false;
210590
+ }
210591
+ const envKeysFile = options.envKeysFile;
210592
+ const envs = buildEnvs(options);
210593
+ return new Sets(key, value4, envs, encrypt, envKeysFile).run();
210594
+ };
210272
210595
  var ls = function(directory, envFile, excludeEnvFile) {
210273
210596
  return new Ls(directory, envFile, excludeEnvFile).run();
210274
210597
  };
210275
210598
  var genexample = function(directory, envFile) {
210276
210599
  return new Genexample(directory, envFile).run();
210277
210600
  };
210278
- var keypair = function(envFile, key) {
210279
- return new Keypair(envFile, key).run();
210601
+ var keypair = function(envFile, key, envKeysFile = null) {
210602
+ const keypairs = new Keypair(envFile, envKeysFile).run();
210603
+ if (key) {
210604
+ return keypairs[key];
210605
+ } else {
210606
+ return keypairs;
210607
+ }
210280
210608
  };
210281
210609
  module.exports = {
210282
210610
  config,
210283
210611
  parse: parse4,
210612
+ set,
210284
210613
  ls,
210285
210614
  keypair,
210286
210615
  genexample,
@@ -218072,7 +218401,7 @@ var require_lib4 = __commonJS((exports, module) => {
218072
218401
  var rRel = new RegExp(`^\\.${rSlash.source}`);
218073
218402
  var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
218074
218403
  var getPathInfo2 = (cmd2, {
218075
- path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.Skojjx1piL:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
218404
+ path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.FXOsdiUQc4:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
218076
218405
  pathExt: optPathExt = process.env.PATHEXT,
218077
218406
  delimiter: optDelimiter = delimiter
218078
218407
  }) => {
@@ -218276,7 +218605,7 @@ var require_lib5 = __commonJS((exports, module) => {
218276
218605
  let pathToInitial;
218277
218606
  try {
218278
218607
  pathToInitial = which.sync(initialCmd, {
218279
- path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.Skojjx1piL:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
218608
+ path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.FXOsdiUQc4:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
218280
218609
  pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
218281
218610
  }).toLowerCase();
218282
218611
  } catch (err) {
@@ -218993,7 +219322,7 @@ var require_lib6 = __commonJS((exports, module) => {
218993
219322
  var rRel = new RegExp(`^\\.${rSlash.source}`);
218994
219323
  var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
218995
219324
  var getPathInfo2 = (cmd2, {
218996
- path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.Skojjx1piL:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
219325
+ path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.FXOsdiUQc4:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
218997
219326
  pathExt: optPathExt = process.env.PATHEXT,
218998
219327
  delimiter: optDelimiter = delimiter
218999
219328
  }) => {
@@ -234884,7 +235213,7 @@ var require_which2 = __commonJS((exports, module) => {
234884
235213
  const colon = opt2.colon || COLON;
234885
235214
  const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
234886
235215
  ...isWindows2 ? [process.cwd()] : [],
234887
- ...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.Skojjx1piL:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
235216
+ ...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.FXOsdiUQc4:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
234888
235217
  ];
234889
235218
  const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
234890
235219
  const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
@@ -256637,16 +256966,20 @@ export const { client: hasuraClient, graphql: hasuraGraphql } = createHasuraClie
256637
256966
  adminSecret: process.env.SETTLEMINT_HASURA_ADMIN_SECRET ?? "", // undefined in browser, by design to not leak the secrets
256638
256967
  });`;
256639
256968
  await writeTemplate(hasuraTemplate, "/lib/settlemint", "hasura.ts");
256640
- const drizzleTemplate = `import { createDrizzleClient } from "@settlemint/sdk-hasura/drizzle";
256641
-
256642
- export const db = createDrizzleClient({
256643
- databaseUrl: process.env.SETTLEMINT_HASURA_DATABASE_URL ?? "",
256644
- maxPoolSize: Number(process.env.SETTLEMINT_HASURA_DATABASE_MAX_POOL_SIZE),
256645
- idleTimeoutMillis: Number(process.env.SETTLEMINT_HASURA_DATABASE_IDLE_TIMEOUT),
256646
- connectionTimeoutMillis: Number(process.env.SETTLEMINT_HASURA_DATABASE_CONNECTION_TIMEOUT),
256647
- maxRetries: Number(process.env.SETTLEMINT_HASURA_DATABASE_MAX_RETRIES),
256648
- retryDelayMs: Number(process.env.SETTLEMINT_HASURA_DATABASE_RETRY_DELAY),
256649
- });`;
256969
+ const drizzleTemplate = `import { createDrizzleClient } from '@settlemint/sdk-hasura/drizzle';
256970
+
256971
+ let cachedDrizzleClient: ReturnType<typeof createDrizzleClient> | undefined;
256972
+
256973
+ export const drizzleClient = (schemas: Record<string, unknown>) => {
256974
+ if (!cachedDrizzleClient) {
256975
+ cachedDrizzleClient = createDrizzleClient({
256976
+ databaseUrl: process.env.SETTLEMINT_HASURA_DATABASE_URL ?? '',
256977
+ schemas,
256978
+ });
256979
+ }
256980
+ return cachedDrizzleClient;
256981
+ };
256982
+ `;
256650
256983
  await writeTemplate(drizzleTemplate, "/lib/settlemint", "drizzle.ts");
256651
256984
  if (!databaseUrl) {
256652
256985
  console.warn("[Codegen] Missing database environment variables");
@@ -267513,10 +267846,7 @@ async function codegenTheGraph(env2, subgraphNames) {
267513
267846
  if (!accessToken) {
267514
267847
  return;
267515
267848
  }
267516
- const template = [
267517
- `import { createTheGraphClient } from "@settlemint/sdk-thegraph";`,
267518
- `import type { introspection } from "@schemas/the-graph-env"`
267519
- ];
267849
+ const template = [`import { createTheGraphClient } from "@settlemint/sdk-thegraph";`];
267520
267850
  const toGenerate = gqlEndpoints.filter((gqlEndpoint) => {
267521
267851
  const name2 = gqlEndpoint.split("/").pop();
267522
267852
  if (!name2) {
@@ -267526,6 +267856,7 @@ async function codegenTheGraph(env2, subgraphNames) {
267526
267856
  note(`[SKIPPED] Generating TheGraph subgraph ${name2}`);
267527
267857
  return false;
267528
267858
  }
267859
+ template.push(`import type { introspection as ${name2}Introspection } from "@schemas/the-graph-env-${name2}"`);
267529
267860
  return true;
267530
267861
  });
267531
267862
  for (const gqlEndpoint of toGenerate) {
@@ -267543,7 +267874,7 @@ async function codegenTheGraph(env2, subgraphNames) {
267543
267874
  template.push(...[
267544
267875
  `
267545
267876
  export const { client: theGraphClient${nameSuffix}, graphql: theGraphGraphql${nameSuffix} } = createTheGraphClient<{
267546
- introspection: introspection;
267877
+ introspection: ${name2}Introspection;
267547
267878
  disableMasking: true;
267548
267879
  scalars: {
267549
267880
  DateTime: Date;
@@ -271643,7 +271974,7 @@ var MiddlewareFragment = graphql(`
271643
271974
  }
271644
271975
  ... on HAGraphMiddleware {
271645
271976
  specVersion
271646
- subgraphs {
271977
+ subgraphs(noCache: $noCache) {
271647
271978
  name
271648
271979
  graphqlQueryEndpoint {
271649
271980
  displayValue
@@ -271654,7 +271985,7 @@ var MiddlewareFragment = graphql(`
271654
271985
  }
271655
271986
  `);
271656
271987
  var getMiddlewares = graphql(`
271657
- query getMiddlewares($id: ID!) {
271988
+ query getMiddlewares($id: ID!, $noCache: Boolean = false) {
271658
271989
  middlewares(applicationId: $id) {
271659
271990
  items {
271660
271991
  ...Middleware
@@ -271662,7 +271993,7 @@ query getMiddlewares($id: ID!) {
271662
271993
  }
271663
271994
  }`, [MiddlewareFragment]);
271664
271995
  var getMiddleware = graphql(`
271665
- query getMiddleware($id: ID!) {
271996
+ query getMiddleware($id: ID!, $noCache: Boolean = true) {
271666
271997
  middleware(entityId: $id) {
271667
271998
  ...Middleware
271668
271999
  }
@@ -271683,6 +272014,7 @@ var createMiddleware = graphql(`
271683
272014
  $loadBalancerId: ID
271684
272015
  $abis: [SmartContractPortalMiddlewareAbiInputDto!]
271685
272016
  $includePredeployedAbis: [String!]
272017
+ $noCache: Boolean = false
271686
272018
  ) {
271687
272019
  createMiddleware(
271688
272020
  applicationId: $applicationId
@@ -271704,7 +272036,7 @@ var createMiddleware = graphql(`
271704
272036
  }
271705
272037
  `, [MiddlewareFragment]);
271706
272038
  var restartMiddleware = graphql(`
271707
- mutation RestartMiddleware($id: ID!) {
272039
+ mutation RestartMiddleware($id: ID!, $noCache: Boolean = false) {
271708
272040
  restartMiddleware(entityId: $id) {
271709
272041
  ...Middleware
271710
272042
  }
@@ -272930,7 +273262,7 @@ function connectCommand() {
272930
273262
  var package_default = {
272931
273263
  name: "@settlemint/sdk-cli",
272932
273264
  description: "SettleMint SDK, integrate SettleMint into your application with ease.",
272933
- version: "0.6.50",
273265
+ version: "0.6.51-main6b1a716",
272934
273266
  type: "module",
272935
273267
  private: false,
272936
273268
  license: "FSL-1.1-MIT",
@@ -272981,8 +273313,8 @@ var package_default = {
272981
273313
  "@inquirer/input": "4.1.0",
272982
273314
  "@inquirer/password": "4.0.3",
272983
273315
  "@inquirer/select": "4.0.3",
272984
- "@settlemint/sdk-js": "0.6.50",
272985
- "@settlemint/sdk-utils": "0.6.50",
273316
+ "@settlemint/sdk-js": "0.6.51-main6b1a716",
273317
+ "@settlemint/sdk-utils": "0.6.51-main6b1a716",
272986
273318
  "get-tsconfig": "4.8.1",
272987
273319
  giget: "1.2.3"
272988
273320
  },
@@ -276100,4 +276432,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
276100
276432
  cancel2(reason);
276101
276433
  });
276102
276434
 
276103
- //# debugId=0C682A8C45A7CDC564756E2164756E21
276435
+ //# debugId=BC35458095FC0EF564756E2164756E21