@fromeroc9/testform 1.0.12 → 1.0.13

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 (70) hide show
  1. package/dist/index.js +360 -649
  2. package/package.json +12 -6
  3. package/dist/action/index.js +0 -242
  4. package/dist/action.js +0 -60
  5. package/dist/adapters/github.js +0 -467
  6. package/dist/adapters/resources.js +0 -363
  7. package/dist/cli/136.index.js +0 -990
  8. package/dist/cli/360.index.js +0 -92
  9. package/dist/cli/443.index.js +0 -724
  10. package/dist/cli/449.index.js +0 -13
  11. package/dist/cli/566.index.js +0 -385
  12. package/dist/cli/605.index.js +0 -241
  13. package/dist/cli/762.index.js +0 -583
  14. package/dist/cli/869.index.js +0 -529
  15. package/dist/cli/956.index.js +0 -117
  16. package/dist/cli/998.index.js +0 -894
  17. package/dist/cli/index.js +0 -241
  18. package/dist/commands/apply.js +0 -390
  19. package/dist/commands/destroy.js +0 -85
  20. package/dist/commands/diff.js +0 -131
  21. package/dist/commands/fmt.js +0 -166
  22. package/dist/commands/force-unlock.js +0 -55
  23. package/dist/commands/generate.js +0 -143
  24. package/dist/commands/graph.js +0 -159
  25. package/dist/commands/import.js +0 -222
  26. package/dist/commands/init.js +0 -167
  27. package/dist/commands/login.js +0 -71
  28. package/dist/commands/logout.js +0 -20
  29. package/dist/commands/plan.js +0 -250
  30. package/dist/commands/refresh.js +0 -165
  31. package/dist/commands/report.js +0 -724
  32. package/dist/commands/show.js +0 -61
  33. package/dist/commands/state.js +0 -197
  34. package/dist/commands/taint.js +0 -49
  35. package/dist/commands/validate.js +0 -128
  36. package/dist/commands/workspace.js +0 -102
  37. package/dist/const.js +0 -105
  38. package/dist/core/backends/azurerm.js +0 -201
  39. package/dist/core/backends/backend.js +0 -2
  40. package/dist/core/backends/gcs.js +0 -200
  41. package/dist/core/backends/local.js +0 -162
  42. package/dist/core/backends/s3.js +0 -224
  43. package/dist/core/command-context.js +0 -59
  44. package/dist/core/config.js +0 -131
  45. package/dist/core/credentials.js +0 -53
  46. package/dist/core/parser.js +0 -62
  47. package/dist/core/parsers/base-parser.js +0 -215
  48. package/dist/core/parsers/testcase-parser.js +0 -115
  49. package/dist/core/parsers/testplan-parser.js +0 -41
  50. package/dist/core/parsers/testrun-parser.js +0 -43
  51. package/dist/core/policy.js +0 -341
  52. package/dist/core/prompt.js +0 -109
  53. package/dist/core/state.js +0 -185
  54. package/dist/core/utils.js +0 -94
  55. package/dist/core/variables.js +0 -108
  56. package/dist/core/workspace.js +0 -56
  57. package/dist/help.js +0 -797
  58. package/dist/logger.js +0 -134
  59. package/dist/notify.js +0 -36
  60. package/dist/types.js +0 -2
  61. /package/dist/{action/136.index.js → 136.index.js} +0 -0
  62. /package/dist/{action/360.index.js → 360.index.js} +0 -0
  63. /package/dist/{action/443.index.js → 443.index.js} +0 -0
  64. /package/dist/{action/449.index.js → 449.index.js} +0 -0
  65. /package/dist/{action/566.index.js → 566.index.js} +0 -0
  66. /package/dist/{action/605.index.js → 605.index.js} +0 -0
  67. /package/dist/{action/762.index.js → 762.index.js} +0 -0
  68. /package/dist/{action/869.index.js → 869.index.js} +0 -0
  69. /package/dist/{action/956.index.js → 956.index.js} +0 -0
  70. /package/dist/{action/998.index.js → 998.index.js} +0 -0
