windmill-client 1.453.0 → 1.453.1

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/client.js CHANGED
@@ -892,25 +892,19 @@ function requestInteractiveSlackApproval(_a) {
892
892
  }
893
893
  function getMockedApi() {
894
894
  return __awaiter(this, void 0, void 0, function* () {
895
- const mockedPath = getEnv("WM_MOCKED_API_FILE");
896
895
  if (mockedApi) {
897
896
  return mockedApi;
898
897
  }
898
+ const mockedPath = getEnv("WM_MOCKED_API_FILE");
899
899
  if (mockedPath) {
900
900
  console.info("Using mocked API from", mockedPath);
901
901
  }
902
- const path = getEnv("WM_MOCKED_API_FILE");
903
- if (!path) {
904
- console.warn("No mocked API file path provided at env variable WM_MOCKED_API_FILE. Using empty mocked API.");
905
- mockedApi = {
906
- variables: {},
907
- resources: {},
908
- };
909
- return mockedApi;
902
+ else {
903
+ return undefined;
910
904
  }
911
905
  try {
912
906
  const fs = yield Promise.resolve().then(() => require("node:fs/promises"));
913
- const file = yield fs.readFile(path, "utf-8");
907
+ const file = yield fs.readFile(mockedPath, "utf-8");
914
908
  try {
915
909
  mockedApi = JSON.parse(file);
916
910
  if (!mockedApi.variables) {
@@ -922,13 +916,19 @@ function getMockedApi() {
922
916
  return mockedApi;
923
917
  }
924
918
  catch (_a) {
925
- console.warn("Error parsing mocked API file at path", path);
926
- return undefined;
919
+ console.warn("Error parsing mocked API file at path", mockedPath);
927
920
  }
928
921
  }
929
922
  catch (_b) {
930
- console.warn("Error reading mocked API file at path", path);
931
- return undefined;
923
+ console.warn("Error reading mocked API file at path", mockedPath);
924
+ }
925
+ if (!mockedApi) {
926
+ console.warn("No mocked API file path provided at env variable WM_MOCKED_API_FILE. Using empty mocked API.");
927
+ mockedApi = {
928
+ variables: {},
929
+ resources: {},
930
+ };
931
+ return mockedApi;
932
932
  }
933
933
  });
934
934
  }
@@ -39,7 +39,7 @@ exports.OpenAPI = {
39
39
  PASSWORD: undefined,
40
40
  TOKEN: getEnv("WM_TOKEN"),
41
41
  USERNAME: undefined,
42
- VERSION: '1.453.0',
42
+ VERSION: '1.453.1',
43
43
  WITH_CREDENTIALS: true,
44
44
  interceptors: {
45
45
  request: new Interceptors(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "windmill-client",
3
3
  "description": "Windmill SDK client for browsers and Node.js",
4
- "version": "1.453.0",
4
+ "version": "1.453.1",
5
5
  "author": "Ruben Fiszel",
6
6
  "license": "Apache 2.0",
7
7
  "devDependencies": {