@uipath/api-workflow-tool 1.206.0-preview.303 → 1.207.0-preview.305

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.
@@ -1,6 +1,5 @@
1
1
  import {
2
2
  getFileSystem,
3
- RESULTS,
4
3
  Option,
5
4
  logger,
6
5
  SuccessOutput,
@@ -14,22 +13,23 @@ import {
14
13
  mapPackageMetadataOptions,
15
14
  quoteForShell,
16
15
  unsupportedSolutionProjectType
17
- } from "./packager-tool-3hmfzeg0.js";
16
+ } from "./packager-tool-pyp8tym0.js";
18
17
  import {
19
18
  PROJECT_IDENTITY_LOOKUP_BUDGET_MS,
20
19
  withinProjectIdentityBudget,
21
20
  catchError,
21
+ RESULTS,
22
22
  getSdkUserAgentToken,
23
23
  addSdkUserAgentHeader,
24
24
  installSdkUserAgentHeader
25
- } from "./packager-tool-qhv22qaj.js";
25
+ } from "./packager-tool-y9sda1br.js";
26
26
  import {
27
27
  getAuthContext,
28
28
  WorkflowRunService
29
- } from "./packager-tool-rph3pq68.js";
29
+ } from "./packager-tool-bwfnc2ak.js";
30
30
  import {
31
31
  registerPackagerFactories2
32
- } from "./packager-tool-rqprykf5.js";
32
+ } from "./packager-tool-ryk871db.js";
33
33
  import {
34
34
  yaml
35
35
  } from "./packager-tool-5gce5wfd.js";
