@northflank/cli 0.8.0-beta.1 → 0.8.0-beta.2

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,191 +1 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
39
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
40
- if (ar || !(i in from)) {
41
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
42
- ar[i] = from[i];
43
- }
44
- }
45
- return to.concat(ar || Array.prototype.slice.call(from));
46
- };
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.fetchResourceList = void 0;
49
- var utils_1 = require("./utils");
50
- function fetchResourceList(propertyName, apiClient, cmdPath, currentProp, pathVars, propPath) {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
52
- return __awaiter(this, void 0, void 0, function () {
53
- var defaultValue, plans, choices, regions, choices, regions, choices, regions, choices, projectId, serviceResourceRequested, services, choices, addonSubject, getAddonType, addonTypes, choices, choices, storage, replicas, addonTypes, choices, addonId, upgradeTo, creds, e_1;
54
- var _this = this;
55
- return __generator(this, function (_l) {
56
- switch (_l.label) {
57
- case 0:
58
- defaultValue = undefined;
59
- _l.label = 1;
60
- case 1:
61
- _l.trys.push([1, 26, , 27]);
62
- if (!(propertyName === 'deploymentPlan')) return [3 /*break*/, 3];
63
- return [4 /*yield*/, apiClient.list.plans({})];
64
- case 2:
65
- plans = _l.sent();
66
- choices = plans.data.plans.map(function (pln) { var _a; return (_a = pln === null || pln === void 0 ? void 0 : pln.internalId) !== null && _a !== void 0 ? _a : pln === null || pln === void 0 ? void 0 : pln.id; });
67
- return [2 /*return*/, { choices: choices, defaultValue: defaultValue }];
68
- case 3:
69
- if (!(propertyName === 'region')) return [3 /*break*/, 5];
70
- return [4 /*yield*/, apiClient.list.regions({})];
71
- case 4:
72
- regions = _l.sent();
73
- choices = regions.data.regions.map(function (region) { var _a; return (_a = region === null || region === void 0 ? void 0 : region.internalId) !== null && _a !== void 0 ? _a : region === null || region === void 0 ? void 0 : region.id; });
74
- return [2 /*return*/, { choices: choices, defaultValue: defaultValue }];
75
- case 5:
76
- if (!(propertyName === 'projectId')) return [3 /*break*/, 7];
77
- return [4 /*yield*/, apiClient.list.projects({ options: { per_page: 100 } })];
78
- case 6:
79
- regions = _l.sent();
80
- choices = regions.data.projects.map(function (project) { return project.id; });
81
- return [2 /*return*/, { choices: choices, defaultValue: defaultValue }];
82
- case 7:
83
- if (!(propertyName === 'credentials')) return [3 /*break*/, 9];
84
- return [4 /*yield*/, apiClient.list.registryCredentials({})];
85
- case 8:
86
- regions = _l.sent();
87
- choices = regions.data.credentials.map(function (cred) { return cred.id; });
88
- return [2 /*return*/, { choices: choices, defaultValue: defaultValue }];
89
- case 9:
90
- projectId = pathVars === null || pathVars === void 0 ? void 0 : pathVars.projectId;
91
- serviceResourceRequested = propertyName === 'serviceId' || (propertyName === 'id' && (propPath === null || propPath === void 0 ? void 0 : propPath.includes('owningObject')));
92
- if (!(projectId !== undefined && serviceResourceRequested)) return [3 /*break*/, 11];
93
- return [4 /*yield*/, apiClient.list.services({
94
- parameters: { projectId: projectId },
95
- options: { per_page: 100 },
96
- })];
97
- case 10:
98
- services = _l.sent();
99
- choices = services.data.services.map(function (service) { return service.id; });
100
- return [2 /*return*/, { choices: choices, defaultValue: defaultValue }];
101
- case 11:
102
- addonSubject = cmdPath === null || cmdPath === void 0 ? void 0 : cmdPath.includes('addon');
103
- if (!addonSubject) return [3 /*break*/, 19];
104
- getAddonType = function (type) { return __awaiter(_this, void 0, void 0, function () {
105
- var addonTypes;
106
- var _a;
107
- return __generator(this, function (_b) {
108
- switch (_b.label) {
109
- case 0: return [4 /*yield*/, apiClient.get.addon.types({})];
110
- case 1:
111
- addonTypes = _b.sent();
112
- return [2 /*return*/, (_a = addonTypes.data.addonTypes) === null || _a === void 0 ? void 0 : _a.find(function (t) { return t.type === type; })];
113
- }
114
- });
115
- }); };
116
- if (!(propertyName === 'type')) return [3 /*break*/, 13];
117
- return [4 /*yield*/, apiClient.get.addon.types({})];
118
- case 12:
119
- addonTypes = _l.sent();
120
- choices = (_a = addonTypes.data.addonTypes) === null || _a === void 0 ? void 0 : _a.map(function (type) { return type.type; });
121
- return [2 /*return*/, { choices: choices, defaultValue: defaultValue }];
122
- case 13:
123
- if (!(propertyName === 'version' && (currentProp === null || currentProp === void 0 ? void 0 : currentProp.type) !== undefined)) return [3 /*break*/, 15];
124
- return [4 /*yield*/, getAddonType(currentProp.type)];
125
- case 14:
126
- choices = (_b = (_l.sent())) === null || _b === void 0 ? void 0 : _b.versions;
127
- return [2 /*return*/, { choices: choices, defaultValue: defaultValue }];
128
- case 15:
129
- if (!(propertyName === 'storage' && (currentProp === null || currentProp === void 0 ? void 0 : currentProp.type) !== undefined)) return [3 /*break*/, 17];
130
- return [4 /*yield*/, getAddonType(currentProp.type)];
131
- case 16:
132
- storage = (_d = (_c = (_l.sent())) === null || _c === void 0 ? void 0 : _c.resources) === null || _d === void 0 ? void 0 : _d.storage;
133
- return [2 /*return*/, { choices: storage === null || storage === void 0 ? void 0 : storage.options, defaultValue: storage === null || storage === void 0 ? void 0 : storage.default }];
134
- case 17:
135
- if (!(propertyName === 'replicas' && (currentProp === null || currentProp === void 0 ? void 0 : currentProp.type) !== undefined)) return [3 /*break*/, 19];
136
- return [4 /*yield*/, getAddonType(currentProp.type)];
137
- case 18:
138
- replicas = (_f = (_e = (_l.sent())) === null || _e === void 0 ? void 0 : _e.resources) === null || _f === void 0 ? void 0 : _f.replicas;
139
- return [2 /*return*/, { choices: replicas === null || replicas === void 0 ? void 0 : replicas.options, defaultValue: replicas === null || replicas === void 0 ? void 0 : replicas.default }];
140
- case 19:
141
- if (!(propertyName === 'addonId' && (pathVars === null || pathVars === void 0 ? void 0 : pathVars.projectId) !== undefined)) return [3 /*break*/, 21];
142
- return [4 /*yield*/, apiClient.list.addons({
143
- parameters: { projectId: pathVars === null || pathVars === void 0 ? void 0 : pathVars.projectId },
144
- options: { per_page: 100 },
145
- })];
146
- case 20:
147
- addonTypes = _l.sent();
148
- if (addonTypes.data.addons.length > 0) {
149
- choices = addonTypes.data.addons.map(function (addon) { return addon.id; });
150
- return [2 /*return*/, { choices: choices, defaultValue: defaultValue }];
151
- }
152
- _l.label = 21;
153
- case 21:
154
- addonId = (_g = pathVars === null || pathVars === void 0 ? void 0 : pathVars.addonId) !== null && _g !== void 0 ? _g : (_h = currentProp === null || currentProp === void 0 ? void 0 : currentProp.addonDependencies) === null || _h === void 0 ? void 0 : _h.addonId;
155
- if (!((cmdPath === null || cmdPath === void 0 ? void 0 : cmdPath.join('')) === 'updateaddonversion' &&
156
- propertyName === 'version' &&
157
- (pathVars === null || pathVars === void 0 ? void 0 : pathVars.projectId) !== undefined &&
158
- addonId !== undefined)) return [3 /*break*/, 23];
159
- return [4 /*yield*/, apiClient.get.addon.version({
160
- parameters: { addonId: addonId, projectId: pathVars === null || pathVars === void 0 ? void 0 : pathVars.projectId },
161
- })];
162
- case 22:
163
- upgradeTo = (_l.sent()).data.upgradeTo;
164
- if (upgradeTo === undefined || upgradeTo.length <= 0) {
165
- (0, utils_1.warning)('No available versions to upgrade to.');
166
- throw new Error();
167
- }
168
- return [2 /*return*/, { choices: upgradeTo.map(function (u) { return u.version; }), defaultValue: defaultValue }];
169
- case 23:
170
- if (!(((cmdPath === null || cmdPath === void 0 ? void 0 : cmdPath.includes('secretLink')) || (cmdPath === null || cmdPath === void 0 ? void 0 : cmdPath.includes('secret'))) &&
171
- propertyName === 'keyName' &&
172
- addonId !== undefined &&
173
- (pathVars === null || pathVars === void 0 ? void 0 : pathVars.projectId) !== undefined)) return [3 /*break*/, 25];
174
- return [4 /*yield*/, apiClient.get.addon.credentials({
175
- parameters: { addonId: addonId, projectId: pathVars === null || pathVars === void 0 ? void 0 : pathVars.projectId },
176
- })];
177
- case 24:
178
- creds = (_l.sent()).data;
179
- return [2 /*return*/, {
180
- choices: __spreadArray(__spreadArray([], ((_j = Object.keys(creds === null || creds === void 0 ? void 0 : creds.envs)) !== null && _j !== void 0 ? _j : []), true), ((_k = Object.keys(creds === null || creds === void 0 ? void 0 : creds.secrets)) !== null && _k !== void 0 ? _k : []), true),
181
- }];
182
- case 25: return [3 /*break*/, 27];
183
- case 26:
184
- e_1 = _l.sent();
185
- return [3 /*break*/, 27];
186
- case 27: return [2 /*return*/, { choices: undefined, defaultValue: defaultValue }];
187
- }
188
- });
189
- });
190
- }
191
- exports.fetchResourceList = fetchResourceList;
1
+ 'use strict';var a0s=['value','14975XSxBJr','length','__generator','done','owningObject','__spreadArray','projectId','32gvzSYd','keys','__esModule','credentials','addonDependencies','throw','list','fetchResourceList','registryCredentials','34447tnFDVq','sent','trys','137jEiVPC','861754CTvrug','services','replicas','ops','271585MGpRTe','region','addonTypes','pop','secrets','default','warning','storage','return','iterator','find','slice','addon','label','6323ZJgtLF','regions','654009fIoDUJ','join','3FdgrTB','prototype','plans','secretLink','keyName','No\x20available\x20versions\x20to\x20upgrade\x20to.','includes','updateaddonversion','versions','addonId','upgradeTo','16sxipux','1nYgEYj','map','data','addons','type','./utils','internalId','projects','defineProperty','version','envs','types','__awaiter','get','call','resources','then','options','1030954TzmwOE'];var a0M=a0O;function a0O(s,O){s=s-0x173;var n=a0s[s];return n;}(function(s,O){var f=a0O;while(!![]){try{var n=parseInt(f(0x186))+parseInt(f(0x194))*parseInt(f(0x1a6))+-parseInt(f(0x1bc))+-parseInt(f(0x184))*parseInt(f(0x193))+-parseInt(f(0x1b8))*-parseInt(f(0x1af))+-parseInt(f(0x176))*-parseInt(f(0x188))+parseInt(f(0x1a8))*-parseInt(f(0x1bb));if(n===O)break;else s['push'](s['shift']());}catch(C){s['push'](s['shift']());}}}(a0s,0x8f705));var __awaiter=this&&this[a0M(0x1a0)]||function(s,O,n,C){function D(S){return S instanceof n?S:new n(function(h){h(S);});}return new(n||(n=Promise))(function(S,h){function N(t){try{l(C['next'](t));}catch(p){h(p);}}function Q(t){var X=a0O;try{l(C[X(0x1b4)](t));}catch(p){h(p);}}function l(t){var u=a0O;t['done']?S(t[u(0x1a7)]):D(t['value'])[u(0x1a4)](N,Q);}l((C=C['apply'](s,O||[]))['next']());});},__generator=this&&this[a0M(0x1aa)]||function(s,O){var Z=a0M,n={'label':0x0,'sent':function(){if(S[0x0]&0x1)throw S[0x1];return S[0x1];},'trys':[],'ops':[]},C,D,S,h;return h={'next':N(0x0),'throw':N(0x1),'return':N(0x2)},typeof Symbol==='function'&&(h[Symbol[Z(0x17f)]]=function(){return this;}),h;function N(l){return function(p){return Q([l,p]);};}function Q(l){var w=Z;if(C)throw new TypeError('Generator\x20is\x20already\x20executing.');while(n)try{if(C=0x1,D&&(S=l[0x0]&0x2?D[w(0x17e)]:l[0x0]?D[w(0x1b4)]||((S=D[w(0x17e)])&&S[w(0x1a2)](D),0x0):D['next'])&&!(S=S['call'](D,l[0x1]))[w(0x1ab)])return S;if(D=0x0,S)l=[l[0x0]&0x2,S['value']];switch(l[0x0]){case 0x0:case 0x1:S=l;break;case 0x4:n[w(0x183)]++;return{'value':l[0x1],'done':![]};case 0x5:n[w(0x183)]++,D=l[0x1],l=[0x0];continue;case 0x7:l=n[w(0x175)]['pop'](),n[w(0x1ba)][w(0x179)]();continue;default:if(!(S=n[w(0x1ba)],S=S[w(0x1a9)]>0x0&&S[S['length']-0x1])&&(l[0x0]===0x6||l[0x0]===0x2)){n=0x0;continue;}if(l[0x0]===0x3&&(!S||l[0x1]>S[0x0]&&l[0x1]<S[0x3])){n[w(0x183)]=l[0x1];break;}if(l[0x0]===0x6&&n[w(0x183)]<S[0x1]){n['label']=S[0x1],S=l;break;}if(S&&n[w(0x183)]<S[0x2]){n[w(0x183)]=S[0x2],n[w(0x175)]['push'](l);break;}if(S[0x2])n[w(0x175)][w(0x179)]();n[w(0x1ba)][w(0x179)]();continue;}l=O['call'](s,n);}catch(p){l=[0x6,p],D=0x0;}finally{C=S=0x0;}if(l[0x0]&0x5)throw l[0x1];return{'value':l[0x0]?l[0x1]:void 0x0,'done':!![]};}},__spreadArray=this&&this[a0M(0x1ad)]||function(s,O,n){var c=a0M;if(n||arguments[c(0x1a9)]===0x2)for(var C=0x0,D=O[c(0x1a9)],S;C<D;C++){if(S||!(C in O)){if(!S)S=Array[c(0x189)][c(0x181)]['call'](O,0x0,C);S[C]=O[C];}}return s['concat'](S||Array['prototype']['slice'][c(0x1a2)](O));};Object[a0M(0x19c)](exports,a0M(0x1b1),{'value':!![]}),exports[a0M(0x1b6)]=void 0x0;var utils_1=require(a0M(0x199));function fetchResourceList(s,O,n,C,D,S){var h,N,Q,l,t,p,v,r,V,E;return __awaiter(this,void 0x0,void 0x0,function(){var x,K,J,F,J,F,J,F,J,R,L,d,J,i,U,I,J,J,j,H,I,J,k,b,Y,o,y=this;return __generator(this,function(T){var z=a0O;switch(T[z(0x183)]){case 0x0:x=undefined,T[z(0x183)]=0x1;case 0x1:T[z(0x1ba)]['push']([0x1,0x1a,,0x1b]);if(!(s==='deploymentPlan'))return[0x3,0x3];return[0x4,O['list'][z(0x18a)]({})];case 0x2:K=T[z(0x1b9)](),J=K[z(0x196)][z(0x18a)]['map'](function(e){var q=z,B;return(B=e===null||e===void 0x0?void 0x0:e[q(0x19a)])!==null&&B!==void 0x0?B:e===null||e===void 0x0?void 0x0:e['id'];});return[0x2,{'choices':J,'defaultValue':x}];case 0x3:if(!(s===z(0x177)))return[0x3,0x5];return[0x4,O['list'][z(0x185)]({})];case 0x4:F=T['sent'](),J=F['data']['regions']['map'](function(e){var W=z,B;return(B=e===null||e===void 0x0?void 0x0:e[W(0x19a)])!==null&&B!==void 0x0?B:e===null||e===void 0x0?void 0x0:e['id'];});return[0x2,{'choices':J,'defaultValue':x}];case 0x5:if(!(s===z(0x1ae)))return[0x3,0x7];return[0x4,O[z(0x1b5)][z(0x19b)]({'options':{'per_page':0x64}})];case 0x6:F=T[z(0x1b9)](),J=F[z(0x196)][z(0x19b)][z(0x195)](function(e){return e['id'];});return[0x2,{'choices':J,'defaultValue':x}];case 0x7:if(!(s===z(0x1b2)))return[0x3,0x9];return[0x4,O[z(0x1b5)][z(0x1b7)]({})];case 0x8:F=T['sent'](),J=F[z(0x196)]['credentials']['map'](function(e){return e['id'];});return[0x2,{'choices':J,'defaultValue':x}];case 0x9:R=D===null||D===void 0x0?void 0x0:D['projectId'],L=s==='serviceId'||s==='id'&&(S===null||S===void 0x0?void 0x0:S['includes'](z(0x1ac)));if(!(R!==undefined&&L))return[0x3,0xb];return[0x4,O[z(0x1b5)][z(0x173)]({'parameters':{'projectId':R},'options':{'per_page':0x64}})];case 0xa:d=T['sent'](),J=d[z(0x196)]['services']['map'](function(e){return e['id'];});return[0x2,{'choices':J,'defaultValue':x}];case 0xb:i=n===null||n===void 0x0?void 0x0:n[z(0x18e)](z(0x182));if(!i)return[0x3,0x13];U=function(e){return __awaiter(y,void 0x0,void 0x0,function(){var B,A;return __generator(this,function(P){var m=a0O;switch(P[m(0x183)]){case 0x0:return[0x4,O[m(0x1a1)][m(0x182)][m(0x19f)]({})];case 0x1:B=P[m(0x1b9)]();return[0x2,(A=B[m(0x196)]['addonTypes'])===null||A===void 0x0?void 0x0:A[m(0x180)](function(a){var G=m;return a[G(0x198)]===e;})];}});});};if(!(s===z(0x198)))return[0x3,0xd];return[0x4,O[z(0x1a1)][z(0x182)][z(0x19f)]({})];case 0xc:I=T[z(0x1b9)](),J=(h=I[z(0x196)][z(0x178)])===null||h===void 0x0?void 0x0:h['map'](function(e){var g=z;return e[g(0x198)];});return[0x2,{'choices':J,'defaultValue':x}];case 0xd:if(!(s===z(0x19d)&&(C===null||C===void 0x0?void 0x0:C['type'])!==undefined))return[0x3,0xf];return[0x4,U(C[z(0x198)])];case 0xe:J=(N=T['sent']())===null||N===void 0x0?void 0x0:N[z(0x190)];return[0x2,{'choices':J,'defaultValue':x}];case 0xf:if(!(s==='storage'&&(C===null||C===void 0x0?void 0x0:C[z(0x198)])!==undefined))return[0x3,0x11];return[0x4,U(C[z(0x198)])];case 0x10:j=(l=(Q=T[z(0x1b9)]())===null||Q===void 0x0?void 0x0:Q[z(0x1a3)])===null||l===void 0x0?void 0x0:l[z(0x17d)];return[0x2,{'choices':j===null||j===void 0x0?void 0x0:j[z(0x1a5)],'defaultValue':j===null||j===void 0x0?void 0x0:j[z(0x17b)]}];case 0x11:if(!(s==='replicas'&&(C===null||C===void 0x0?void 0x0:C[z(0x198)])!==undefined))return[0x3,0x13];return[0x4,U(C[z(0x198)])];case 0x12:H=(p=(t=T[z(0x1b9)]())===null||t===void 0x0?void 0x0:t[z(0x1a3)])===null||p===void 0x0?void 0x0:p[z(0x174)];return[0x2,{'choices':H===null||H===void 0x0?void 0x0:H['options'],'defaultValue':H===null||H===void 0x0?void 0x0:H['default']}];case 0x13:if(!(s===z(0x191)&&(D===null||D===void 0x0?void 0x0:D['projectId'])!==undefined))return[0x3,0x15];return[0x4,O[z(0x1b5)][z(0x197)]({'parameters':{'projectId':D===null||D===void 0x0?void 0x0:D[z(0x1ae)]},'options':{'per_page':0x64}})];case 0x14:I=T[z(0x1b9)]();if(I[z(0x196)]['addons'][z(0x1a9)]>0x0)return J=I[z(0x196)][z(0x197)][z(0x195)](function(e){return e['id'];}),[0x2,{'choices':J,'defaultValue':x}];T[z(0x183)]=0x15;case 0x15:k=(v=D===null||D===void 0x0?void 0x0:D[z(0x191)])!==null&&v!==void 0x0?v:(r=C===null||C===void 0x0?void 0x0:C[z(0x1b3)])===null||r===void 0x0?void 0x0:r[z(0x191)];if(!((n===null||n===void 0x0?void 0x0:n[z(0x187)](''))===z(0x18f)&&s===z(0x19d)&&(D===null||D===void 0x0?void 0x0:D['projectId'])!==undefined&&k!==undefined))return[0x3,0x17];return[0x4,O[z(0x1a1)][z(0x182)][z(0x19d)]({'parameters':{'addonId':k,'projectId':D===null||D===void 0x0?void 0x0:D[z(0x1ae)]}})];case 0x16:b=T[z(0x1b9)]()[z(0x196)][z(0x192)];if(b===undefined||b[z(0x1a9)]<=0x0){(0x0,utils_1[z(0x17c)])(z(0x18d));throw new Error();}return[0x2,{'choices':b[z(0x195)](function(e){return e['version'];}),'defaultValue':x}];case 0x17:if(!(((n===null||n===void 0x0?void 0x0:n[z(0x18e)](z(0x18b)))||(n===null||n===void 0x0?void 0x0:n[z(0x18e)]('secret')))&&s===z(0x18c)&&k!==undefined&&(D===null||D===void 0x0?void 0x0:D[z(0x1ae)])!==undefined))return[0x3,0x19];return[0x4,O[z(0x1a1)][z(0x182)]['credentials']({'parameters':{'addonId':k,'projectId':D===null||D===void 0x0?void 0x0:D[z(0x1ae)]}})];case 0x18:Y=T[z(0x1b9)]()[z(0x196)];return[0x2,{'choices':__spreadArray(__spreadArray([],(V=Object[z(0x1b0)](Y===null||Y===void 0x0?void 0x0:Y[z(0x19e)]))!==null&&V!==void 0x0?V:[],!![]),(E=Object[z(0x1b0)](Y===null||Y===void 0x0?void 0x0:Y[z(0x17a)]))!==null&&E!==void 0x0?E:[],!![])}];case 0x19:return[0x3,0x1b];case 0x1a:o=T[z(0x1b9)]();return[0x3,0x1b];case 0x1b:return[0x2,{'choices':undefined,'defaultValue':x}];}});});}exports[a0M(0x1b6)]=fetchResourceList;