@postman-cse/onboarding-repo-sync 2.1.2 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/action.cjs CHANGED
@@ -58521,10 +58521,10 @@ var require_internet = __commonJS({
58521
58521
  }
58522
58522
  }
58523
58523
  };
58524
- self2.mac = function(sep4) {
58524
+ self2.mac = function(sep5) {
58525
58525
  var i, mac = "", validSep = ":";
58526
- if (["-", ""].indexOf(sep4) !== -1) {
58527
- validSep = sep4;
58526
+ if (["-", ""].indexOf(sep5) !== -1) {
58527
+ validSep = sep5;
58528
58528
  }
58529
58529
  for (i = 0; i < 12; i++) {
58530
58530
  mac += faker.datatype.number(15).toString(16);
@@ -104276,10 +104276,10 @@ var require_resolve_block_map = __commonJS({
104276
104276
  let offset = bm.offset;
104277
104277
  let commentEnd = null;
104278
104278
  for (const collItem of bm.items) {
104279
- const { start, key, sep: sep4, value } = collItem;
104279
+ const { start, key, sep: sep5, value } = collItem;
104280
104280
  const keyProps = resolveProps.resolveProps(start, {
104281
104281
  indicator: "explicit-key-ind",
104282
- next: key ?? sep4?.[0],
104282
+ next: key ?? sep5?.[0],
104283
104283
  offset,
104284
104284
  onError,
104285
104285
  parentIndent: bm.indent,
@@ -104293,7 +104293,7 @@ var require_resolve_block_map = __commonJS({
104293
104293
  else if ("indent" in key && key.indent !== bm.indent)
104294
104294
  onError(offset, "BAD_INDENT", startColMsg);
104295
104295
  }
104296
- if (!keyProps.anchor && !keyProps.tag && !sep4) {
104296
+ if (!keyProps.anchor && !keyProps.tag && !sep5) {
104297
104297
  commentEnd = keyProps.end;
104298
104298
  if (keyProps.comment) {
104299
104299
  if (map.comment)
@@ -104317,7 +104317,7 @@ var require_resolve_block_map = __commonJS({
104317
104317
  ctx.atKey = false;
104318
104318
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
104319
104319
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
104320
- const valueProps = resolveProps.resolveProps(sep4 ?? [], {
104320
+ const valueProps = resolveProps.resolveProps(sep5 ?? [], {
104321
104321
  indicator: "map-value-ind",
104322
104322
  next: value,
104323
104323
  offset: keyNode.range[2],
@@ -104333,7 +104333,7 @@ var require_resolve_block_map = __commonJS({
104333
104333
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
104334
104334
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
104335
104335
  }
104336
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep4, null, valueProps, onError);
104336
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep5, null, valueProps, onError);
104337
104337
  if (ctx.schema.compat)
104338
104338
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
104339
104339
  offset = valueNode.range[2];
@@ -104424,7 +104424,7 @@ var require_resolve_end = __commonJS({
104424
104424
  let comment = "";
104425
104425
  if (end) {
104426
104426
  let hasSpace = false;
104427
- let sep4 = "";
104427
+ let sep5 = "";
104428
104428
  for (const token of end) {
104429
104429
  const { source, type } = token;
104430
104430
  switch (type) {
@@ -104438,13 +104438,13 @@ var require_resolve_end = __commonJS({
104438
104438
  if (!comment)
104439
104439
  comment = cb;
104440
104440
  else
104441
- comment += sep4 + cb;
104442
- sep4 = "";
104441
+ comment += sep5 + cb;
104442
+ sep5 = "";
104443
104443
  break;
104444
104444
  }
104445
104445
  case "newline":
104446
104446
  if (comment)
104447
- sep4 += source;
104447
+ sep5 += source;
104448
104448
  hasSpace = true;
104449
104449
  break;
104450
104450
  default:
@@ -104487,18 +104487,18 @@ var require_resolve_flow_collection = __commonJS({
104487
104487
  let offset = fc.offset + fc.start.source.length;
104488
104488
  for (let i = 0; i < fc.items.length; ++i) {
104489
104489
  const collItem = fc.items[i];
104490
- const { start, key, sep: sep4, value } = collItem;
104490
+ const { start, key, sep: sep5, value } = collItem;
104491
104491
  const props = resolveProps.resolveProps(start, {
104492
104492
  flow: fcName,
104493
104493
  indicator: "explicit-key-ind",
104494
- next: key ?? sep4?.[0],
104494
+ next: key ?? sep5?.[0],
104495
104495
  offset,
104496
104496
  onError,
104497
104497
  parentIndent: fc.indent,
104498
104498
  startOnNewline: false
104499
104499
  });
104500
104500
  if (!props.found) {
104501
- if (!props.anchor && !props.tag && !sep4 && !value) {
104501
+ if (!props.anchor && !props.tag && !sep5 && !value) {
104502
104502
  if (i === 0 && props.comma)
104503
104503
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
104504
104504
  else if (i < fc.items.length - 1)
@@ -104552,8 +104552,8 @@ var require_resolve_flow_collection = __commonJS({
104552
104552
  }
104553
104553
  }
104554
104554
  }
104555
- if (!isMap && !sep4 && !props.found) {
104556
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep4, null, props, onError);
104555
+ if (!isMap && !sep5 && !props.found) {
104556
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep5, null, props, onError);
104557
104557
  coll.items.push(valueNode);
104558
104558
  offset = valueNode.range[2];
104559
104559
  if (isBlock(value))
@@ -104565,7 +104565,7 @@ var require_resolve_flow_collection = __commonJS({
104565
104565
  if (isBlock(key))
104566
104566
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
104567
104567
  ctx.atKey = false;
104568
- const valueProps = resolveProps.resolveProps(sep4 ?? [], {
104568
+ const valueProps = resolveProps.resolveProps(sep5 ?? [], {
104569
104569
  flow: fcName,
104570
104570
  indicator: "map-value-ind",
104571
104571
  next: value,
@@ -104576,8 +104576,8 @@ var require_resolve_flow_collection = __commonJS({
104576
104576
  });
104577
104577
  if (valueProps.found) {
104578
104578
  if (!isMap && !props.found && ctx.options.strict) {
104579
- if (sep4)
104580
- for (const st of sep4) {
104579
+ if (sep5)
104580
+ for (const st of sep5) {
104581
104581
  if (st === valueProps.found)
104582
104582
  break;
104583
104583
  if (st.type === "newline") {
@@ -104594,7 +104594,7 @@ var require_resolve_flow_collection = __commonJS({
104594
104594
  else
104595
104595
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
104596
104596
  }
104597
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep4, null, valueProps, onError) : null;
104597
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep5, null, valueProps, onError) : null;
104598
104598
  if (valueNode) {
104599
104599
  if (isBlock(value))
104600
104600
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -104774,7 +104774,7 @@ var require_resolve_block_scalar = __commonJS({
104774
104774
  chompStart = i + 1;
104775
104775
  }
104776
104776
  let value = "";
104777
- let sep4 = "";
104777
+ let sep5 = "";
104778
104778
  let prevMoreIndented = false;
104779
104779
  for (let i = 0; i < contentStart; ++i)
104780
104780
  value += lines[i][0].slice(trimIndent) + "\n";
@@ -104791,24 +104791,24 @@ var require_resolve_block_scalar = __commonJS({
104791
104791
  indent = "";
104792
104792
  }
104793
104793
  if (type === Scalar.Scalar.BLOCK_LITERAL) {
104794
- value += sep4 + indent.slice(trimIndent) + content;
104795
- sep4 = "\n";
104794
+ value += sep5 + indent.slice(trimIndent) + content;
104795
+ sep5 = "\n";
104796
104796
  } else if (indent.length > trimIndent || content[0] === " ") {
104797
- if (sep4 === " ")
104798
- sep4 = "\n";
104799
- else if (!prevMoreIndented && sep4 === "\n")
104800
- sep4 = "\n\n";
104801
- value += sep4 + indent.slice(trimIndent) + content;
104802
- sep4 = "\n";
104797
+ if (sep5 === " ")
104798
+ sep5 = "\n";
104799
+ else if (!prevMoreIndented && sep5 === "\n")
104800
+ sep5 = "\n\n";
104801
+ value += sep5 + indent.slice(trimIndent) + content;
104802
+ sep5 = "\n";
104803
104803
  prevMoreIndented = true;
104804
104804
  } else if (content === "") {
104805
- if (sep4 === "\n")
104805
+ if (sep5 === "\n")
104806
104806
  value += "\n";
104807
104807
  else
104808
- sep4 = "\n";
104808
+ sep5 = "\n";
104809
104809
  } else {
104810
- value += sep4 + content;
104811
- sep4 = " ";
104810
+ value += sep5 + content;
104811
+ sep5 = " ";
104812
104812
  prevMoreIndented = false;
104813
104813
  }
104814
104814
  }
@@ -104990,25 +104990,25 @@ var require_resolve_flow_scalar = __commonJS({
104990
104990
  if (!match)
104991
104991
  return source;
104992
104992
  let res = match[1];
104993
- let sep4 = " ";
104993
+ let sep5 = " ";
104994
104994
  let pos = first.lastIndex;
104995
104995
  line.lastIndex = pos;
104996
104996
  while (match = line.exec(source)) {
104997
104997
  if (match[1] === "") {
104998
- if (sep4 === "\n")
104999
- res += sep4;
104998
+ if (sep5 === "\n")
104999
+ res += sep5;
105000
105000
  else
105001
- sep4 = "\n";
105001
+ sep5 = "\n";
105002
105002
  } else {
105003
- res += sep4 + match[1];
105004
- sep4 = " ";
105003
+ res += sep5 + match[1];
105004
+ sep5 = " ";
105005
105005
  }
105006
105006
  pos = line.lastIndex;
105007
105007
  }
105008
105008
  const last = /[ \t]*(.*)/sy;
105009
105009
  last.lastIndex = pos;
105010
105010
  match = last.exec(source);
105011
- return res + sep4 + (match?.[1] ?? "");
105011
+ return res + sep5 + (match?.[1] ?? "");
105012
105012
  }
105013
105013
  function doubleQuotedValue(source, onError) {
105014
105014
  let res = "";
@@ -105818,14 +105818,14 @@ var require_cst_stringify = __commonJS({
105818
105818
  }
105819
105819
  }
105820
105820
  }
105821
- function stringifyItem({ start, key, sep: sep4, value }) {
105821
+ function stringifyItem({ start, key, sep: sep5, value }) {
105822
105822
  let res = "";
105823
105823
  for (const st of start)
105824
105824
  res += st.source;
105825
105825
  if (key)
105826
105826
  res += stringifyToken(key);
105827
- if (sep4)
105828
- for (const st of sep4)
105827
+ if (sep5)
105828
+ for (const st of sep5)
105829
105829
  res += st.source;
105830
105830
  if (value)
105831
105831
  res += stringifyToken(value);
@@ -106992,18 +106992,18 @@ var require_parser2 = __commonJS({
106992
106992
  if (this.type === "map-value-ind") {
106993
106993
  const prev = getPrevProps(this.peek(2));
106994
106994
  const start = getFirstKeyStartProps(prev);
106995
- let sep4;
106995
+ let sep5;
106996
106996
  if (scalar.end) {
106997
- sep4 = scalar.end;
106998
- sep4.push(this.sourceToken);
106997
+ sep5 = scalar.end;
106998
+ sep5.push(this.sourceToken);
106999
106999
  delete scalar.end;
107000
107000
  } else
107001
- sep4 = [this.sourceToken];
107001
+ sep5 = [this.sourceToken];
107002
107002
  const map = {
107003
107003
  type: "block-map",
107004
107004
  offset: scalar.offset,
107005
107005
  indent: scalar.indent,
107006
- items: [{ start, key: scalar, sep: sep4 }]
107006
+ items: [{ start, key: scalar, sep: sep5 }]
107007
107007
  };
107008
107008
  this.onKeyLine = true;
107009
107009
  this.stack[this.stack.length - 1] = map;
@@ -107156,15 +107156,15 @@ var require_parser2 = __commonJS({
107156
107156
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
107157
107157
  const start2 = getFirstKeyStartProps(it.start);
107158
107158
  const key = it.key;
107159
- const sep4 = it.sep;
107160
- sep4.push(this.sourceToken);
107159
+ const sep5 = it.sep;
107160
+ sep5.push(this.sourceToken);
107161
107161
  delete it.key;
107162
107162
  delete it.sep;
107163
107163
  this.stack.push({
107164
107164
  type: "block-map",
107165
107165
  offset: this.offset,
107166
107166
  indent: this.indent,
107167
- items: [{ start: start2, key, sep: sep4 }]
107167
+ items: [{ start: start2, key, sep: sep5 }]
107168
107168
  });
107169
107169
  } else if (start.length > 0) {
107170
107170
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -107358,13 +107358,13 @@ var require_parser2 = __commonJS({
107358
107358
  const prev = getPrevProps(parent);
107359
107359
  const start = getFirstKeyStartProps(prev);
107360
107360
  fixFlowSeqItems(fc);
107361
- const sep4 = fc.end.splice(1, fc.end.length);
107362
- sep4.push(this.sourceToken);
107361
+ const sep5 = fc.end.splice(1, fc.end.length);
107362
+ sep5.push(this.sourceToken);
107363
107363
  const map = {
107364
107364
  type: "block-map",
107365
107365
  offset: fc.offset,
107366
107366
  indent: fc.indent,
107367
- items: [{ start, key: fc, sep: sep4 }]
107367
+ items: [{ start, key: fc, sep: sep5 }]
107368
107368
  };
107369
107369
  this.onKeyLine = true;
107370
107370
  this.stack[this.stack.length - 1] = map;
@@ -124779,8 +124779,8 @@ function writeFlowMapping(state, level, node) {
124779
124779
  if (explicitPair) pairBuffer += "? ";
124780
124780
  else if (state.quoteFlowKeys) pairBuffer += '"';
124781
124781
  const valueText = writeNode(state, level, value, {});
124782
- const sep4 = state.flowSkipColonSpace || valueText === "" ? "" : " ";
124783
- pairBuffer += `${keyText}${state.quoteFlowKeys && !explicitPair ? '"' : ""}:${sep4}${valueText}`;
124782
+ const sep5 = state.flowSkipColonSpace || valueText === "" ? "" : " ";
124783
+ pairBuffer += `${keyText}${state.quoteFlowKeys && !explicitPair ? '"' : ""}:${sep5}${valueText}`;
124784
124784
  result += pairBuffer;
124785
124785
  }
124786
124786
  const pad = state.flowBracketPadding && result !== "" ? " " : "";
@@ -124877,8 +124877,8 @@ function writeNode(state, level, node, ctx) {
124877
124877
  if (anchor !== null) props.push(anchor);
124878
124878
  if (tag !== null) props.push(tag);
124879
124879
  }
124880
- const sep4 = body === "" || body.charCodeAt(0) === CHAR_LINE_FEED ? "" : " ";
124881
- body = `${props.join(" ")}${sep4}${body}`;
124880
+ const sep5 = body === "" || body.charCodeAt(0) === CHAR_LINE_FEED ? "" : " ";
124881
+ body = `${props.join(" ")}${sep5}${body}`;
124882
124882
  }
124883
124883
  return body;
124884
124884
  }
@@ -124923,8 +124923,8 @@ function present(documents, options) {
124923
124923
  block: true,
124924
124924
  compact: true
124925
124925
  });
124926
- const sep4 = body === "" ? "" : hasDirectives || rootStartsOwnLine(doc.contents) ? "\n" : " ";
124927
- result += `---${sep4}${body}
124926
+ const sep5 = body === "" ? "" : hasDirectives || rootStartsOwnLine(doc.contents) ? "\n" : " ";
124927
+ result += `---${sep5}${body}
124928
124928
  `;
124929
124929
  } else result += writeNode(state, 0, doc.contents, {
124930
124930
  block: true,
@@ -125049,9 +125049,47 @@ function structuredCloneSafe(value) {
125049
125049
  if (typeof structuredClone === "function") return structuredClone(value);
125050
125050
  return JSON.parse(JSON.stringify(value));
125051
125051
  }
125052
+ async function listFilesRelative(dir, base) {
125053
+ let entries;
125054
+ try {
125055
+ entries = await fs3.readdir(dir, { withFileTypes: true });
125056
+ } catch {
125057
+ return [];
125058
+ }
125059
+ const out = [];
125060
+ for (const entry of entries) {
125061
+ const abs = path6.join(dir, entry.name);
125062
+ if (entry.isDirectory()) {
125063
+ out.push(...await listFilesRelative(abs, base));
125064
+ } else if (entry.isFile()) {
125065
+ out.push(path6.relative(base, abs).split(path6.sep).join("/"));
125066
+ }
125067
+ }
125068
+ return out;
125069
+ }
125070
+ async function pruneEmptyDirs(dir) {
125071
+ let entries;
125072
+ try {
125073
+ entries = await fs3.readdir(dir, { withFileTypes: true });
125074
+ } catch {
125075
+ return;
125076
+ }
125077
+ for (const entry of entries) {
125078
+ if (entry.isDirectory()) {
125079
+ const child2 = path6.join(dir, entry.name);
125080
+ await pruneEmptyDirs(child2);
125081
+ try {
125082
+ await fs3.rmdir(child2);
125083
+ } catch {
125084
+ }
125085
+ }
125086
+ }
125087
+ }
125052
125088
  async function writeSplitCollection(v32, outputDir) {
125053
125089
  const { files, rootPath } = await (0, import_v32.splitCollection)(v32);
125054
125090
  await fs3.mkdir(outputDir, { recursive: true });
125091
+ const preexisting = new Set(await listFilesRelative(outputDir, outputDir));
125092
+ const written = /* @__PURE__ */ new Set();
125055
125093
  for (const file of files) {
125056
125094
  let rel = file.path;
125057
125095
  if (rootPath && rel.startsWith(rootPath)) {
@@ -125062,7 +125100,13 @@ async function writeSplitCollection(v32, outputDir) {
125062
125100
  const dest = path6.join(outputDir, rel);
125063
125101
  await fs3.mkdir(path6.dirname(dest), { recursive: true });
125064
125102
  await fs3.writeFile(dest, file.content, "utf8");
125103
+ written.add(rel.split(path6.sep).join("/"));
125104
+ }
125105
+ for (const rel of preexisting) {
125106
+ if (written.has(rel)) continue;
125107
+ await fs3.rm(path6.join(outputDir, rel), { force: true });
125065
125108
  }
125109
+ await pruneEmptyDirs(outputDir);
125066
125110
  }
125067
125111
 
125068
125112
  // src/lib/postman/base-urls.ts
@@ -128699,10 +128743,33 @@ function writeJsonFile(path9, content, normalize3 = false) {
128699
128743
  const data = normalize3 ? stripVolatileFields(content) : content;
128700
128744
  (0, import_node_fs3.writeFileSync)(path9, JSON.stringify(data, null, 2));
128701
128745
  }
128702
- function buildResourcesManifest(workspaceId, collectionMap, envMap, artifactDir, localSpecRefs, mappedSpecRef, specId) {
128703
- const manifest = {
128704
- workspace: { id: workspaceId }
128705
- };
128746
+ function buildMappedSpecCloudKey(mappedSource, specSyncMode, releaseLabel) {
128747
+ if (specSyncMode !== "version") {
128748
+ return mappedSource;
128749
+ }
128750
+ const normalized = normalizeReleaseLabel(releaseLabel || "");
128751
+ if (!normalized) {
128752
+ return void 0;
128753
+ }
128754
+ return `${mappedSource}#release=${normalized}`;
128755
+ }
128756
+ function resolveDurableWorkspaceId(options) {
128757
+ const { candidateId, priorId, workspaceLinkEnabled, workspaceLinkStatus } = options;
128758
+ const candidate = candidateId.trim();
128759
+ const prior = priorId?.trim() || void 0;
128760
+ if (!workspaceLinkEnabled) {
128761
+ return candidate || prior;
128762
+ }
128763
+ if (workspaceLinkStatus === "success") {
128764
+ return candidate || void 0;
128765
+ }
128766
+ return prior === candidate ? prior : void 0;
128767
+ }
128768
+ function buildResourcesManifest(workspaceId, collectionMap, envMap, artifactDir, localSpecRefs, mappedSpecRef, specId, existingSpecs) {
128769
+ const manifest = {};
128770
+ if (workspaceId) {
128771
+ manifest.workspace = { id: workspaceId };
128772
+ }
128706
128773
  const localResources = {};
128707
128774
  const cloudResources = {};
128708
128775
  const collectionKeys = Object.keys(collectionMap);
@@ -128723,8 +128790,12 @@ function buildResourcesManifest(workspaceId, collectionMap, envMap, artifactDir,
128723
128790
  if (localSpecRefs.length > 0) {
128724
128791
  localResources.specs = localSpecRefs;
128725
128792
  }
128793
+ const specs = { ...existingSpecs || {} };
128726
128794
  if (mappedSpecRef && specId) {
128727
- cloudResources.specs = { [mappedSpecRef]: specId };
128795
+ specs[mappedSpecRef] = specId;
128796
+ }
128797
+ if (Object.keys(specs).length > 0) {
128798
+ cloudResources.specs = specs;
128728
128799
  }
128729
128800
  if (Object.keys(localResources).length > 0) {
128730
128801
  manifest.localResources = localResources;
@@ -128773,8 +128844,8 @@ function assertPathWithinCwd(targetPath, fieldName) {
128773
128844
  }
128774
128845
  const base = (0, import_node_fs3.realpathSync)(process.cwd());
128775
128846
  const resolved = path8.resolve(base, rawPath);
128776
- const relative3 = path8.relative(base, resolved);
128777
- if (relative3.startsWith("..") || path8.isAbsolute(relative3)) {
128847
+ const relative4 = path8.relative(base, resolved);
128848
+ if (relative4.startsWith("..") || path8.isAbsolute(relative4)) {
128778
128849
  throw new Error(`${fieldName} must stay within the repository root; received ${targetPath}`);
128779
128850
  }
128780
128851
  let existingPath = resolved;
@@ -128791,7 +128862,7 @@ function assertPathWithinCwd(targetPath, fieldName) {
128791
128862
  throw new Error(`${fieldName} must stay within the repository root; received ${targetPath}`);
128792
128863
  }
128793
128864
  }
128794
- async function exportArtifacts(inputs, dependencies, envUids, assetProjectName) {
128865
+ async function exportArtifacts(inputs, dependencies, envUids, assetProjectName, options) {
128795
128866
  if (!inputs.workspaceId) {
128796
128867
  return;
128797
128868
  }
@@ -128825,6 +128896,11 @@ async function exportArtifacts(inputs, dependencies, envUids, assetProjectName)
128825
128896
  const manifestCollections = {};
128826
128897
  const discoveredSpecs = scanLocalSpecReferences();
128827
128898
  const mappedSpec = resolveMappedSpecReference(inputs.specPath, discoveredSpecs);
128899
+ const mappedSpecCloudKey = mappedSpec && inputs.specId ? buildMappedSpecCloudKey(
128900
+ mappedSpec.configRelativePath,
128901
+ inputs.specSyncMode,
128902
+ options.releaseLabel
128903
+ ) : void 0;
128828
128904
  if (inputs.baselineCollectionId) {
128829
128905
  const col = await dependencies.postman.getCollection(inputs.baselineCollectionId);
128830
128906
  const dirName = getCollectionDirectoryName("Baseline", assetProjectName);
@@ -128850,14 +128926,21 @@ async function exportArtifacts(inputs, dependencies, envUids, assetProjectName)
128850
128926
  true
128851
128927
  );
128852
128928
  }
128929
+ const durableWorkspaceId = resolveDurableWorkspaceId({
128930
+ candidateId: inputs.workspaceId,
128931
+ priorId: options.priorWorkspaceId,
128932
+ workspaceLinkEnabled: inputs.workspaceLinkEnabled,
128933
+ workspaceLinkStatus: options.workspaceLinkStatus
128934
+ });
128853
128935
  (0, import_node_fs3.writeFileSync)(".postman/resources.yaml", buildResourcesManifest(
128854
- inputs.workspaceId,
128936
+ durableWorkspaceId,
128855
128937
  manifestCollections,
128856
128938
  envUids,
128857
128939
  inputs.artifactDir,
128858
128940
  discoveredSpecs.map((spec) => spec.configRelativePath),
128859
- mappedSpec?.configRelativePath,
128860
- inputs.specId || void 0
128941
+ mappedSpecCloudKey,
128942
+ inputs.specId || void 0,
128943
+ options.existingSpecs
128861
128944
  ));
128862
128945
  if (mappedSpec && Object.keys(manifestCollections).length > 0) {
128863
128946
  (0, import_node_fs3.writeFileSync)(
@@ -129116,7 +129199,12 @@ async function runRepoSyncInner(inputs, dependencies) {
129116
129199
  );
129117
129200
  }
129118
129201
  }
129119
- await exportArtifacts(inputs, dependencies, envUids, assetProjectName);
129202
+ await exportArtifacts(inputs, dependencies, envUids, assetProjectName, {
129203
+ workspaceLinkStatus: outputs["workspace-link-status"],
129204
+ priorWorkspaceId: resourcesState?.workspace?.id,
129205
+ existingSpecs: resourcesState?.cloudResources?.specs,
129206
+ releaseLabel
129207
+ });
129120
129208
  const commit = await commitAndPushGeneratedFiles(inputs, dependencies);
129121
129209
  outputs["commit-sha"] = commit.commitSha;
129122
129210
  if (commit.resolvedCurrentRef) {