package/dist/logger.js DELETED
@@ -1,134 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.logger = exports.Logger = void 0;
4
- const chalk_1 = require("chalk");
5
- class Logger {
6
- verbose = false;
7
- isJson = false;
8
- constructor(verbose = false, isJson = false) {
9
- this.verbose = verbose;
10
- this.isJson = isJson;
11
- }
12
- applyStyle(text, options) {
13
- let styled = text;
14
- if (options?.bold)
15
- styled = (0, chalk_1.bold)(styled);
16
- if (options?.dim)
17
- styled = (0, chalk_1.dim)(styled);
18
- return styled;
19
- }
20
- emitJson(level, message, data) {
21
- const payload = {
22
- "@level": level,
23
- "@message": message,
24
- "@module": "testform.ui",
25
- "@timestamp": new Date().toISOString(),
26
- "type": "log"
27
- };
28
- if (data) {
29
- payload.data = data;
30
- }
31
- console.log(JSON.stringify(payload));
32
- }
33
- formatMessage(message) {
34
- return Array.isArray(message) ? message.join('\n') : message;
35
- }
36
- debug(message, options) {
37
- if (!this.verbose)
38
- return;
39
- const msgStr = this.formatMessage(message);
40
- if (this.isJson) {
41
- this.emitJson("debug", msgStr, options?.data);
42
- return;
43
- }
44
- const showPrefix = options?.prefix !== false;
45
- const prefix = showPrefix ? (0, chalk_1.dim)(`[DEBUG] `) : '';
46
- const styledMsg = this.applyStyle(msgStr, options);
47
- console.log(`${prefix}${(0, chalk_1.gray)(styledMsg)}`);
48
- if (options?.data)
49
- console.log((0, chalk_1.gray)(JSON.stringify(options.data, null, 2)));
50
- }
51
- info(message, options) {
52
- const msgStr = this.formatMessage(message);
53
- if (this.isJson) {
54
- this.emitJson("info", msgStr, options?.data);
55
- return;
56
- }
57
- const showPrefix = options?.prefix === true; // No prefix by default
58
- const prefix = showPrefix ? (0, chalk_1.cyan)(`[INFO] `) : '';
59
- const styledMsg = this.applyStyle(msgStr, options);
60
- console.log(`${prefix}${styledMsg}`);
61
- if (options?.data && this.verbose)
62
- console.log((0, chalk_1.gray)(JSON.stringify(options.data, null, 2)));
63
- }
64
- success(message, options) {
65
- const msgStr = this.formatMessage(message);
66
- if (this.isJson) {
67
- this.emitJson("info", msgStr, options?.data);
68
- return;
69
- }
70
- const showPrefix = options?.prefix === true; // No prefix by default
71
- const prefix = showPrefix ? (0, chalk_1.green)(`[✓] `) : '';
72
- const styledMsg = this.applyStyle((0, chalk_1.green)(msgStr), options);
73
- console.log(`${prefix}${styledMsg}`);
74
- if (options?.data && this.verbose)
75
- console.log((0, chalk_1.gray)(JSON.stringify(options.data, null, 2)));
76
- }
77
- warn(message, options) {
78
- const msgStr = this.formatMessage(message);
79
- if (this.isJson) {
80
- this.emitJson("warn", msgStr, options?.data);
81
- return;
82
- }
83
- console.error((0, chalk_1.yellow)('╷'));
84
- const prefix = (0, chalk_1.bold)((0, chalk_1.yellow)('Warning:'));
85
- const styledMsg = this.applyStyle(msgStr, options);
86
- console.error(`${(0, chalk_1.yellow)('│')} ${prefix} ${styledMsg}`);
87
- if (options?.data && this.verbose) {
88
- console.error((0, chalk_1.yellow)('│'));
89
- const dataStr = JSON.stringify(options.data, null, 2);
90
- dataStr.split('\n').forEach(line => console.error(`${(0, chalk_1.yellow)('│')} ${line}`));
91
- }
92
- console.error((0, chalk_1.yellow)('╵'));
93
- }
94
- error(message, error) {
95
- const msgStr = this.formatMessage(message);
96
- if (this.isJson) {
97
- this.emitJson("error", msgStr, error ? (error instanceof Error ? error.stack : error) : undefined);
98
- process.exit(1);
99
- return;
100
- }
101
- console.error((0, chalk_1.red)('╷'));
102
- const prefix = (0, chalk_1.bold)((0, chalk_1.red)('Error:'));
103
- const lines = msgStr.split('\n');
104
- console.error(`${(0, chalk_1.red)('│')} ${prefix} ${(0, chalk_1.bold)(lines[0])}`);
105
- for (let i = 1; i < lines.length; i++) {
106
- console.error(`${(0, chalk_1.red)('│')} ${lines[i]}`);
107
- }
108
- if (error) {
109
- console.error((0, chalk_1.red)('│'));
110
- if (error instanceof Error) {
111
- console.error(`${(0, chalk_1.red)('│')} ${error.message}`);
112
- if (this.verbose && error.stack) {
113
- error.stack.split('\n').forEach(line => console.error(`${(0, chalk_1.red)('│')} ${(0, chalk_1.dim)(line)}`));
114
- }
115
- }
116
- else if (typeof error === 'object') {
117
- const str = JSON.stringify(error, null, 2);
118
- str.split('\n').forEach(line => console.error(`${(0, chalk_1.red)('│')} ${line}`));
119
- }
120
- else {
121
- console.error(`${(0, chalk_1.red)('│')} ${String(error)}`);
122
- }
123
- }
124
- console.error((0, chalk_1.red)('╵'));
125
- process.exit(1);
126
- }
127
- blank() {
128
- if (this.isJson)
129
- return;
130
- console.log('');
131
- }
132
- }
133
- exports.Logger = Logger;
134
- exports.logger = new Logger();
package/dist/notify.js DELETED
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.notify = void 0;
4
- const chalk_1 = require("chalk");
5
- class Notify {
6
- push(options) {
7
- const isWarning = options.type === 'warning';
8
- const prefix = isWarning ? (0, chalk_1.bold)((0, chalk_1.yellow)('Warning:')) : (0, chalk_1.bold)((0, chalk_1.red)('Error:'));
9
- const lineColor = isWarning ? chalk_1.yellow : chalk_1.red;
10
- const title = (0, chalk_1.bold)(options.title);
11
- const close = options.close ?? false;
12
- console.log(lineColor('╷'));
13
- console.log(`${lineColor('│')} ${prefix} ${title}`);
14
- console.log(lineColor('│'));
15
- if (options.detail) {
16
- const detailLines = options.detail;
17
- for (const line of detailLines) {
18
- console.log(`${lineColor('│')} ${line}`);
19
- }
20
- }
21
- if (options.extra) {
22
- const extraLines = options.extra;
23
- for (const line of extraLines) {
24
- console.log(`${lineColor('│')} ${line}`);
25
- }
26
- }
27
- console.log(lineColor('╵'));
28
- if (close)
29
- process.exit(1);
30
- }
31
- refresh(resourceId, remoteId) {
32
- const state = remoteId ? (0, chalk_1.dim)(`[id=${remoteId}]`) : '';
33
- console.log(`${(0, chalk_1.cyan)(resourceId)}: Refreshing state... ${state}`);
34
- }
35
- }
36
- exports.notify = new Notify();
package/dist/types.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes