@pump-inc/cli 0.0.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.
Files changed (39) hide show
  1. package/README.md +905 -0
  2. package/bin/dev.cmd +3 -0
  3. package/bin/dev.js +7 -0
  4. package/bin/run-pkg.js +13 -0
  5. package/bin/run.cmd +3 -0
  6. package/bin/run.js +7 -0
  7. package/dist/api-XWM8zKbb.cjs +21 -0
  8. package/dist/api-client-bnV0ib_r.cjs +1207 -0
  9. package/dist/base-command-GfDxcqx6.cjs +451 -0
  10. package/dist/bin.cjs +15 -0
  11. package/dist/chunk-CbDLau6x.cjs +34 -0
  12. package/dist/commands/admin/config/set.cjs +40 -0
  13. package/dist/commands/admin/organization/create.cjs +83 -0
  14. package/dist/commands/admin/organization/get.cjs +77 -0
  15. package/dist/commands/admin/organization/list.cjs +103 -0
  16. package/dist/commands/admin/user/create.cjs +82 -0
  17. package/dist/commands/api-key/create.cjs +81 -0
  18. package/dist/commands/api-key/delete.cjs +48 -0
  19. package/dist/commands/api-key/list.cjs +85 -0
  20. package/dist/commands/api-key/update.cjs +81 -0
  21. package/dist/commands/app/create.cjs +97 -0
  22. package/dist/commands/app/deploy.cjs +74 -0
  23. package/dist/commands/app/list.cjs +64 -0
  24. package/dist/commands/app/secrets.cjs +43 -0
  25. package/dist/commands/app/status.cjs +78 -0
  26. package/dist/commands/app/stop.cjs +49 -0
  27. package/dist/commands/app/usage.cjs +79 -0
  28. package/dist/commands/auth/test.cjs +56 -0
  29. package/dist/commands/config/validate.cjs +32 -0
  30. package/dist/commands/project/create.cjs +79 -0
  31. package/dist/fix-event-emitter-uhRntilb.cjs +21 -0
  32. package/dist/index.cjs +16 -0
  33. package/dist/util/api.cjs +3 -0
  34. package/dist/util/base-command.cjs +4 -0
  35. package/dist/util/fix-event-emitter.cjs +3 -0
  36. package/dist/util/validate-config.cjs +3 -0
  37. package/dist/validate-config-C9krCzRv.cjs +24 -0
  38. package/oclif.manifest.json +1099 -0
  39. package/package.json +85 -0
