windmill-client 1.146.0 → 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 +6 -0
- package/dist/core/OpenAPI.js +1 -1
- package/dist/models/RawScript.d.ts +1 -0
- package/dist/models/RawScript.js +1 -0
- package/package.json +2 -2
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({
|
package/dist/core/OpenAPI.js
CHANGED
package/dist/models/RawScript.js
CHANGED
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.146.
|
|
4
|
+
"version": "1.146.1",
|
|
5
5
|
"author": "Ruben Fiszel",
|
|
6
6
|
"license": "Apache 2.0",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@types/node": "^20.4.
|
|
8
|
+
"@types/node": "^20.4.10"
|
|
9
9
|
},
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"types": "dist/index.d.ts",
|