windmill-client 1.145.3 → 1.146.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
@@ -27,6 +27,7 @@ Object.defineProperty(exports, "SettingsService", { enumerable: true, get: funct
27
27
  Object.defineProperty(exports, "UserService", { enumerable: true, get: function () { return index_3.UserService; } });
28
28
  Object.defineProperty(exports, "WorkspaceService", { enumerable: true, get: function () { return index_3.WorkspaceService; } });
29
29
  exports.SHARED_FOLDER = "/shared";
30
+ let clientSet = false;
30
31
  function setClient(token, baseUrl) {
31
32
  var _a, _b, _c;
32
33
  if (baseUrl === undefined) {
@@ -39,6 +40,7 @@ function setClient(token, baseUrl) {
39
40
  index_2.OpenAPI.WITH_CREDENTIALS = true;
40
41
  index_2.OpenAPI.TOKEN = token;
41
42
  index_2.OpenAPI.BASE = baseUrl + "/api";
43
+ clientSet = true;
42
44
  }
43
45
  exports.setClient = setClient;
44
46
  const getEnv = (key) => {
@@ -66,6 +68,7 @@ exports.getWorkspace = getWorkspace;
66
68
  */
67
69
  function getResource(path, undefinedIfEmpty) {
68
70
  return __awaiter(this, void 0, void 0, function* () {
71
+ !clientSet && setClient();
69
72
  const workspace = getWorkspace();
70
73
  path = path !== null && path !== void 0 ? path : getStatePath();
71
74
  try {
@@ -141,6 +144,7 @@ exports.getStatePath = getStatePath;
141
144
  */
142
145
  function setResource(value, path, initializeToTypeIfNotExist) {
143
146
  return __awaiter(this, void 0, void 0, function* () {
147
+ !clientSet && setClient();
144
148
  path = path !== null && path !== void 0 ? path : getStatePath();
145
149
  const workspace = getWorkspace();
146
150
  if (yield index_1.ResourceService.existsResource({ workspace, path })) {
@@ -226,6 +230,7 @@ exports.getState = getState;
226
230
  */
227
231
  function getVariable(path) {
228
232
  return __awaiter(this, void 0, void 0, function* () {
233
+ !clientSet && setClient();
229
234
  const workspace = getWorkspace();
230
235
  try {
231
236
  const variable = yield index_1.VariableService.getVariable({ workspace, path });
@@ -246,6 +251,7 @@ exports.getVariable = getVariable;
246
251
  */
247
252
  function setVariable(path, value, isSecretIfNotExist, descriptionIfNotExist) {
248
253
  return __awaiter(this, void 0, void 0, function* () {
254
+ !clientSet && setClient();
249
255
  const workspace = getWorkspace();
250
256
  if (yield index_1.VariableService.existsVariable({ workspace, path })) {
251
257
  yield index_1.VariableService.updateVariable({
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OpenAPI = void 0;
4
4
  exports.OpenAPI = {
5
5
  BASE: '/api',
6
- VERSION: '1.145.3',
6
+ VERSION: '1.146.1',
7
7
  WITH_CREDENTIALS: false,
8
8
  CREDENTIALS: 'include',
9
9
  TOKEN: undefined,
@@ -13,6 +13,7 @@ export type RawScript = {
13
13
  export declare namespace RawScript {
14
14
  enum language {
15
15
  DENO = "deno",
16
+ BUN = "bun",
16
17
  PYTHON3 = "python3",
17
18
  GO = "go",
18
19
  BASH = "bash",
@@ -10,6 +10,7 @@ var RawScript;
10
10
  let language;
11
11
  (function (language) {
12
12
  language["DENO"] = "deno";
13
+ language["BUN"] = "bun";
13
14
  language["PYTHON3"] = "python3";
14
15
  language["GO"] = "go";
15
16
  language["BASH"] = "bash";
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "windmill-client",
3
3
  "description": "Windmill SDK client for browsers and Node.js",
4
- "version": "1.145.3",
4
+ "version": "1.146.1",
5
5
  "author": "Ruben Fiszel",
6
6
  "license": "Apache 2.0",
7
7
  "devDependencies": {
8
- "@types/node": "^20.4.0"
8
+ "@types/node": "^20.4.10"
9
9
  },
10
10
  "main": "dist/index.js",
11
11
  "types": "dist/index.d.ts",