@@ -0,0 +1,451 @@
1
+ const require_chunk = require('./chunk-CbDLau6x.cjs');
2
+ const require_api = require('./api-XWM8zKbb.cjs');
3
+ let node_process = require("node:process");
4
+ node_process = require_chunk.__toESM(node_process);
5
+ let __oclif_core = require("@oclif/core");
6
+ let node_os = require("node:os");
7
+ node_os = require_chunk.__toESM(node_os);
8
+ let node_tty = require("node:tty");
9
+ node_tty = require_chunk.__toESM(node_tty);
10
+
11
+ //#region ../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
12
+ const ANSI_BACKGROUND_OFFSET = 10;
13
+ const wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
14
+ const wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
15
+ const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
16
+ const styles$1 = {
17
+ modifier: {
18
+ reset: [0, 0],
19
+ bold: [1, 22],
20
+ dim: [2, 22],
21
+ italic: [3, 23],
22
+ underline: [4, 24],
23
+ overline: [53, 55],
24
+ inverse: [7, 27],
25
+ hidden: [8, 28],
26
+ strikethrough: [9, 29]
27
+ },
28
+ color: {
29
+ black: [30, 39],
30
+ red: [31, 39],
31
+ green: [32, 39],
32
+ yellow: [33, 39],
33
+ blue: [34, 39],
34
+ magenta: [35, 39],
35
+ cyan: [36, 39],
36
+ white: [37, 39],
37
+ blackBright: [90, 39],
38
+ gray: [90, 39],
39
+ grey: [90, 39],
40
+ redBright: [91, 39],
41
+ greenBright: [92, 39],
42
+ yellowBright: [93, 39],
43
+ blueBright: [94, 39],
44
+ magentaBright: [95, 39],
45
+ cyanBright: [96, 39],
46
+ whiteBright: [97, 39]
47
+ },
48
+ bgColor: {
49
+ bgBlack: [40, 49],
50
+ bgRed: [41, 49],
51
+ bgGreen: [42, 49],
52
+ bgYellow: [43, 49],
53
+ bgBlue: [44, 49],
54
+ bgMagenta: [45, 49],
55
+ bgCyan: [46, 49],
56
+ bgWhite: [47, 49],
57
+ bgBlackBright: [100, 49],
58
+ bgGray: [100, 49],
59
+ bgGrey: [100, 49],
60
+ bgRedBright: [101, 49],
61
+ bgGreenBright: [102, 49],
62
+ bgYellowBright: [103, 49],
63
+ bgBlueBright: [104, 49],
64
+ bgMagentaBright: [105, 49],
65
+ bgCyanBright: [106, 49],
66
+ bgWhiteBright: [107, 49]
67
+ }
68
+ };
69
+ const modifierNames = Object.keys(styles$1.modifier);
70
+ const foregroundColorNames = Object.keys(styles$1.color);
71
+ const backgroundColorNames = Object.keys(styles$1.bgColor);
72
+ const colorNames = [...foregroundColorNames, ...backgroundColorNames];
73
+ function assembleStyles() {
74
+ const codes = /* @__PURE__ */ new Map();
75
+ for (const [groupName, group] of Object.entries(styles$1)) {
76
+ for (const [styleName, style] of Object.entries(group)) {
77
+ styles$1[styleName] = {
78
+ open: `\u001B[${style[0]}m`,
79
+ close: `\u001B[${style[1]}m`
80
+ };
81
+ group[styleName] = styles$1[styleName];
82
+ codes.set(style[0], style[1]);
83
+ }
84
+ Object.defineProperty(styles$1, groupName, {
85
+ value: group,
86
+ enumerable: false
87
+ });
88
+ }
89
+ Object.defineProperty(styles$1, "codes", {
90
+ value: codes,
91
+ enumerable: false
92
+ });
93
+ styles$1.color.close = "\x1B[39m";
94
+ styles$1.bgColor.close = "\x1B[49m";
95
+ styles$1.color.ansi = wrapAnsi16();
96
+ styles$1.color.ansi256 = wrapAnsi256();
97
+ styles$1.color.ansi16m = wrapAnsi16m();
98
+ styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
99
+ styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
100
+ styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
101
+ Object.defineProperties(styles$1, {
102
+ rgbToAnsi256: {
103
+ value(red, green, blue) {
104
+ if (red === green && green === blue) {
105
+ if (red < 8) return 16;
106
+ if (red > 248) return 231;
107
+ return Math.round((red - 8) / 247 * 24) + 232;
108
+ }
109
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
110
+ },
111
+ enumerable: false
112
+ },
113
+ hexToRgb: {
114
+ value(hex) {
115
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
116
+ if (!matches) return [
117
+ 0,
118
+ 0,
119
+ 0
120
+ ];
121
+ let [colorString] = matches;
122
+ if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
123
+ const integer = Number.parseInt(colorString, 16);
124
+ return [
125
+ integer >> 16 & 255,
126
+ integer >> 8 & 255,
127
+ integer & 255
128
+ ];
129
+ },
130
+ enumerable: false
131
+ },
132
+ hexToAnsi256: {
133
+ value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
134
+ enumerable: false
135
+ },
136
+ ansi256ToAnsi: {
137
+ value(code) {
138
+ if (code < 8) return 30 + code;
139
+ if (code < 16) return 90 + (code - 8);
140
+ let red;
141
+ let green;
142
+ let blue;
143
+ if (code >= 232) {
144
+ red = ((code - 232) * 10 + 8) / 255;
145
+ green = red;
146
+ blue = red;
147
+ } else {
148
+ code -= 16;
149
+ const remainder = code % 36;
150
+ red = Math.floor(code / 36) / 5;
151
+ green = Math.floor(remainder / 6) / 5;
152
+ blue = remainder % 6 / 5;
153
+ }
154
+ const value = Math.max(red, green, blue) * 2;
155
+ if (value === 0) return 30;
156
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
157
+ if (value === 2) result += 60;
158
+ return result;
159
+ },
160
+ enumerable: false
161
+ },
162
+ rgbToAnsi: {
163
+ value: (red, green, blue) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red, green, blue)),
164
+ enumerable: false
165
+ },
166
+ hexToAnsi: {
167
+ value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
168
+ enumerable: false
169
+ }
170
+ });
171
+ return styles$1;
172
+ }
173
+ const ansiStyles = assembleStyles();
174
+ var ansi_styles_default = ansiStyles;
175
+
176
+ //#endregion
177
+ //#region ../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
178
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : node_process.default.argv) {
179
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
180
+ const position = argv.indexOf(prefix + flag);
181
+ const terminatorPosition = argv.indexOf("--");
182
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
183
+ }
184
+ const { env } = node_process.default;
185
+ let flagForceColor;
186
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
187
+ else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
188
+ function envForceColor() {
189
+ if ("FORCE_COLOR" in env) {
190
+ if (env.FORCE_COLOR === "true") return 1;
191
+ if (env.FORCE_COLOR === "false") return 0;
192
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
193
+ }
194
+ }
195
+ function translateLevel(level) {
196
+ if (level === 0) return false;
197
+ return {
198
+ level,
199
+ hasBasic: true,
200
+ has256: level >= 2,
201
+ has16m: level >= 3
202
+ };
203
+ }
204
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
205
+ const noFlagForceColor = envForceColor();
206
+ if (noFlagForceColor !== void 0) flagForceColor = noFlagForceColor;
207
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
208
+ if (forceColor === 0) return 0;
209
+ if (sniffFlags) {
210
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
211
+ if (hasFlag("color=256")) return 2;
212
+ }
213
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) return 1;
214
+ if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
215
+ const min = forceColor || 0;
216
+ if (env.TERM === "dumb") return min;
217
+ if (node_process.default.platform === "win32") {
218
+ const osRelease = node_os.default.release().split(".");
219
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
220
+ return 1;
221
+ }
222
+ if ("CI" in env) {
223
+ if ([
224
+ "GITHUB_ACTIONS",
225
+ "GITEA_ACTIONS",
226
+ "CIRCLECI"
227
+ ].some((key) => key in env)) return 3;
228
+ if ([
229
+ "TRAVIS",
230
+ "APPVEYOR",
231
+ "GITLAB_CI",
232
+ "BUILDKITE",
233
+ "DRONE"
234
+ ].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
235
+ return min;
236
+ }
237
+ if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
238
+ if (env.COLORTERM === "truecolor") return 3;
239
+ if (env.TERM === "xterm-kitty") return 3;
240
+ if (env.TERM === "xterm-ghostty") return 3;
241
+ if (env.TERM === "wezterm") return 3;
242
+ if ("TERM_PROGRAM" in env) {
243
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
244
+ switch (env.TERM_PROGRAM) {
245
+ case "iTerm.app": return version >= 3 ? 3 : 2;
246
+ case "Apple_Terminal": return 2;
247
+ }
248
+ }
249
+ if (/-256(color)?$/i.test(env.TERM)) return 2;
250
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
251
+ if ("COLORTERM" in env) return 1;
252
+ return min;
253
+ }
254
+ function createSupportsColor(stream, options = {}) {
255
+ return translateLevel(_supportsColor(stream, {
256
+ streamIsTTY: stream && stream.isTTY,
257
+ ...options
258
+ }));
259
+ }
260
+ const supportsColor = {
261
+ stdout: createSupportsColor({ isTTY: node_tty.default.isatty(1) }),
262
+ stderr: createSupportsColor({ isTTY: node_tty.default.isatty(2) })
263
+ };
264
+ var supports_color_default = supportsColor;
265
+
266
+ //#endregion
267
+ //#region ../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
268
+ function stringReplaceAll(string, substring, replacer) {
269
+ let index = string.indexOf(substring);
270
+ if (index === -1) return string;
271
+ const substringLength = substring.length;
272
+ let endIndex = 0;
273
+ let returnValue = "";
274
+ do {
275
+ returnValue += string.slice(endIndex, index) + substring + replacer;
276
+ endIndex = index + substringLength;
277
+ index = string.indexOf(substring, endIndex);
278
+ } while (index !== -1);
279
+ returnValue += string.slice(endIndex);
280
+ return returnValue;
281
+ }
282
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
283
+ let endIndex = 0;
284
+ let returnValue = "";
285
+ do {
286
+ const gotCR = string[index - 1] === "\r";
287
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
288
+ endIndex = index + 1;
289
+ index = string.indexOf("\n", endIndex);
290
+ } while (index !== -1);
291
+ returnValue += string.slice(endIndex);
292
+ return returnValue;
293
+ }
294
+
295
+ //#endregion
296
+ //#region ../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
297
+ const { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
298
+ const GENERATOR = Symbol("GENERATOR");
299
+ const STYLER = Symbol("STYLER");
300
+ const IS_EMPTY = Symbol("IS_EMPTY");
301
+ const levelMapping = [
302
+ "ansi",
303
+ "ansi",
304
+ "ansi256",
305
+ "ansi16m"
306
+ ];
307
+ const styles = Object.create(null);
308
+ const applyOptions = (object, options = {}) => {
309
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
310
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
311
+ object.level = options.level === void 0 ? colorLevel : options.level;
312
+ };
313
+ const chalkFactory = (options) => {
314
+ const chalk$1 = (...strings) => strings.join(" ");
315
+ applyOptions(chalk$1, options);
316
+ Object.setPrototypeOf(chalk$1, createChalk.prototype);
317
+ return chalk$1;
318
+ };
319
+ function createChalk(options) {
320
+ return chalkFactory(options);
321
+ }
322
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
323
+ for (const [styleName, style] of Object.entries(ansi_styles_default)) styles[styleName] = { get() {
324
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
325
+ Object.defineProperty(this, styleName, { value: builder });
326
+ return builder;
327
+ } };
328
+ styles.visible = { get() {
329
+ const builder = createBuilder(this, this[STYLER], true);
330
+ Object.defineProperty(this, "visible", { value: builder });
331
+ return builder;
332
+ } };
333
+ const getModelAnsi = (model, level, type, ...arguments_) => {
334
+ if (model === "rgb") {
335
+ if (level === "ansi16m") return ansi_styles_default[type].ansi16m(...arguments_);
336
+ if (level === "ansi256") return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
337
+ return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
338
+ }
339
+ if (model === "hex") return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
340
+ return ansi_styles_default[type][model](...arguments_);
341
+ };
342
+ for (const model of [
343
+ "rgb",
344
+ "hex",
345
+ "ansi256"
346
+ ]) {
347
+ styles[model] = { get() {
348
+ const { level } = this;
349
+ return function(...arguments_) {
350
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
351
+ return createBuilder(this, styler, this[IS_EMPTY]);
352
+ };
353
+ } };
354
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
355
+ styles[bgModel] = { get() {
356
+ const { level } = this;
357
+ return function(...arguments_) {
358
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
359
+ return createBuilder(this, styler, this[IS_EMPTY]);
360
+ };
361
+ } };
362
+ }
363
+ const proto = Object.defineProperties(() => {}, {
364
+ ...styles,
365
+ level: {
366
+ enumerable: true,
367
+ get() {
368
+ return this[GENERATOR].level;
369
+ },
370
+ set(level) {
371
+ this[GENERATOR].level = level;
372
+ }
373
+ }
374
+ });
375
+ const createStyler = (open, close, parent) => {
376
+ let openAll;
377
+ let closeAll;
378
+ if (parent === void 0) {
379
+ openAll = open;
380
+ closeAll = close;
381
+ } else {
382
+ openAll = parent.openAll + open;
383
+ closeAll = close + parent.closeAll;
384
+ }
385
+ return {
386
+ open,
387
+ close,
388
+ openAll,
389
+ closeAll,
390
+ parent
391
+ };
392
+ };
393
+ const createBuilder = (self, _styler, _isEmpty) => {
394
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
395
+ Object.setPrototypeOf(builder, proto);
396
+ builder[GENERATOR] = self;
397
+ builder[STYLER] = _styler;
398
+ builder[IS_EMPTY] = _isEmpty;
399
+ return builder;
400
+ };
401
+ const applyStyle = (self, string) => {
402
+ if (self.level <= 0 || !string) return self[IS_EMPTY] ? "" : string;
403
+ let styler = self[STYLER];
404
+ if (styler === void 0) return string;
405
+ const { openAll, closeAll } = styler;
406
+ if (string.includes("\x1B")) while (styler !== void 0) {
407
+ string = stringReplaceAll(string, styler.close, styler.open);
408
+ styler = styler.parent;
409
+ }
410
+ const lfIndex = string.indexOf("\n");
411
+ if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
412
+ return openAll + string + closeAll;
413
+ };
414
+ Object.defineProperties(createChalk.prototype, styles);
415
+ const chalk = createChalk();
416
+ const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
417
+ var source_default = chalk;
418
+
419
+ //#endregion
420
+ //#region src/util/base-command.ts
421
+ var BaseCommand = class extends __oclif_core.Command {
422
+ /**
423
+ * Called before the command's run() method.
424
+ * Override this in oclif to add common behavior.
425
+ */
426
+ async init() {
427
+ await super.init();
428
+ this.printApiHeader();
429
+ }
430
+ printApiHeader() {
431
+ const apiUrl = require_api.getApiUrl();
432
+ this.log(source_default.greenBright("------------------------------------------------"));
433
+ this.log(source_default.yellowBright(` [API Endpoint: ${apiUrl}] `));
434
+ this.log(source_default.greenBright("------------------------------------------------"));
435
+ this.log("");
436
+ }
437
+ };
438
+
439
+ //#endregion
440
+ Object.defineProperty(exports, 'BaseCommand', {
441
+ enumerable: true,
442
+ get: function () {
443
+ return BaseCommand;
444
+ }
445
+ });
446
+ Object.defineProperty(exports, 'source_default', {
447
+ enumerable: true,
448
+ get: function () {
449
+ return source_default;
450
+ }
451
+ });
package/dist/bin.cjs ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ const require_chunk = require('./chunk-CbDLau6x.cjs');
3
+ let node_process = require("node:process");
4
+ node_process = require_chunk.__toESM(node_process);
5
+ let __oclif_core = require("@oclif/core");
6
+ let path = require("path");
7
+
8
+ //#region src/bin.ts
9
+ if (node_process.default.stdout && node_process.default.stdout.setMaxListeners) node_process.default.stdout.setMaxListeners(50);
10
+ if (node_process.default.stderr && node_process.default.stderr.setMaxListeners) node_process.default.stderr.setMaxListeners(50);
11
+ (async () => {
12
+ await (0, __oclif_core.execute)({ dir: (0, path.join)(__dirname, "..") });
13
+ })();
14
+
15
+ //#endregion
@@ -0,0 +1,34 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ Object.defineProperty(exports, '__toESM', {
30
+ enumerable: true,
31
+ get: function () {
32
+ return __toESM;
33
+ }
34
+ });
@@ -0,0 +1,40 @@
1
+ const require_chunk = require('../../../chunk-CbDLau6x.cjs');
2
+ const require_base_command = require('../../../base-command-GfDxcqx6.cjs');
3
+ const require_api = require('../../../api-XWM8zKbb.cjs');
4
+ const require_api_client = require('../../../api-client-bnV0ib_r.cjs');
5
+ let __oclif_core = require("@oclif/core");
6
+
7
+ //#region src/commands/admin/config/set.ts
8
+ var AdminConfigSet = class AdminConfigSet extends require_base_command.BaseCommand {
9
+ static args = { value: __oclif_core.Args.string({ description: "value to set" }) };
10
+ static description = "This command is used to set global configuration keys in the DB (admin only)";
11
+ static examples = ["<%= config.bin %> <%= command.id %>"];
12
+ static flags = {
13
+ key: __oclif_core.Flags.string({
14
+ char: "c",
15
+ description: "key to set"
16
+ }),
17
+ apikey: __oclif_core.Flags.string({
18
+ char: "k",
19
+ description: "API key to use for authentication (overrides API_KEY env variable)"
20
+ })
21
+ };
22
+ async run() {
23
+ const { args, flags } = await this.parse(AdminConfigSet);
24
+ const requestKey = {
25
+ "PUMP_IMAGE_TAG": "pumpImageTag",
26
+ "pump-image-tag": "pumpImageTag",
27
+ "pumpImageTag": "pumpImageTag"
28
+ }[flags.key ?? "pumpImageTag"];
29
+ const value = args.value ?? "latest";
30
+ const [_response, error] = (await new require_api_client.ApiClient(require_api.getApiUrl(), flags.apikey || process.env.API_KEY).config.setGlobalKey(requestKey, value)).toTuple();
31
+ if (error) {
32
+ this.error(`Failed to set global config key: ${error.message}`);
33
+ return;
34
+ }
35
+ this.log(require_base_command.source_default.white(`Successfully set global config key: ${require_base_command.source_default.green(requestKey)} to ${require_base_command.source_default.yellowBright(value)}`));
36
+ }
37
+ };
38
+
39
+ //#endregion
40
+ module.exports = AdminConfigSet;
@@ -0,0 +1,83 @@
1
+ const require_chunk = require('../../../chunk-CbDLau6x.cjs');
2
+ const require_base_command = require('../../../base-command-GfDxcqx6.cjs');
3
+ const require_api = require('../../../api-XWM8zKbb.cjs');
4
+ const require_api_client = require('../../../api-client-bnV0ib_r.cjs');
5
+ let __oclif_core = require("@oclif/core");
6
+
7
+ //#region src/commands/admin/organization/create.ts
8
+ var AdminOrganizationCreate = class AdminOrganizationCreate extends require_base_command.BaseCommand {
9
+ static args = {
10
+ name: __oclif_core.Args.string({
11
+ description: "Organization name",
12
+ required: true
13
+ }),
14
+ userId: __oclif_core.Args.string({
15
+ description: "User ID to be set as organization owner",
16
+ required: true
17
+ })
18
+ };
19
+ static description = "Create a new organization (admin only)";
20
+ static examples = [
21
+ "<%= config.bin %> <%= command.id %> \"Acme Corp\" user_1234567890",
22
+ "<%= config.bin %> <%= command.id %> \"Tech Startup\" user_1234567890 --description=\"A cutting-edge technology company\"",
23
+ "<%= config.bin %> <%= command.id %> \"Enterprise Ltd\" user_1234567890 --description=\"Enterprise solutions\" --domain=\"enterprise.com\"",
24
+ "<%= config.bin %> <%= command.id %> \"Quick Org\" user_1234567890 --skipReconcilerJob",
25
+ "<%= config.bin %> <%= command.id %> \"Json Org\" user_1234567890 --json"
26
+ ];
27
+ static flags = {
28
+ json: __oclif_core.Flags.boolean({
29
+ char: "j",
30
+ description: "Output as JSON",
31
+ default: false
32
+ }),
33
+ description: __oclif_core.Flags.string({
34
+ char: "d",
35
+ description: "Organization description"
36
+ }),
37
+ domain: __oclif_core.Flags.string({
38
+ char: "D",
39
+ description: "Organization domain name"
40
+ }),
41
+ skipReconcilerJob: __oclif_core.Flags.boolean({
42
+ char: "s",
43
+ description: "Skip creating reconciler job for this organization",
44
+ default: false
45
+ }),
46
+ apikey: __oclif_core.Flags.string({
47
+ char: "k",
48
+ description: "API key to use for authentication (overrides API_KEY env variable)"
49
+ })
50
+ };
51
+ async run() {
52
+ const { args, flags } = await this.parse(AdminOrganizationCreate);
53
+ const apiClient = new require_api_client.ApiClient(require_api.getApiUrl(), flags.apikey || process.env.API_KEY);
54
+ const organizationData = {
55
+ name: args.name,
56
+ userId: args.userId,
57
+ ...flags.description && { description: flags.description },
58
+ ...flags.domain && { domainName: flags.domain },
59
+ skipReconcilerJob: flags.skipReconcilerJob
60
+ };
61
+ if (!flags.json) this.log(require_base_command.source_default.gray("Creating organization..."));
62
+ const [organization, error] = (await apiClient.admin.organizations.create(organizationData)).toTuple();
63
+ if (error) {
64
+ this.error(`Failed to create organization: ${error.message}`);
65
+ return;
66
+ }
67
+ if (flags.json) {
68
+ this.log(JSON.stringify(organization, null, 2));
69
+ return;
70
+ }
71
+ this.log(require_base_command.source_default.green("✓ Organization created successfully!"));
72
+ this.log(require_base_command.source_default.white(`ID: ${require_base_command.source_default.cyan(organization.id)}`));
73
+ this.log(require_base_command.source_default.white(`Name: ${require_base_command.source_default.cyan(organization.name)}`));
74
+ this.log(require_base_command.source_default.white(`Owner ID: ${require_base_command.source_default.cyan(organization.ownerId)}`));
75
+ if (organization.description) this.log(require_base_command.source_default.white(`Description: ${require_base_command.source_default.cyan(organization.description)}`));
76
+ if (organization.domainName) this.log(require_base_command.source_default.white(`Domain: ${require_base_command.source_default.cyan(organization.domainName)}`));
77
+ this.log(require_base_command.source_default.white(`Created: ${require_base_command.source_default.gray(organization.createdAt)}`));
78
+ this.log(require_base_command.source_default.green("✓ User has been automatically added as organization owner"));
79
+ }
80
+ };
81
+
82
+ //#endregion
83
+ module.exports = AdminOrganizationCreate;