@@ -7479,7 +7479,7 @@ var package_default = {
7479
7479
  name: "@uipath/api-workflow-tool",
7480
7480
  author: "UiPath",
7481
7481
  license: "SEE LICENSE IN LICENSE.txt",
7482
- version: "1.206.0-preview.303",
7482
+ version: "1.207.0-preview.305",
7483
7483
  description: "Run UiPath API Workflows locally.",
7484
7484
  private: false,
7485
7485
  repository: {
@@ -8082,12 +8082,232 @@ class TextApiResponse {
8082
8082
  return await this.raw.text();
8083
8083
  }
8084
8084
  }
8085
+
8086
+ // ../integrationservice-sdk/generated/folder-auth/src/runtime.ts
8087
+ var BASE_PATH3 = "https://alpha.uipath.com/entity/Azure/elements_".replace(/\/+$/, "");
8088
+
8089
+ class Configuration3 {
8090
+ configuration;
8091
+ constructor(configuration = {}) {
8092
+ this.configuration = configuration;
8093
+ }
8094
+ set config(configuration) {
8095
+ this.configuration = configuration;
8096
+ }
8097
+ get basePath() {
8098
+ return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH3;
8099
+ }
8100
+ get fetchApi() {
8101
+ return this.configuration.fetchApi;
8102
+ }
8103
+ get middleware() {
8104
+ return this.configuration.middleware || [];
8105
+ }
8106
+ get queryParamsStringify() {
8107
+ return this.configuration.queryParamsStringify || querystring3;
8108
+ }
8109
+ get username() {
8110
+ return this.configuration.username;
8111
+ }
8112
+ get password() {
8113
+ return this.configuration.password;
8114
+ }
8115
+ get apiKey() {
8116
+ const apiKey = this.configuration.apiKey;
8117
+ if (apiKey) {
8118
+ return typeof apiKey === "function" ? apiKey : () => apiKey;
8119
+ }
8120
+ return;
8121
+ }
8122
+ get accessToken() {
8123
+ const accessToken = this.configuration.accessToken;
8124
+ if (accessToken) {
8125
+ return typeof accessToken === "function" ? accessToken : async () => accessToken;
8126
+ }
8127
+ return;
8128
+ }
8129
+ get headers() {
8130
+ return this.configuration.headers;
8131
+ }
8132
+ get credentials() {
8133
+ return this.configuration.credentials;
8134
+ }
8135
+ }
8136
+ var DefaultConfig3 = new Configuration3;
8137
+
8138
+ class BaseAPI3 {
8139
+ configuration;
8140
+ static jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i");
8141
+ middleware;
8142
+ constructor(configuration = DefaultConfig3) {
8143
+ this.configuration = configuration;
8144
+ this.middleware = configuration.middleware;
8145
+ }
8146
+ withMiddleware(...middlewares) {
8147
+ const next = this.clone();
8148
+ next.middleware = next.middleware.concat(...middlewares);
8149
+ return next;
8150
+ }
8151
+ withPreMiddleware(...preMiddlewares) {
8152
+ const middlewares = preMiddlewares.map((pre) => ({ pre }));
8153
+ return this.withMiddleware(...middlewares);
8154
+ }
8155
+ withPostMiddleware(...postMiddlewares) {
8156
+ const middlewares = postMiddlewares.map((post) => ({ post }));
8157
+ return this.withMiddleware(...middlewares);
8158
+ }
8159
+ isJsonMime(mime) {
8160
+ if (!mime) {
8161
+ return false;
8162
+ }
8163
+ return BaseAPI3.jsonRegex.test(mime);
8164
+ }
8165
+ async request(context, initOverrides) {
8166
+ const { url, init } = await this.createFetchParams(context, initOverrides);
8167
+ const response = await this.fetchApi(url, init);
8168
+ if (response && (response.status >= 200 && response.status < 300)) {
8169
+ return response;
8170
+ }
8171
+ throw new ResponseError3(response, "Response returned an error code");
8172
+ }
8173
+ async createFetchParams(context, initOverrides) {
8174
+ let url = this.configuration.basePath + context.path;
8175
+ if (context.query !== undefined && Object.keys(context.query).length !== 0) {
8176
+ url += "?" + this.configuration.queryParamsStringify(context.query);
8177
+ }
8178
+ const headers = Object.assign({}, this.configuration.headers, context.headers);
8179
+ Object.keys(headers).forEach((key) => headers[key] === undefined ? delete headers[key] : {});
8180
+ const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
8181
+ const initParams = {
8182
+ method: context.method,
8183
+ headers,
8184
+ body: context.body,
8185
+ credentials: this.configuration.credentials
8186
+ };
8187
+ const overriddenInit = {
8188
+ ...initParams,
8189
+ ...await initOverrideFn({
8190
+ init: initParams,
8191
+ context
8192
+ })
8193
+ };
8194
+ let body;
8195
+ if (isFormData3(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob3(overriddenInit.body)) {
8196
+ body = overriddenInit.body;
8197
+ } else if (this.isJsonMime(headers["Content-Type"])) {
8198
+ body = JSON.stringify(overriddenInit.body);
8199
+ } else {
8200
+ body = overriddenInit.body;
8201
+ }
8202
+ const init = {
8203
+ ...overriddenInit,
8204
+ body
8205
+ };
8206
+ return { url, init };
8207
+ }
8208
+ fetchApi = async (url, init) => {
8209
+ let fetchParams = { url, init };
8210
+ for (const middleware of this.middleware) {
8211
+ if (middleware.pre) {
8212
+ fetchParams = await middleware.pre({
8213
+ fetch: this.fetchApi,
8214
+ ...fetchParams
8215
+ }) || fetchParams;
8216
+ }
8217
+ }
8218
+ let response = undefined;
8219
+ try {
8220
+ response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
8221
+ } catch (e) {
8222
+ for (const middleware of this.middleware) {
8223
+ if (middleware.onError) {
8224
+ response = await middleware.onError({
8225
+ fetch: this.fetchApi,
8226
+ url: fetchParams.url,
8227
+ init: fetchParams.init,
8228
+ error: e,
8229
+ response: response ? response.clone() : undefined
8230
+ }) || response;
8231
+ }
8232
+ }
8233
+ if (response === undefined) {
8234
+ if (e instanceof Error) {
8235
+ throw new FetchError3(e, "The request failed and the interceptors did not return an alternative response");
8236
+ } else {
8237
+ throw e;
8238
+ }
8239
+ }
8240
+ }
8241
+ for (const middleware of this.middleware) {
8242
+ if (middleware.post) {
8243
+ response = await middleware.post({
8244
+ fetch: this.fetchApi,
8245
+ url: fetchParams.url,
8246
+ init: fetchParams.init,
8247
+ response: response.clone()
8248
+ }) || response;
8249
+ }
8250
+ }
8251
+ return response;
8252
+ };
8253
+ clone() {
8254
+ const constructor = this.constructor;
8255
+ const next = new constructor(this.configuration);
8256
+ next.middleware = this.middleware.slice();
8257
+ return next;
8258
+ }
8259
+ }
8260
+ function isBlob3(value) {
8261
+ return typeof Blob !== "undefined" && value instanceof Blob;
8262
+ }
8263
+ function isFormData3(value) {
8264
+ return typeof FormData !== "undefined" && value instanceof FormData;
8265
+ }
8266
+
8267
+ class ResponseError3 extends Error {
8268
+ response;
8269
+ name = "ResponseError";
8270
+ constructor(response, msg) {
8271
+ super(msg);
8272
+ this.response = response;
8273
+ }
8274
+ }
8275
+
8276
+ class FetchError3 extends Error {
8277
+ cause;
8278
+ name = "FetchError";
8279
+ constructor(cause, msg) {
8280
+ super(msg);
8281
+ this.cause = cause;
8282
+ }
8283
+ }
8284
+ function querystring3(params, prefix = "") {
8285
+ return Object.keys(params).map((key) => querystringSingleKey3(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
8286
+ }
8287
+ function querystringSingleKey3(key, value, keyPrefix = "") {
8288
+ const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
8289
+ if (value instanceof Array) {
8290
+ const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
8291
+ return `${encodeURIComponent(fullKey)}=${multiValue}`;
8292
+ }
8293
+ if (value instanceof Set) {
8294
+ const valueAsArray = Array.from(value);
8295
+ return querystringSingleKey3(key, valueAsArray, keyPrefix);
8296
+ }
8297
+ if (value instanceof Date) {
8298
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
8299
+ }
8300
+ if (value instanceof Object) {
8301
+ return querystring3(value, fullKey);
8302
+ }
8303
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
8304
+ }
8085
8305
  // ../integrationservice-sdk/package.json
8086
8306
  var package_default2 = {
8087
8307
  name: "@uipath/integrationservice-sdk",
8088
8308
  author: "UiPath",
8089
8309
  license: "SEE LICENSE IN LICENSE.txt",
8090
- version: "1.206.0-preview.303",
8310
+ version: "1.207.0-preview.305",
8091
8311
  repository: {
8092
8312
  type: "git",
8093
8313
  url: "https://github.com/UiPath/cli.git",
@@ -8146,6 +8366,7 @@ var package_default2 = {
8146
8366
  var SDK_USER_AGENT = getSdkUserAgentToken(package_default2);
8147
8367
  installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
8148
8368
  installSdkUserAgentHeader(BaseAPI2, SDK_USER_AGENT);
8369
+ installSdkUserAgentHeader(BaseAPI3, SDK_USER_AGENT);
8149
8370
  // ../integrationservice-sdk/generated/connections/src/models/AccessTokenResponse.ts
8150
8371
  function AccessTokenResponseFromJSON(json) {
8151
8372
  return AccessTokenResponseFromJSONTyped(json, false);
@@ -14960,7 +15181,7 @@ function buildActivityStub(args) {
14960
15181
  endpoint: "/http-request",
14961
15182
  bodyParameters: {
14962
15183
  authentication: connectionId ? "connector" : "manual",
14963
- method: config.httpMethod,
15184
+ method: "<REPLACE_WITH_TARGET_METHOD>",
14964
15185
  url: "<REPLACE_WITH_TARGET_URL>",
14965
15186
  headers: {},
14966
15187
  ...args.inputs ?? {}
@@ -15751,7 +15972,7 @@ Subcommands:
15751
15972
  // src/commands/packager-shared.ts
15752
15973
  async function createPackager() {
15753
15974
  registerPackagerFactories2();
15754
- const { createNodeProjectPackager } = await import("./node-8zef5nz4.js");
15975
+ const { createNodeProjectPackager } = await import("./node-e8x634mg.js");
15755
15976
  return await createNodeProjectPackager({
15756
15977
  logHandler: logger.handleLog
15757
15978
  });
@@ -15774,7 +15995,7 @@ async function setupProject(packager, projectPath) {
15774
15995
  return packager.setupAsync(absPath);
15775
15996
  }
15776
15997
  async function buildBaseOptions() {
15777
- const { ProjectPackOptions } = await import("./index-dnkq5ap1.js");
15998
+ const { ProjectPackOptions } = await import("./index-ssf0741f.js");
15778
15999
  const sdkLogLevelMap = {
15779
16000
  [0 /* DEBUG */]: "Debug" /* Debug */,
15780
16001
  [1 /* INFO */]: "Information" /* Info */,
@@ -15813,7 +16034,7 @@ async function runPackagerCommand(opts, config, capture) {
15813
16034
  if (capture && inputPath !== getFileSystem().path.resolve(opts.projectPath)) {
15814
16035
  try {
15815
16036
  const identity = await withinProjectIdentityBudget((async () => {
15816
- const { readProjectIdentity } = await import("./index-3d09whjq.js");
16037
+ const { readProjectIdentity } = await import("./index-c6a7npfj.js");
15817
16038
  return readProjectIdentity(inputPath, getFileSystem());
15818
16039
  })(), () => logger.debug(`Project identity capture skipped: no answer within ${PROJECT_IDENTITY_LOOKUP_BUDGET_MS} ms`));
15819
16040
  if (identity)
@@ -15866,9 +16087,9 @@ var registerBuildCommand = (program) => {
15866
16087
  };
15867
16088
 
15868
16089
  // ../solution-sdk/generated/src/runtime.ts
15869
- var BASE_PATH3 = "https://alpha.uipath.com/uipattycyrhx/abizon_1/automationsolutions_".replace(/\/+$/, "");
16090
+ var BASE_PATH4 = "https://alpha.uipath.com/uipattycyrhx/abizon_1/automationsolutions_".replace(/\/+$/, "");
15870
16091
 
15871
- class Configuration3 {
16092
+ class Configuration4 {
15872
16093
  configuration;
15873
16094
  constructor(configuration = {}) {
15874
16095
  this.configuration = configuration;
@@ -15877,7 +16098,7 @@ class Configuration3 {
15877
16098
  this.configuration = configuration;
15878
16099
  }
15879
16100
  get basePath() {
15880
- return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH3;
16101
+ return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH4;
15881
16102
  }
15882
16103
  get fetchApi() {
15883
16104
  return this.configuration.fetchApi;
@@ -15886,7 +16107,7 @@ class Configuration3 {
15886
16107
  return this.configuration.middleware || [];
15887
16108
  }
15888
16109
  get queryParamsStringify() {
15889
- return this.configuration.queryParamsStringify || querystring3;
16110
+ return this.configuration.queryParamsStringify || querystring4;
15890
16111
  }
15891
16112
  get username() {
15892
16113
  return this.configuration.username;
@@ -15915,13 +16136,13 @@ class Configuration3 {
15915
16136
  return this.configuration.credentials;
15916
16137
  }
15917
16138
  }
15918
- var DefaultConfig3 = new Configuration3;
16139
+ var DefaultConfig4 = new Configuration4;
15919
16140
 
15920
- class BaseAPI3 {
16141
+ class BaseAPI4 {
15921
16142
  configuration;
15922
16143
  static jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i");
15923
16144
  middleware;
15924
- constructor(configuration = DefaultConfig3) {
16145
+ constructor(configuration = DefaultConfig4) {
15925
16146
  this.configuration = configuration;
15926
16147
  this.middleware = configuration.middleware;
15927
16148
  }
@@ -15942,7 +16163,7 @@ class BaseAPI3 {
15942
16163
  if (!mime) {
15943
16164
  return false;
15944
16165
  }
15945
- return BaseAPI3.jsonRegex.test(mime);
16166
+ return BaseAPI4.jsonRegex.test(mime);
15946
16167
  }
15947
16168
  async request(context, initOverrides) {
15948
16169
  const { url, init } = await this.createFetchParams(context, initOverrides);
@@ -15950,7 +16171,7 @@ class BaseAPI3 {
15950
16171
  if (response && (response.status >= 200 && response.status < 300)) {
15951
16172
  return response;
15952
16173
  }
15953
- throw new ResponseError3(response, "Response returned an error code");
16174
+ throw new ResponseError4(response, "Response returned an error code");
15954
16175
  }
15955
16176
  async createFetchParams(context, initOverrides) {
15956
16177
  let url = this.configuration.basePath + context.path;
@@ -15974,7 +16195,7 @@ class BaseAPI3 {
15974
16195
  })
15975
16196
  };
15976
16197
  let body;
15977
- if (isFormData3(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob3(overriddenInit.body)) {
16198
+ if (isFormData4(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob4(overriddenInit.body)) {
15978
16199
  body = overriddenInit.body;
15979
16200
  } else if (this.isJsonMime(headers["Content-Type"])) {
15980
16201
  body = JSON.stringify(overriddenInit.body);
@@ -16014,7 +16235,7 @@ class BaseAPI3 {
16014
16235
  }
16015
16236
  if (response === undefined) {
16016
16237
  if (e instanceof Error) {
16017
- throw new FetchError3(e, "The request failed and the interceptors did not return an alternative response");
16238
+ throw new FetchError4(e, "The request failed and the interceptors did not return an alternative response");
16018
16239
  } else {
16019
16240
  throw e;
16020
16241
  }
@@ -16039,14 +16260,14 @@ class BaseAPI3 {
16039
16260
  return next;
16040
16261
  }
16041
16262
  }
16042
- function isBlob3(value) {
16263
+ function isBlob4(value) {
16043
16264
  return typeof Blob !== "undefined" && value instanceof Blob;
16044
16265
  }
16045
- function isFormData3(value) {
16266
+ function isFormData4(value) {
16046
16267
  return typeof FormData !== "undefined" && value instanceof FormData;
16047
16268
  }
16048
16269
 
16049
- class ResponseError3 extends Error {
16270
+ class ResponseError4 extends Error {
16050
16271
  response;
16051
16272
  name = "ResponseError";
16052
16273
  constructor(response, msg) {
@@ -16055,7 +16276,7 @@ class ResponseError3 extends Error {
16055
16276
  }
16056
16277
  }
16057
16278
 
16058
- class FetchError3 extends Error {
16279
+ class FetchError4 extends Error {
16059
16280
  cause;
16060
16281
  name = "FetchError";
16061
16282
  constructor(cause, msg) {
@@ -16063,10 +16284,10 @@ class FetchError3 extends Error {
16063
16284
  this.cause = cause;
16064
16285
  }
16065
16286
  }
16066
- function querystring3(params, prefix = "") {
16067
- return Object.keys(params).map((key) => querystringSingleKey3(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
16287
+ function querystring4(params, prefix = "") {
16288
+ return Object.keys(params).map((key) => querystringSingleKey4(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
16068
16289
  }
16069
- function querystringSingleKey3(key, value, keyPrefix = "") {
16290
+ function querystringSingleKey4(key, value, keyPrefix = "") {
16070
16291
  const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
16071
16292
  if (value instanceof Array) {
16072
16293
  const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
@@ -16074,13 +16295,13 @@ function querystringSingleKey3(key, value, keyPrefix = "") {
16074
16295
  }
16075
16296
  if (value instanceof Set) {
16076
16297
  const valueAsArray = Array.from(value);
16077
- return querystringSingleKey3(key, valueAsArray, keyPrefix);
16298
+ return querystringSingleKey4(key, valueAsArray, keyPrefix);
16078
16299
  }
16079
16300
  if (value instanceof Date) {
16080
16301
  return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
16081
16302
  }
16082
16303
  if (value instanceof Object) {
16083
- return querystring3(value, fullKey);
16304
+ return querystring4(value, fullKey);
16084
16305
  }
16085
16306
  return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
16086
16307
  }
@@ -16089,7 +16310,7 @@ var package_default3 = {
16089
16310
  name: "@uipath/solution-sdk",
16090
16311
  author: "UiPath",
16091
16312
  license: "SEE LICENSE IN LICENSE.txt",
16092
- version: "1.206.0-preview.303",
16313
+ version: "1.207.0-preview.305",
16093
16314
  repository: {
16094
16315
  type: "git",
16095
16316
  url: "https://github.com/UiPath/cli.git",
@@ -16130,6 +16351,10 @@ var package_default3 = {
16130
16351
  "./project-context": {
16131
16352
  types: "./dist/src/project-context.d.ts",
16132
16353
  default: "./dist/project-context.js"
16354
+ },
16355
+ "./invocation-graph": {
16356
+ types: "./dist/src/invocation-graph.d.ts",
16357
+ default: "./dist/invocation-graph.js"
16133
16358
  }
16134
16359
  },
16135
16360
  bin: {
@@ -16140,7 +16365,7 @@ var package_default3 = {
16140
16365
  ],
16141
16366
  private: false,
16142
16367
  scripts: {
16143
- build: "bun build ./src/index.ts ./src/resources/index.ts ./src/solution-auth.ts ./src/deployment-search.ts ./src/package-search.ts ./src/project-context.ts --outdir dist --format esm --target node --splitting --sourcemap=linked && bun build ./src/scripts/generate-sdk.ts --outdir dist/scripts --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
16368
+ build: "bun build ./src/index.ts ./src/resources/index.ts ./src/solution-auth.ts ./src/deployment-search.ts ./src/package-search.ts ./src/project-context.ts ./src/invocation-graph.ts --outdir dist --format esm --target node --splitting --sourcemap=linked && bun build ./src/scripts/generate-sdk.ts --outdir dist/scripts --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
16144
16369
  generate: "bun run src/scripts/generate-sdk.ts",
16145
16370
  lint: "biome check .",
16146
16371
  test: "vitest run",
@@ -16166,12 +16391,12 @@ var package_default3 = {
16166
16391
 
16167
16392
  // ../solution-sdk/src/user-agent.ts
16168
16393
  var SDK_USER_AGENT2 = getSdkUserAgentToken(package_default3);
16169
- installSdkUserAgentHeader(BaseAPI3, SDK_USER_AGENT2);
16394
+ installSdkUserAgentHeader(BaseAPI4, SDK_USER_AGENT2);
16170
16395
 
16171
16396
  // ../studioweb-sdk/generated/src/runtime.ts
16172
- var BASE_PATH4 = "https://alpha.uipath.com/studio_/backend".replace(/\/+$/, "");
16397
+ var BASE_PATH5 = "https://alpha.uipath.com/studio_/backend".replace(/\/+$/, "");
16173
16398
 
16174
- class Configuration4 {
16399
+ class Configuration5 {
16175
16400
  configuration;
16176
16401
  constructor(configuration = {}) {
16177
16402
  this.configuration = configuration;
@@ -16180,7 +16405,7 @@ class Configuration4 {
16180
16405
  this.configuration = configuration;
16181
16406
  }
16182
16407
  get basePath() {
16183
- return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH4;
16408
+ return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH5;
16184
16409
  }
16185
16410
  get fetchApi() {
16186
16411
  return this.configuration.fetchApi;
@@ -16189,7 +16414,7 @@ class Configuration4 {
16189
16414
  return this.configuration.middleware || [];
16190
16415
  }
16191
16416
  get queryParamsStringify() {
16192
- return this.configuration.queryParamsStringify || querystring4;
16417
+ return this.configuration.queryParamsStringify || querystring5;
16193
16418
  }
16194
16419
  get username() {
16195
16420
  return this.configuration.username;
@@ -16218,13 +16443,13 @@ class Configuration4 {
16218
16443
  return this.configuration.credentials;
16219
16444
  }
16220
16445
  }
16221
- var DefaultConfig4 = new Configuration4;
16446
+ var DefaultConfig5 = new Configuration5;
16222
16447
 
16223
- class BaseAPI4 {
16448
+ class BaseAPI5 {
16224
16449
  configuration;
16225
16450
  static jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i");
16226
16451
  middleware;
16227
- constructor(configuration = DefaultConfig4) {
16452
+ constructor(configuration = DefaultConfig5) {
16228
16453
  this.configuration = configuration;
16229
16454
  this.middleware = configuration.middleware;
16230
16455
  }
@@ -16245,7 +16470,7 @@ class BaseAPI4 {
16245
16470
  if (!mime) {
16246
16471
  return false;
16247
16472
  }
16248
- return BaseAPI4.jsonRegex.test(mime);
16473
+ return BaseAPI5.jsonRegex.test(mime);
16249
16474
  }
16250
16475
  async request(context, initOverrides) {
16251
16476
  const { url, init } = await this.createFetchParams(context, initOverrides);
@@ -16253,7 +16478,7 @@ class BaseAPI4 {
16253
16478
  if (response && (response.status >= 200 && response.status < 300)) {
16254
16479
  return response;
16255
16480
  }
16256
- throw new ResponseError4(response, "Response returned an error code");
16481
+ throw new ResponseError5(response, "Response returned an error code");
16257
16482
  }
16258
16483
  async createFetchParams(context, initOverrides) {
16259
16484
  let url = this.configuration.basePath + context.path;
@@ -16277,7 +16502,7 @@ class BaseAPI4 {
16277
16502
  })
16278
16503
  };
16279
16504
  let body;
16280
- if (isFormData4(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob4(overriddenInit.body)) {
16505
+ if (isFormData5(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob5(overriddenInit.body)) {
16281
16506
  body = overriddenInit.body;
16282
16507
  } else if (this.isJsonMime(headers["Content-Type"])) {
16283
16508
  body = JSON.stringify(overriddenInit.body);
@@ -16317,7 +16542,7 @@ class BaseAPI4 {
16317
16542
  }
16318
16543
  if (response === undefined) {
16319
16544
  if (e instanceof Error) {
16320
- throw new FetchError4(e, "The request failed and the interceptors did not return an alternative response");
16545
+ throw new FetchError5(e, "The request failed and the interceptors did not return an alternative response");
16321
16546
  } else {
16322
16547
  throw e;
16323
16548
  }
@@ -16342,14 +16567,14 @@ class BaseAPI4 {
16342
16567
  return next;
16343
16568
  }
16344
16569
  }
16345
- function isBlob4(value) {
16570
+ function isBlob5(value) {
16346
16571
  return typeof Blob !== "undefined" && value instanceof Blob;
16347
16572
  }
16348
- function isFormData4(value) {
16573
+ function isFormData5(value) {
16349
16574
  return typeof FormData !== "undefined" && value instanceof FormData;
16350
16575
  }
16351
16576
 
16352
- class ResponseError4 extends Error {
16577
+ class ResponseError5 extends Error {
16353
16578
  response;
16354
16579
  name = "ResponseError";
16355
16580
  constructor(response, msg) {
@@ -16358,7 +16583,7 @@ class ResponseError4 extends Error {
16358
16583
  }
16359
16584
  }
16360
16585
 
16361
- class FetchError4 extends Error {
16586
+ class FetchError5 extends Error {
16362
16587
  cause;
16363
16588
  name = "FetchError";
16364
16589
  constructor(cause, msg) {
@@ -16366,10 +16591,10 @@ class FetchError4 extends Error {
16366
16591
  this.cause = cause;
16367
16592
  }
16368
16593
  }
16369
- function querystring4(params, prefix = "") {
16370
- return Object.keys(params).map((key) => querystringSingleKey4(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
16594
+ function querystring5(params, prefix = "") {
16595
+ return Object.keys(params).map((key) => querystringSingleKey5(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
16371
16596
  }
16372
- function querystringSingleKey4(key, value, keyPrefix = "") {
16597
+ function querystringSingleKey5(key, value, keyPrefix = "") {
16373
16598
  const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
16374
16599
  if (value instanceof Array) {
16375
16600
  const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
@@ -16377,13 +16602,13 @@ function querystringSingleKey4(key, value, keyPrefix = "") {
16377
16602
  }
16378
16603
  if (value instanceof Set) {
16379
16604
  const valueAsArray = Array.from(value);
16380
- return querystringSingleKey4(key, valueAsArray, keyPrefix);
16605
+ return querystringSingleKey5(key, valueAsArray, keyPrefix);
16381
16606
  }
16382
16607
  if (value instanceof Date) {
16383
16608
  return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
16384
16609
  }
16385
16610
  if (value instanceof Object) {
16386
- return querystring4(value, fullKey);
16611
+ return querystring5(value, fullKey);
16387
16612
  }
16388
16613
  return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
16389
16614
  }
@@ -16500,8 +16725,7 @@ async function registerProjectInParentSolution(fs, projectDir) {
16500
16725
  Id: projectId
16501
16726
  });
16502
16727
  solution.content.Projects = solution.projects;
16503
- const [writeError] = await catchError(fs.writeFile(solutionFile, `${JSON.stringify(solution.content, null, 2)}
16504
- `));
16728
+ const [writeError] = await catchError(writeSolutionManifest(fs, solutionFile, solution.content));
16505
16729
  if (writeError) {
16506
16730
  return {
16507
16731
  Status: "Failed",
@@ -16520,6 +16744,30 @@ async function registerProjectInParentSolution(fs, projectDir) {
16520
16744
  Instructions: buildRegistrationSuccessInstructions(solutionDir)
16521
16745
  };
16522
16746
  }
16747
+ async function writeSolutionManifest(fs, solutionFile, content) {
16748
+ const [, previous] = await catchError(fs.readFile(solutionFile, "utf-8"));
16749
+ const before = typeof previous === "string" ? previous : "";
16750
+ const bom = before.startsWith("\uFEFF");
16751
+ const crlf = before.includes(`\r
16752
+ `);
16753
+ const indent = /\n([ \t]+)\S/.exec(before.replace(/\r\n/g, `
16754
+ `))?.[1] ?? " ";
16755
+ const finalNewline = before === "" || /\n$/.test(before);
16756
+ let text = JSON.stringify(content, null, indent) + (finalNewline ? `
16757
+ ` : "");
16758
+ if (crlf)
16759
+ text = text.replace(/\n/g, `\r
16760
+ `);
16761
+ if (bom)
16762
+ text = `\uFEFF${text}`;
16763
+ const temp = `${solutionFile}.${crypto.randomUUID()}.tmp`;
16764
+ await fs.writeFile(temp, text);
16765
+ const [renameError] = await catchError(fs.rename(temp, solutionFile));
16766
+ if (renameError) {
16767
+ await catchError(fs.rm(temp));
16768
+ throw renameError;
16769
+ }
16770
+ }
16523
16771
  async function findNearestParentUipxFile(fs, projectDir) {
16524
16772
  let currentDir = fs.path.dirname(fs.path.resolve(projectDir));
16525
16773
  while (true) {
@@ -16623,7 +16871,7 @@ async function readSolutionManifest(fs, solutionFile) {
16623
16871
  null
16624
16872
  ];
16625
16873
  }
16626
- const [parseError, parsed] = catchError(() => JSON.parse(rawContent));
16874
+ const [parseError, parsed] = catchError(() => JSON.parse(rawContent.replace(/^\uFEFF/, "")));
16627
16875
  if (parseError) {
16628
16876
  return [
16629
16877
  new Error(`Invalid JSON in solution file: ${parseError.message}`),
@@ -17126,8 +17374,14 @@ var apiwf_schema_default = {
17126
17374
  required: ["document", "do"],
17127
17375
  properties: {
17128
17376
  document: { $ref: "#/$defs/document" },
17129
- input: { $ref: "#/$defs/input" },
17130
- output: { $ref: "#/$defs/output" },
17377
+ input: {
17378
+ $ref: "#/$defs/input",
17379
+ $comment: "Shared with tasks, so the schema accepts 'from' here. The executor never reads a workflow-level 'input.from' (the first task gets the raw workflow input), so validateWorkflowDataFlow in apiwf-validate-service.ts rejects it with a message that names the fix."
17380
+ },
17381
+ output: {
17382
+ $ref: "#/$defs/output",
17383
+ $comment: "Shared with tasks, so the schema accepts 'as' here. The executor returns data only from a Response task and never reads a workflow-level 'output.as', so validateWorkflowDataFlow in apiwf-validate-service.ts rejects it and points at the Response activity."
17384
+ },
17131
17385
  do: { $ref: "#/$defs/taskList" },
17132
17386
  timeout: { $ref: "#/$defs/timeout" },
17133
17387
  schedule: { $ref: "#/$defs/schedule" },
@@ -17315,12 +17569,14 @@ var apiwf_schema_default = {
17315
17569
  properties: {
17316
17570
  when: {
17317
17571
  oneOf: [
17572
+ { $ref: "#/$defs/runtimeExpression" },
17318
17573
  { $ref: "#/$defs/errorFilter" },
17319
17574
  { type: "array", items: { $ref: "#/$defs/errorFilter" } }
17320
17575
  ]
17321
17576
  },
17322
17577
  exceptWhen: {
17323
17578
  oneOf: [
17579
+ { $ref: "#/$defs/runtimeExpression" },
17324
17580
  { $ref: "#/$defs/errorFilter" },
17325
17581
  { type: "array", items: { $ref: "#/$defs/errorFilter" } }
17326
17582
  ]
@@ -17994,6 +18250,7 @@ function semanticValidation(parsed) {
17994
18250
  const issues = [];
17995
18251
  validateEvaluate(workflow, issues);
17996
18252
  validateVariables(workflow, issues);
18253
+ validateWorkflowDataFlow(workflow, issues);
17997
18254
  if (Array.isArray(workflow.do)) {
17998
18255
  walkTaskList(workflow.do, "/do", issues);
17999
18256
  }
@@ -18026,6 +18283,22 @@ function validateStartTriggers(workflow, issues) {
18026
18283
  }
18027
18284
  }
18028
18285
  }
18286
+ function validateWorkflowDataFlow(workflow, issues) {
18287
+ if (workflow.input?.from !== undefined) {
18288
+ issues.push({
18289
+ path: "/input/from",
18290
+ message: "Workflow-level 'input.from' is ignored at run time: the first activity always gets the raw workflow input. Remove it and shape the input in an Assign activity instead",
18291
+ severity: "error"
18292
+ });
18293
+ }
18294
+ if (workflow.output?.as !== undefined) {
18295
+ issues.push({
18296
+ path: "/output/as",
18297
+ message: `Workflow-level 'output.as' is ignored at run time: a workflow returns data only from a Response activity. Remove it and add a Response activity ({ "response": <value> }) as the last step`,
18298
+ severity: "error"
18299
+ });
18300
+ }
18301
+ }
18029
18302
  function validateEvaluate(workflow, issues) {
18030
18303
  if (!workflow.evaluate)
18031
18304
  return;
@@ -18159,6 +18432,81 @@ function isForTask(task) {
18159
18432
  function isWrapperTask(taskName) {
18160
18433
  return taskName.endsWith("#Wrapper");
18161
18434
  }
18435
+ function isRetryWrapperTask(taskName) {
18436
+ return taskName.endsWith("#Retry");
18437
+ }
18438
+ var STATUS_CONDITION = /^\$\{\s*\[([\d,\s]*)\]\.includes\(\$([A-Za-z_$][\w$]*)\.status\)\s*\}$/;
18439
+ function validateRetryPolicyRoundTrip(task, taskName, taskPath, issues) {
18440
+ const isWrapper = isRetryWrapperTask(taskName);
18441
+ if (!isWrapper && task.metadata?.activityType !== "TryCatch")
18442
+ return;
18443
+ const retry = task.catch?.retry;
18444
+ if (!retry || typeof retry !== "object" || Array.isArray(retry))
18445
+ return;
18446
+ const policy = retry;
18447
+ const dropped = [];
18448
+ if (policy.when !== undefined) {
18449
+ const errorName = task.catch.as ?? "error";
18450
+ const match = typeof policy.when === "string" ? STATUS_CONDITION.exec(policy.when) : null;
18451
+ const codes = (match?.[1] ?? "").split(",").filter((c) => c.trim());
18452
+ if (!isWrapper || match?.[2] !== errorName) {
18453
+ dropped.push("'when'");
18454
+ } else if (codes.length === 0) {
18455
+ dropped.push("an empty status list (it never retries)");
18456
+ }
18457
+ }
18458
+ for (const key of ["exceptWhen", "jitter"]) {
18459
+ if (policy[key] !== undefined)
18460
+ dropped.push(`'${key}'`);
18461
+ }
18462
+ const limit = policy.limit;
18463
+ if (limit?.duration !== undefined)
18464
+ dropped.push("'limit.duration'");
18465
+ const attempt = limit?.attempt;
18466
+ if (attempt?.duration !== undefined)
18467
+ dropped.push("'limit.attempt.duration'");
18468
+ const backoff = policy.backoff;
18469
+ for (const [kind, settings] of Object.entries(backoff ?? {})) {
18470
+ if (settings && Object.keys(settings).length > 0) {
18471
+ dropped.push(`'backoff.${kind}' settings`);
18472
+ }
18473
+ }
18474
+ if (dropped.length === 0)
18475
+ return;
18476
+ const kept = isWrapper ? "the retry count, delay, backoff type and a status list written as `[<codes>].includes($<catch.as>.status)`" : "the retry count, delay and backoff type (a TryCatch has no status filter)";
18477
+ issues.push({
18478
+ path: `${taskPath}/catch/retry`,
18479
+ message: `Retry policy of '${taskName}' has ${dropped.join(", ")}, which Studio Web drops the next time the workflow is saved there. It keeps only ${kept}`,
18480
+ severity: "warning"
18481
+ });
18482
+ }
18483
+ function getRetryWrapperCall(task) {
18484
+ if (!Array.isArray(task.try) || task.try.length !== 1)
18485
+ return;
18486
+ const inner = getNamedTask(task.try[0])?.[1];
18487
+ return inner && "call" in inner ? inner : undefined;
18488
+ }
18489
+ function validateRetryWrapperShape(task, taskName, taskPath, issues) {
18490
+ if (!isRetryWrapperTask(taskName))
18491
+ return;
18492
+ const problems = [];
18493
+ if (!getRetryWrapperCall(task)) {
18494
+ problems.push("its 'try' must hold exactly one task with a 'call'");
18495
+ }
18496
+ if (task.catch?.retry === undefined) {
18497
+ problems.push("its 'catch' must have a 'retry' policy");
18498
+ }
18499
+ if (task.catch?.do !== undefined) {
18500
+ problems.push("its 'catch' must not have a 'do'");
18501
+ }
18502
+ if (problems.length === 0)
18503
+ return;
18504
+ issues.push({
18505
+ path: taskPath,
18506
+ message: `Retry wrapper '${taskName}' is not the shape Studio Web restores as an activity's Retry section: ${problems.join("; ")}. For error handling around several tasks, use a TryCatch activity with 'catch.retry' instead`,
18507
+ severity: "error"
18508
+ });
18509
+ }
18162
18510
  function isEmptyPlaceholderTask(taskName) {
18163
18511
  return taskName === "empty";
18164
18512
  }
@@ -18166,7 +18514,7 @@ function validateTask(task, taskName, taskPath, issues, skipMetadataWarnings = f
18166
18514
  const activityType = task.metadata?.activityType;
18167
18515
  const skipMeta = skipMetadataWarnings || isEmptyPlaceholderTask(taskName);
18168
18516
  if (!task.metadata?.activityType) {
18169
- if (isWrapperTask(taskName)) {
18517
+ if (isWrapperTask(taskName) || isRetryWrapperTask(taskName)) {
18170
18518
  issues.push({
18171
18519
  path: `${taskPath}/metadata`,
18172
18520
  message: `Wrapper task '${taskName}' is missing 'metadata.activityType'. Studio Web picks the activity from that field, so it drops the whole wrapper without reporting it`,
@@ -18187,8 +18535,9 @@ function validateTask(task, taskName, taskPath, issues, skipMetadataWarnings = f
18187
18535
  });
18188
18536
  } else if (activityType !== "Unresolved") {
18189
18537
  const mapping = ACTIVITY_REQUIRED_KEYS[activityType];
18538
+ const keyHolder = isRetryWrapperTask(taskName) ? getRetryWrapperCall(task) : task;
18190
18539
  for (const key of mapping.required) {
18191
- if (!(key in task)) {
18540
+ if (keyHolder && !(key in keyHolder)) {
18192
18541
  issues.push({
18193
18542
  path: `${taskPath}`,
18194
18543
  message: `Task '${taskName}' has activityType '${activityType}' but ${mapping.description}. Missing key: '${key}'`,
@@ -18197,7 +18546,13 @@ function validateTask(task, taskName, taskPath, issues, skipMetadataWarnings = f
18197
18546
  }
18198
18547
  }
18199
18548
  }
18200
- validateConnectorConfiguration(task, taskName, taskPath, issues);
18549
+ validateRetryWrapperShape(task, taskName, taskPath, issues);
18550
+ validateRetryPolicyRoundTrip(task, taskName, taskPath, issues);
18551
+ if (isRetryWrapperTask(taskName)) {
18552
+ validateRetryWrapperCallConfiguration(task, taskPath, issues);
18553
+ } else {
18554
+ validateConnectorConfiguration(task, taskName, taskPath, issues);
18555
+ }
18201
18556
  validateIfBranches(task, taskName, taskPath, issues);
18202
18557
  validateBase64Helper(task, taskName, taskPath, issues);
18203
18558
  validateLogMessage(task, taskName, taskPath, issues);
@@ -18213,7 +18568,7 @@ function validateTask(task, taskName, taskPath, issues, skipMetadataWarnings = f
18213
18568
  walkTaskList(task.do, `${taskPath}/do`, issues, skipChildMetadata, taskName);
18214
18569
  }
18215
18570
  if (Array.isArray(task.try)) {
18216
- walkTaskList(task.try, `${taskPath}/try`, issues);
18571
+ walkTaskList(task.try, `${taskPath}/try`, issues, isRetryWrapperTask(taskName) && getRetryWrapperCall(task) !== undefined);
18217
18572
  }
18218
18573
  if (task.catch && Array.isArray(task.catch.do)) {
18219
18574
  walkTaskList(task.catch.do, `${taskPath}/catch/do`, issues);
@@ -18384,8 +18739,17 @@ function validateLogMessage(task, taskName, taskPath, issues) {
18384
18739
  function isConnectorTask(task) {
18385
18740
  return typeof task.with?.connector === "string" || task.metadata?.activityType === "Connector";
18386
18741
  }
18387
- function validateConnectorConfiguration(task, taskName, taskPath, issues) {
18388
- if (!isConnectorTask(task))
18742
+ function validateRetryWrapperCallConfiguration(wrapper, wrapperPath, issues) {
18743
+ if (!isConnectorTask(wrapper) || !Array.isArray(wrapper.try))
18744
+ return;
18745
+ const entry = getNamedTask(wrapper.try[0]);
18746
+ if (!entry || isConnectorTask(entry[1]))
18747
+ return;
18748
+ const [callName, call] = entry;
18749
+ validateConnectorConfiguration(call, callName, `${wrapperPath}/try/0/${callName}`, issues, true);
18750
+ }
18751
+ function validateConnectorConfiguration(task, taskName, taskPath, issues, isConnector = isConnectorTask(task)) {
18752
+ if (!isConnector)
18389
18753
  return;
18390
18754
  const configStr = task.metadata?.configuration;
18391
18755
  if (!configStr) {
@@ -18566,7 +18930,7 @@ function configureIdentityTelemetry(program) {
18566
18930
  validate: { arguments: ["file"] },
18567
18931
  "bindings sync": { options: ["workflow"] }
18568
18932
  }, async (target) => {
18569
- const { readProjectIdentity } = await import("./index-3d09whjq.js");
18933
+ const { readProjectIdentity } = await import("./index-c6a7npfj.js");
18570
18934
  return readProjectIdentity(target, getFileSystem());
18571
18935
  }));
18572
18936
  }
@@ -18591,4 +18955,4 @@ var registerCommands2 = async (program) => {
18591
18955
 
18592
18956
  export { metadata2, registerCommands2 };
18593
18957
 
18594
- //# debugId=65ACE975C45F6ECD64756E2164756E21
18958
+ //# debugId=22F5BEE49551A00A64756E2164756E21