pareto-host-nodejs 0.2.54 → 0.2.56

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 (178) hide show
  1. package/dist/execute_sandboxed/commands/command_executable.d.ts +0 -0
  2. package/dist/execute_sandboxed/commands/command_executable.js +25 -0
  3. package/dist/execute_sandboxed/commands/smelly_command_executable.d.ts +0 -0
  4. package/dist/execute_sandboxed/commands/smelly_command_executable.js +58 -0
  5. package/dist/execute_sandboxed/queries/query_executable.d.ts +0 -0
  6. package/dist/execute_sandboxed/queries/query_executable.js +63 -0
  7. package/dist/execute_sandboxed/resources.d.ts +0 -0
  8. package/dist/execute_sandboxed/resources.js +15 -0
  9. package/dist/execute_sandboxed/signatures.d.ts +10 -0
  10. package/dist/execute_sandboxed/signatures.js +3 -0
  11. package/dist/execute_unrestricted/commands/command_executable.d.ts +1 -1
  12. package/dist/execute_unrestricted/commands/command_executable.js +1 -1
  13. package/dist/execute_unrestricted/commands/smelly_command_executable.d.ts +1 -1
  14. package/dist/execute_unrestricted/commands/smelly_command_executable.js +1 -1
  15. package/dist/execute_unrestricted/queries/query_executable.d.ts +1 -1
  16. package/dist/execute_unrestricted/queries/query_executable.js +1 -1
  17. package/dist/execute_unrestricted/resources.d.ts +2 -0
  18. package/dist/execute_unrestricted/resources.js +16 -0
  19. package/dist/execute_unrestricted/signatures.d.ts +10 -0
  20. package/dist/execute_unrestricted/signatures.js +3 -0
  21. package/dist/file_system_sandboxed/commands/chmod.js +4 -4
  22. package/dist/file_system_sandboxed/commands/copy.js +4 -4
  23. package/dist/file_system_sandboxed/commands/make_directory.js +4 -4
  24. package/dist/file_system_sandboxed/commands/write_file.d.ts +1 -1
  25. package/dist/file_system_sandboxed/commands/write_file.js +2 -2
  26. package/dist/file_system_sandboxed/queries/read_directory.d.ts +0 -2
  27. package/dist/file_system_sandboxed/queries/read_directory.js +64 -83
  28. package/dist/file_system_sandboxed/queries/read_file.d.ts +0 -2
  29. package/dist/file_system_sandboxed/queries/read_file.js +51 -78
  30. package/dist/file_system_sandboxed/queries/stat.d.ts +1 -1
  31. package/dist/file_system_sandboxed/queries/stat.js +1 -1
  32. package/dist/file_system_sandboxed/queries/stat_possible_node.d.ts +0 -2
  33. package/dist/file_system_sandboxed/queries/stat_possible_node.js +38 -69
  34. package/dist/file_system_sandboxed/signatures.d.ts +0 -0
  35. package/dist/file_system_sandboxed/signatures.js +2 -0
  36. package/dist/file_system_unrestricted/commands/chmod.d.ts +1 -1
  37. package/dist/file_system_unrestricted/commands/chmod.js +1 -1
  38. package/dist/file_system_unrestricted/commands/copy.d.ts +1 -1
  39. package/dist/file_system_unrestricted/commands/copy.js +1 -1
  40. package/dist/file_system_unrestricted/commands/make_directory.d.ts +1 -1
  41. package/dist/file_system_unrestricted/commands/make_directory.js +1 -1
  42. package/dist/file_system_unrestricted/commands/remove.d.ts +1 -1
  43. package/dist/file_system_unrestricted/commands/remove.js +1 -1
  44. package/dist/file_system_unrestricted/commands/write_file.d.ts +1 -1
  45. package/dist/file_system_unrestricted/commands/write_file.js +1 -1
  46. package/dist/file_system_unrestricted/queries/read_directory.d.ts +1 -1
  47. package/dist/file_system_unrestricted/queries/read_directory.js +1 -1
  48. package/dist/file_system_unrestricted/queries/read_file.d.ts +1 -1
  49. package/dist/file_system_unrestricted/queries/read_file.js +1 -1
  50. package/dist/file_system_unrestricted/queries/stat.d.ts +1 -1
  51. package/dist/file_system_unrestricted/queries/stat.js +1 -1
  52. package/dist/file_system_unrestricted/queries/stat_possible_node.d.ts +1 -1
  53. package/dist/file_system_unrestricted/queries/stat_possible_node.js +1 -1
  54. package/dist/file_system_unrestricted/resources.d.ts +2 -0
  55. package/dist/file_system_unrestricted/resources.js +28 -0
  56. package/dist/file_system_unrestricted/signatures.d.ts +20 -0
  57. package/dist/file_system_unrestricted/signatures.js +3 -0
  58. package/dist/index.js +11 -67
  59. package/dist/signatures.d.ts +6 -48
  60. package/dist/stream/commands/log.d.ts +1 -1
  61. package/dist/stream/commands/log_error.d.ts +1 -1
  62. package/dist/stream/commands/write_to_stderr.d.ts +1 -1
  63. package/dist/stream/commands/write_to_stdout.d.ts +1 -1
  64. package/dist/stream/queries/get_instream_data.d.ts +1 -1
  65. package/dist/stream/resources.d.ts +2 -0
  66. package/dist/stream/resources.js +20 -0
  67. package/dist/stream/signatures.d.ts +14 -0
  68. package/dist/stream/signatures.js +3 -0
  69. package/dist/temp_core.d.ts +8 -0
  70. package/dist/{temp_create_command.js → temp_core.js} +1 -1
  71. package/package.json +1 -1
  72. package/dist/commands/chmod.d.ts +0 -2
  73. package/dist/commands/chmod.js +0 -107
  74. package/dist/commands/copy.d.ts +0 -2
  75. package/dist/commands/copy.js +0 -90
  76. package/dist/commands/execute/any_command_executable.d.ts +0 -7
  77. package/dist/commands/execute/any_command_executable.js +0 -81
  78. package/dist/commands/execute/any_smelly_command_executable.d.ts +0 -7
  79. package/dist/commands/execute/any_smelly_command_executable.js +0 -89
  80. package/dist/commands/execute_any_command_executable.d.ts +0 -7
  81. package/dist/commands/execute_any_command_executable.js +0 -81
  82. package/dist/commands/execute_any_smelly_command_executable.d.ts +0 -7
  83. package/dist/commands/execute_any_smelly_command_executable.js +0 -89
  84. package/dist/commands/fs/sandboxed/chmod.d.ts +0 -5
  85. package/dist/commands/fs/sandboxed/chmod.js +0 -51
  86. package/dist/commands/fs/sandboxed/copy.d.ts +0 -6
  87. package/dist/commands/fs/sandboxed/copy.js +0 -54
  88. package/dist/commands/fs/sandboxed/make_directory.d.ts +0 -5
  89. package/dist/commands/fs/sandboxed/make_directory.js +0 -51
  90. package/dist/commands/fs/sandboxed/remove.d.ts +0 -1
  91. package/dist/commands/fs/sandboxed/remove.js +0 -21
  92. package/dist/commands/fs/sandboxed/write_file.d.ts +0 -5
  93. package/dist/commands/fs/sandboxed/write_file.js +0 -51
  94. package/dist/commands/fs/unrestricted/chmod.d.ts +0 -2
  95. package/dist/commands/fs/unrestricted/chmod.js +0 -107
  96. package/dist/commands/fs/unrestricted/copy.d.ts +0 -2
  97. package/dist/commands/fs/unrestricted/copy.js +0 -90
  98. package/dist/commands/fs/unrestricted/make_directory.d.ts +0 -2
  99. package/dist/commands/fs/unrestricted/make_directory.js +0 -97
  100. package/dist/commands/fs/unrestricted/remove.d.ts +0 -2
  101. package/dist/commands/fs/unrestricted/remove.js +0 -84
  102. package/dist/commands/fs/unrestricted/write_file.d.ts +0 -2
  103. package/dist/commands/fs/unrestricted/write_file.js +0 -85
  104. package/dist/commands/log.d.ts +0 -2
  105. package/dist/commands/log.js +0 -56
  106. package/dist/commands/log_error.d.ts +0 -2
  107. package/dist/commands/log_error.js +0 -56
  108. package/dist/commands/make_directory.d.ts +0 -2
  109. package/dist/commands/make_directory.js +0 -97
  110. package/dist/commands/remove.d.ts +0 -2
  111. package/dist/commands/remove.js +0 -84
  112. package/dist/commands/stream/log.d.ts +0 -2
  113. package/dist/commands/stream/log.js +0 -56
  114. package/dist/commands/stream/log_error.d.ts +0 -2
  115. package/dist/commands/stream/log_error.js +0 -56
  116. package/dist/commands/stream/write_to_stderr.d.ts +0 -2
  117. package/dist/commands/stream/write_to_stderr.js +0 -17
  118. package/dist/commands/stream/write_to_stdout.d.ts +0 -2
  119. package/dist/commands/stream/write_to_stdout.js +0 -17
  120. package/dist/commands/write_file.d.ts +0 -2
  121. package/dist/commands/write_file.js +0 -85
  122. package/dist/commands/write_to_stderr.d.ts +0 -2
  123. package/dist/commands/write_to_stderr.js +0 -17
  124. package/dist/commands/write_to_stdout.d.ts +0 -2
  125. package/dist/commands/write_to_stdout.js +0 -17
  126. package/dist/file_system sandboxed/commands/chmod.d.ts +0 -5
  127. package/dist/file_system sandboxed/commands/chmod.js +0 -51
  128. package/dist/file_system sandboxed/commands/copy.d.ts +0 -6
  129. package/dist/file_system sandboxed/commands/copy.js +0 -54
  130. package/dist/file_system sandboxed/commands/make_directory.d.ts +0 -5
  131. package/dist/file_system sandboxed/commands/make_directory.js +0 -51
  132. package/dist/file_system sandboxed/commands/remove.d.ts +0 -1
  133. package/dist/file_system sandboxed/commands/remove.js +0 -21
  134. package/dist/file_system sandboxed/commands/write_file.d.ts +0 -5
  135. package/dist/file_system sandboxed/commands/write_file.js +0 -51
  136. package/dist/file_system unrestricted/commands/chmod.d.ts +0 -2
  137. package/dist/file_system unrestricted/commands/chmod.js +0 -107
  138. package/dist/file_system unrestricted/commands/copy.d.ts +0 -2
  139. package/dist/file_system unrestricted/commands/copy.js +0 -90
  140. package/dist/file_system unrestricted/commands/make_directory.d.ts +0 -2
  141. package/dist/file_system unrestricted/commands/make_directory.js +0 -97
  142. package/dist/file_system unrestricted/commands/remove.d.ts +0 -2
  143. package/dist/file_system unrestricted/commands/remove.js +0 -84
  144. package/dist/file_system unrestricted/commands/write_file.d.ts +0 -2
  145. package/dist/file_system unrestricted/commands/write_file.js +0 -85
  146. package/dist/file_system unrestricted/queries/read_directory.d.ts +0 -2
  147. package/dist/file_system unrestricted/queries/read_directory.js +0 -84
  148. package/dist/file_system unrestricted/queries/read_file.d.ts +0 -2
  149. package/dist/file_system unrestricted/queries/read_file.js +0 -79
  150. package/dist/file_system unrestricted/queries/stat.d.ts +0 -2
  151. package/dist/file_system unrestricted/queries/stat.js +0 -66
  152. package/dist/file_system unrestricted/queries/stat_possible_node.d.ts +0 -2
  153. package/dist/file_system unrestricted/queries/stat_possible_node.js +0 -70
  154. package/dist/queries/execute/any_query_executable.d.ts +0 -7
  155. package/dist/queries/execute/any_query_executable.js +0 -94
  156. package/dist/queries/execute_any_query_executable.d.ts +0 -7
  157. package/dist/queries/execute_any_query_executable.js +0 -94
  158. package/dist/queries/fs/unrestricted/read_directory.d.ts +0 -2
  159. package/dist/queries/fs/unrestricted/read_directory.js +0 -84
  160. package/dist/queries/fs/unrestricted/read_file.d.ts +0 -2
  161. package/dist/queries/fs/unrestricted/read_file.js +0 -79
  162. package/dist/queries/fs/unrestricted/stat.d.ts +0 -2
  163. package/dist/queries/fs/unrestricted/stat.js +0 -66
  164. package/dist/queries/fs/unrestricted/stat_possible_node.d.ts +0 -2
  165. package/dist/queries/fs/unrestricted/stat_possible_node.js +0 -70
  166. package/dist/queries/get_instream_data.d.ts +0 -2
  167. package/dist/queries/get_instream_data.js +0 -23
  168. package/dist/queries/read_directory.d.ts +0 -2
  169. package/dist/queries/read_directory.js +0 -84
  170. package/dist/queries/read_file.d.ts +0 -2
  171. package/dist/queries/read_file.js +0 -79
  172. package/dist/queries/stat.d.ts +0 -2
  173. package/dist/queries/stat.js +0 -66
  174. package/dist/queries/stat_possible_node.d.ts +0 -2
  175. package/dist/queries/stat_possible_node.js +0 -70
  176. package/dist/queries/stream/get_instream_data.d.ts +0 -2
  177. package/dist/queries/stream/get_instream_data.js +0 -23
  178. package/dist/temp_create_command.d.ts +0 -2
package/dist/index.js CHANGED
@@ -39,22 +39,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.run_main_command = void 0;
40
40
  const _p = __importStar(require("pareto-core/dist/assign"));
41
41
  __exportStar(require("./signatures"), exports);
42
- const command_executable_1 = require("./execute_unrestricted/commands/command_executable");
43
- const smelly_command_executable_1 = require("./execute_unrestricted/commands/smelly_command_executable");
44
- const chmod_1 = require("./file_system_unrestricted/commands/chmod");
45
- const copy_1 = require("./file_system_unrestricted/commands/copy");
46
- const make_directory_1 = require("./file_system_unrestricted/commands/make_directory");
47
- const remove_1 = require("./file_system_unrestricted/commands/remove");
48
- const write_file_1 = require("./file_system_unrestricted/commands/write_file");
49
- const log_1 = require("./stream/commands/log");
50
- const log_error_1 = require("./stream/commands/log_error");
51
- const write_to_stderr_1 = require("./stream/commands/write_to_stderr");
52
- const write_to_stdout_1 = require("./stream/commands/write_to_stdout");
53
- const query_executable_1 = require("./execute_unrestricted/queries/query_executable");
54
- const get_instream_data_1 = require("./stream/queries/get_instream_data");
55
- const read_directory_1 = require("./file_system_unrestricted/queries/read_directory");
56
- const read_file_1 = require("./file_system_unrestricted/queries/read_file");
57
- const stat_possible_node_1 = require("./file_system_unrestricted/queries/stat_possible_node");
42
+ const resources_1 = require("./execute_unrestricted/resources");
43
+ // import { $ as r_execute_sandboxed } from "./execute_sandboxed/resources"
44
+ const resources_2 = require("./stream/resources");
45
+ const resources_3 = require("./file_system_unrestricted/resources");
46
+ //import { $ as r_filesystem_sandboxed } from "./file_system_sandboxed/resources" --- IGNORE ---
58
47
  /**
59
48
  * Runs a program main function, passing command line arguments (excluding
60
49
  * `node` and the script name), and setting the process exit code to the
@@ -62,56 +51,11 @@ const stat_possible_node_1 = require("./file_system_unrestricted/queries/stat_po
62
51
  */
63
52
  const run_main_command = (get_main) => {
64
53
  get_main({
65
- 'execute unrestricted': {
66
- 'commands': {
67
- 'command executable': () => command_executable_1.$$,
68
- 'smelly command executable': () => smelly_command_executable_1.$$,
69
- },
70
- 'queries': {
71
- 'query executable': () => query_executable_1.$$,
72
- }
73
- },
74
- 'stream': {
75
- 'commands': {
76
- 'log error': () => log_error_1.$$,
77
- 'log': () => log_1.$$,
78
- 'write to stderr': () => write_to_stderr_1.$$,
79
- 'write to stdout': () => write_to_stdout_1.$$,
80
- },
81
- 'queries': {
82
- 'get instream data': () => get_instream_data_1.$$,
83
- }
84
- },
85
- // 'filesystem sandboxed': {
86
- // 'commands': {
87
- // 'chmod': p_fs_sandboxed_chmod,
88
- // 'copy': p_fs_sandboxed_copy,
89
- // 'make directory': p_fs_sandboxed_make_directory,
90
- // 'remove': p_fs_sandboxed_remove,
91
- // 'write file': p_fs_sandboxed_write_file,
92
- // },
93
- // 'queries': {
94
- // 'read directory': q_fs_sandboxed_read_directory,
95
- // 'read file': q_fs_sandboxed_read_file,
96
- // // 'stat': q_fs_sandboxed_stat,
97
- // 'stat possible node': q_fs_sandboxed_stat_possible_node,
98
- // }
99
- // },
100
- 'filesystem unrestricted': {
101
- 'commands': {
102
- 'chmod': () => chmod_1.$$,
103
- 'copy': () => copy_1.$$,
104
- 'make directory': () => make_directory_1.$$,
105
- 'remove': () => remove_1.$$,
106
- 'write file': () => write_file_1.$$,
107
- },
108
- 'queries': {
109
- 'read directory': () => read_directory_1.$$,
110
- 'read file': () => read_file_1.$$,
111
- // 'stat': () => q_fs_unrestricted_stat,
112
- 'stat possible node': () => stat_possible_node_1.$$,
113
- }
114
- },
54
+ 'execute unrestricted': resources_1.$,
55
+ // 'execute sandboxed': r_execute_sandboxed,
56
+ 'stream': resources_2.$,
57
+ 'filesystem unrestricted': resources_3.$,
58
+ //'filesystem sandboxed': r_filesystem_sandboxed,
115
59
  }).execute({
116
60
  'arguments': _p.list.literal(process.argv.slice(2))
117
61
  }, ($) => $).__start(() => {
@@ -120,4 +64,4 @@ const run_main_command = (get_main) => {
120
64
  });
121
65
  };
122
66
  exports.run_main_command = run_main_command;
123
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ0EsNERBQTZDO0FBSTdDLCtDQUE0QjtBQUU1QiwyRkFBMkc7QUFDM0cseUdBQXlIO0FBTXpILHFFQUF5RjtBQUN6RixtRUFBdUY7QUFDdkYsdUZBQTJHO0FBQzNHLHVFQUEyRjtBQUMzRiwrRUFBbUc7QUFDbkcsK0NBQTBEO0FBQzFELDJEQUFzRTtBQUN0RSx1RUFBa0Y7QUFDbEYsdUVBQWtGO0FBR2xGLHNGQUFzRztBQUN0RywwRUFBcUY7QUFLckYsc0ZBQTBHO0FBQzFHLDRFQUFnRztBQUVoRyw4RkFBa0g7QUFFbEg7Ozs7R0FJRztBQUNJLE1BQU0sZ0JBQWdCLEdBQVMsQ0FDbEMsUUFBUSxFQUNWLEVBQUU7SUFDQSxRQUFRLENBQUM7UUFDTCxzQkFBc0IsRUFBRTtZQUNwQixVQUFVLEVBQ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UsMkVBQTJFO0FBQzNFLGtEQUFrRDtBQUNsRCxvRUFBcUY7QUFDckYsZ0dBQWdHO0FBRWhHOzs7O0dBSUc7QUFDSSxNQUFNLGdCQUFnQixHQUFTLENBQ2xDLFFBQVEsRUFDVixFQUFFO0lBQ0EsUUFBUSxDQUFDO1FBQ0wsc0JBQXNCLEVBQUUsYUFBc0I7UUFDOUMsNENBQTRDO1FBQzVDLFFBQVEsRUFBRSxhQUFRO1FBQ2xCLHlCQUF5QixFQUFFLGFBQXlCO1FBQ3BELGlEQUFpRDtLQUNwRCxDQUFDLENBQUMsT0FBTyxDQUNOO1FBQ0ksV0FBVyxFQUFFLEVBQUUsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO0tBQ3RELEVBQ0QsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FDWCxDQUFDLE9BQU8sQ0FDTCxHQUFHLEVBQUU7SUFDTCxDQUFDLEVBQ0QsQ0FBQyxDQUFDLEVBQUUsRUFBRTtRQUNGLE9BQU8sQ0FBQyxRQUFRLEdBQUcsQ0FBQyxDQUFDLFdBQVcsQ0FBQyxDQUFBO0lBQ3JDLENBQUMsQ0FDSixDQUFBO0FBQ0wsQ0FBQyxDQUFBO0FBckJZLFFBQUEsZ0JBQWdCLG9CQXFCNUIifQ==
@@ -1,53 +1,11 @@
1
1
  import * as _pi from 'pareto-core/dist/interface';
2
- import * as d_chmod from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_chmod/data";
3
- import * as d_copy from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_copy/data";
4
- import * as d_execute_any_command_executable from "pareto-resources/dist/interface/generated/liana/schemas/execute_any_command_executable/data";
5
- import * as d_execute_any_smelly_command_executable from "pareto-resources/dist/interface/generated/liana/schemas/execute_any_smelly_command_executable/data";
6
- import * as d_execute_any_query_executable from "pareto-resources/dist/interface/generated/liana/schemas/execute_any_query_executable/data";
7
- import * as d_get_instream_data from "pareto-resources/dist/interface/generated/liana/schemas/stream_get_instream_data/data";
8
- import * as d_log from "pareto-resources/dist/interface/generated/liana/schemas/stream_log/data";
9
- import * as d_log_error from "pareto-resources/dist/interface/generated/liana/schemas/stream_log_error/data";
10
- import * as d_make_directory from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_make_directory/data";
11
- import * as d_read_directory from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_read_directory/data";
12
- import * as d_read_file from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_read_file/data";
13
- import * as d_remove from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_remove/data";
14
- import * as d_stat_possible_node from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_stat_possible_node/data";
15
- import * as d_write_file from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_write_file/data";
16
- import * as d_write_to_stderr from "pareto-resources/dist/interface/generated/liana/schemas/stream_write_to_stderr/data";
17
- import * as d_write_to_stdout from "pareto-resources/dist/interface/generated/liana/schemas/stream_write_to_stdout/data";
2
+ import * as d_filesystem_unrestricted from "./file_system_unrestricted/signatures";
3
+ import * as d_filesystem_stream from "./stream/signatures";
4
+ import * as d_execute_unrestricted from "./execute_unrestricted/signatures";
18
5
  import * as d_main from "pareto-resources/dist/interface/to_be_generated/temp_main";
19
- type Temp_Command_Creator<Error, Parameters, Creator_Parameters> = ($x: Creator_Parameters) => _pi.Command<Error, Parameters>;
20
- type Temp_Query_Creator<Output, Error, Parameters, Creator_Parameters> = ($x: Creator_Parameters) => _pi.Query<Output, Error, Parameters>;
21
- export type Resource_Collection<Commands, Queries> = {
22
- 'commands': Commands;
23
- 'queries': Queries;
24
- };
25
6
  export type Available_Standard_Resources = {
26
- 'filesystem unrestricted': Resource_Collection<{
27
- 'chmod': Temp_Command_Creator<d_chmod.Error, d_chmod.Parameters, null>;
28
- 'copy': Temp_Command_Creator<d_copy.Error, d_copy.Parameters, null>;
29
- 'make directory': Temp_Command_Creator<d_make_directory.Error, d_make_directory.Parameters, null>;
30
- 'remove': Temp_Command_Creator<d_remove.Error, d_remove.Parameters, null>;
31
- 'write file': Temp_Command_Creator<d_write_file.Error, d_write_file.Parameters, null>;
32
- }, {
33
- 'read directory': Temp_Query_Creator<d_read_directory.Result, d_read_directory.Error, d_read_directory.Parameters, null>;
34
- 'read file': Temp_Query_Creator<d_read_file.Result, d_read_file.Error, d_read_file.Parameters, null>;
35
- 'stat possible node': Temp_Query_Creator<d_stat_possible_node.Result, d_stat_possible_node.Error, d_stat_possible_node.Parameters, null>;
36
- }>;
37
- 'stream': Resource_Collection<{
38
- 'log error': Temp_Command_Creator<null, d_log_error.Parameters, null>;
39
- 'log': Temp_Command_Creator<null, d_log.Parameters, null>;
40
- 'write to stderr': Temp_Command_Creator<null, d_write_to_stderr.Parameters, null>;
41
- 'write to stdout': Temp_Command_Creator<null, d_write_to_stdout.Parameters, null>;
42
- }, {
43
- 'get instream data': Temp_Query_Creator<d_get_instream_data.Result, null, d_get_instream_data.Parameters, null>;
44
- }>;
45
- 'execute unrestricted': Resource_Collection<{
46
- 'command executable': Temp_Command_Creator<d_execute_any_command_executable.Error, d_execute_any_command_executable.Parameters, null>;
47
- 'smelly command executable': Temp_Command_Creator<d_execute_any_smelly_command_executable.Error, d_execute_any_smelly_command_executable.Parameters, null>;
48
- }, {
49
- 'query executable': Temp_Query_Creator<d_execute_any_query_executable.Result, d_execute_any_query_executable.Error, d_execute_any_query_executable.Parameters, null>;
50
- }>;
7
+ 'filesystem unrestricted': d_filesystem_unrestricted.Resources;
8
+ 'stream': d_filesystem_stream.Resources;
9
+ 'execute unrestricted': d_execute_unrestricted.Resources;
51
10
  };
52
11
  export type main = (get_main: ($r: Available_Standard_Resources) => _pi.Command<d_main.Error, d_main.Parameters>) => void;
53
- export {};
@@ -1,2 +1,2 @@
1
1
  import * as resources from "pareto-resources/dist/interface/resources";
2
- export declare const $$: resources.commands.stream_log;
2
+ export declare const $$: resources.stream.commands.log;
@@ -1,2 +1,2 @@
1
1
  import * as resources from "pareto-resources/dist/interface/resources";
2
- export declare const $$: resources.commands.stream_log_error;
2
+ export declare const $$: resources.stream.commands.log_error;
@@ -1,2 +1,2 @@
1
1
  import * as resources from "pareto-resources/dist/interface/resources";
2
- export declare const $$: resources.commands.stream_write_to_stderr;
2
+ export declare const $$: resources.stream.commands.write_to_stderr;
@@ -1,2 +1,2 @@
1
1
  import * as resources from "pareto-resources/dist/interface/resources";
2
- export declare const $$: resources.commands.stream_write_to_stdout;
2
+ export declare const $$: resources.stream.commands.write_to_stdout;
@@ -1,2 +1,2 @@
1
1
  import * as resources from "pareto-resources/dist/interface/resources";
2
- export declare const $$: resources.queries.stream_get_instream_data;
2
+ export declare const $$: resources.stream.queries.get_instream_data;
@@ -0,0 +1,2 @@
1
+ import { Resources } from "./signatures";
2
+ export declare const $: Resources;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.$ = void 0;
4
+ const log_error_1 = require("./commands/log_error");
5
+ const log_1 = require("./commands/log");
6
+ const write_to_stderr_1 = require("./commands/write_to_stderr");
7
+ const write_to_stdout_1 = require("./commands/write_to_stdout");
8
+ const get_instream_data_1 = require("./queries/get_instream_data");
9
+ exports.$ = {
10
+ 'commands': {
11
+ 'log error': () => log_error_1.$$,
12
+ 'log': () => log_1.$$,
13
+ 'write to stderr': () => write_to_stderr_1.$$,
14
+ 'write to stdout': () => write_to_stdout_1.$$,
15
+ },
16
+ 'queries': {
17
+ 'get instream data': () => get_instream_data_1.$$,
18
+ }
19
+ };
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb3VyY2VzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3N0cmVhbS9yZXNvdXJjZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsb0RBQStEO0FBQy9ELHdDQUFtRDtBQUNuRCxnRUFBMkU7QUFDM0UsZ0VBQTJFO0FBRTNFLG1FQUE4RTtBQUVqRSxRQUFBLENBQUMsR0FBYztJQUN4QixVQUFVLEVBQUU7UUFDUixXQUFXLEVBQUUsR0FBRyxFQUFFLENBQUMsY0FBa0I7UUFDckMsS0FBSyxFQUFFLEdBQUcsRUFBRSxDQUFDLFFBQVk7UUFDekIsaUJBQWlCLEVBQUUsR0FBRyxFQUFFLENBQUMsb0JBQXdCO1FBQ2pELGlCQUFpQixFQUFFLEdBQUcsRUFBRSxDQUFDLG9CQUF3QjtLQUVwRDtJQUNELFNBQVMsRUFBRTtRQUNQLG1CQUFtQixFQUFFLEdBQUcsRUFBRSxDQUFDLHNCQUEwQjtLQUN4RDtDQUNKLENBQUEifQ==
@@ -0,0 +1,14 @@
1
+ import * as _pi_temp from '../temp_core';
2
+ import * as d_get_instream_data from "pareto-resources/dist/interface/generated/liana/schemas/stream_get_instream_data/data";
3
+ import * as d_log from "pareto-resources/dist/interface/generated/liana/schemas/stream_log/data";
4
+ import * as d_log_error from "pareto-resources/dist/interface/generated/liana/schemas/stream_log_error/data";
5
+ import * as d_write_to_stderr from "pareto-resources/dist/interface/generated/liana/schemas/stream_write_to_stderr/data";
6
+ import * as d_write_to_stdout from "pareto-resources/dist/interface/generated/liana/schemas/stream_write_to_stdout/data";
7
+ export type Resources = _pi_temp.Resource_Collection<{
8
+ 'log error': _pi_temp.Command_Creator<null, d_log_error.Parameters, null>;
9
+ 'log': _pi_temp.Command_Creator<null, d_log.Parameters, null>;
10
+ 'write to stderr': _pi_temp.Command_Creator<null, d_write_to_stderr.Parameters, null>;
11
+ 'write to stdout': _pi_temp.Command_Creator<null, d_write_to_stdout.Parameters, null>;
12
+ }, {
13
+ 'get instream data': _pi_temp.Query_Creator<d_get_instream_data.Result, null, d_get_instream_data.Parameters, null>;
14
+ }>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2lnbmF0dXJlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdHJlYW0vc2lnbmF0dXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
@@ -0,0 +1,8 @@
1
+ import * as _pi from 'pareto-core/dist/interface';
2
+ export declare const __create_command: <Error, Command_Parameters, Creator_Parameters>(command_creator: (parameters: Creator_Parameters) => ($p: Command_Parameters) => _pi.Command_Promise<Error>) => ($x: Creator_Parameters) => _pi.Command<Error, Command_Parameters>;
3
+ export type Command_Creator<Error, Parameters, Creator_Parameters> = ($x: Creator_Parameters) => _pi.Command<Error, Parameters>;
4
+ export type Query_Creator<Output, Error, Parameters, Creator_Parameters> = ($x: Creator_Parameters) => _pi.Query<Output, Error, Parameters>;
5
+ export type Resource_Collection<Commands, Queries> = {
6
+ 'commands': Commands;
7
+ 'queries': Queries;
8
+ };
@@ -9,4 +9,4 @@ const __create_command = (command_creator) => {
9
9
  return ($x) => (0, command_1.default)(command_creator($x));
10
10
  };
11
11
  exports.__create_command = __create_command;
12
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVtcF9jcmVhdGVfY29tbWFuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy90ZW1wX2NyZWF0ZV9jb21tYW5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUNBLHlGQUFrRTtBQUczRCxNQUFNLGdCQUFnQixHQUFHLENBSzVCLGVBQTJHLEVBQ3pDLEVBQUU7SUFDcEUsT0FBTyxDQUFDLEVBQXNCLEVBQUUsRUFBRSxDQUFDLElBQUEsaUJBQVMsRUFDeEMsZUFBZSxDQUFDLEVBQUUsQ0FBQyxDQUN0QixDQUFBO0FBQ0wsQ0FBQyxDQUFBO0FBVlksUUFBQSxnQkFBZ0Isb0JBVTVCIn0=
12
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVtcF9jb3JlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3RlbXBfY29yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFDQSx5RkFBa0U7QUFHM0QsTUFBTSxnQkFBZ0IsR0FBRyxDQUs1QixlQUEyRyxFQUN6QyxFQUFFO0lBQ3BFLE9BQU8sQ0FBQyxFQUFzQixFQUFFLEVBQUUsQ0FBQyxJQUFBLGlCQUFTLEVBQ3hDLGVBQWUsQ0FBQyxFQUFFLENBQUMsQ0FDdEIsQ0FBQTtBQUNMLENBQUMsQ0FBQTtBQVZZLFFBQUEsZ0JBQWdCLG9CQVU1QiJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pareto-host-nodejs",
3
- "version": "0.2.54",
3
+ "version": "0.2.56",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Corno",
6
6
  "description": "the exupery core package for creating a main function in a nodejs host environment",
@@ -1,2 +0,0 @@
1
- import * as resources from "pareto-resources/dist/interface/resources";
2
- export declare const $$: resources.commands.fs_unrestricted_chmod;
@@ -1,107 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.$$ = void 0;
40
- const _p = __importStar(require("pareto-core/dist/assign"));
41
- const command_1 = __importDefault(require("pareto-core/dist/__internals/async/command"));
42
- const command_promise_1 = __importDefault(require("pareto-core/dist/__internals/async/command_promise"));
43
- //dependencies
44
- const fs_1 = require("fs");
45
- const t_path_to_text = __importStar(require("pareto-resources/dist/implementation/manual/transformers/path/text"));
46
- function permissions_to_octal(permissions) {
47
- let value = 0;
48
- if (permissions.read) {
49
- value += 4;
50
- }
51
- if (permissions.write) {
52
- value += 2;
53
- }
54
- if (permissions.execute) {
55
- value += 1;
56
- }
57
- return value;
58
- }
59
- exports.$$ = (0, command_1.default)(($p) => {
60
- return (0, command_promise_1.default)({
61
- 'execute': (on_success, on_error) => {
62
- // Convert permissions structure to numeric mode
63
- let mode = 0;
64
- // Special bits (optional)
65
- $p.mode['special bits'].__decide(($) => {
66
- if ($.setuid) {
67
- mode += 0o4000;
68
- }
69
- if ($.setgid) {
70
- mode += 0o2000;
71
- }
72
- if ($.sticky) {
73
- mode += 0o1000;
74
- }
75
- }, () => {
76
- // No special bits, do nothing
77
- });
78
- if ($p.mode['special bits'] !== null) {
79
- const specialBits = $p.mode['special bits'];
80
- }
81
- // Owner, group, others
82
- mode += permissions_to_octal($p.mode.owner) * 0o100;
83
- mode += permissions_to_octal($p.mode.group) * 0o10;
84
- mode += permissions_to_octal($p.mode.others) * 0o1;
85
- (0, fs_1.chmod)(t_path_to_text.Node_Path($p.path), mode, (err) => {
86
- if (err) {
87
- on_error({
88
- 'path': $p.path,
89
- 'type': _p.state.block(() => {
90
- if (err.code === 'ENOENT') {
91
- return ['path does not exist', null];
92
- }
93
- if (err.code === 'EACCES' || err.code === 'EPERM') {
94
- return ['permission denied', null];
95
- }
96
- throw new Error(`unhandled fs.chmod error code: ${err.code}`);
97
- })
98
- });
99
- }
100
- else {
101
- on_success();
102
- }
103
- });
104
- }
105
- });
106
- });
107
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2htb2QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tbWFuZHMvY2htb2QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ0EsNERBQTZDO0FBRTdDLHlGQUFrRTtBQUNsRSx5R0FBa0Y7QUFVbEYsY0FBYztBQUNkLDJCQUFzQztBQUN0QyxtSEFBb0c7QUFFcEcsU0FBUyxvQkFBb0IsQ0FBQyxXQUEwQjtJQUNwRCxJQUFJLEtBQUssR0FBRyxDQUFDLENBQUE7SUFDYixJQUFJLFdBQVcsQ0FBQyxJQUFJLEVBQUUsQ0FBQztRQUNuQixLQUFLLElBQUksQ0FBQyxDQUFBO0lBQ2QsQ0FBQztJQUNELElBQUksV0FBVyxDQUFDLEtBQUssRUFBRSxDQUFDO1FBQ3BCLEtBQUssSUFBSSxDQUFDLENBQUE7SUFDZCxDQUFD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kFDTixDQUFDO3FCQUFNLENBQUM7b0JBQ0osVUFBVSxFQUFFLENBQUE7Z0JBQ2hCLENBQUM7WUFDTCxDQUFDLENBQ0osQ0FBQTtRQUNMLENBQUM7S0FDSixDQUFDLENBQUE7QUFDTixDQUFDLENBQUMsQ0FBQSJ9
@@ -1,2 +0,0 @@
1
- import * as resources from "pareto-resources/dist/interface/resources";
2
- export declare const $$: resources.commands.fs_unrestricted_copy;
@@ -1,90 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.$$ = void 0;
40
- const _p = __importStar(require("pareto-core/dist/assign"));
41
- const command_1 = __importDefault(require("pareto-core/dist/__internals/async/command"));
42
- const command_promise_1 = __importDefault(require("pareto-core/dist/__internals/async/command_promise"));
43
- //dependencies
44
- const fs_1 = require("fs");
45
- const t_path_to_text = __importStar(require("pareto-resources/dist/implementation/manual/transformers/path/text"));
46
- exports.$$ = (0, command_1.default)(($p) => {
47
- return (0, command_promise_1.default)({
48
- 'execute': (on_success, on_error) => {
49
- const options = {};
50
- if ($p.options.recursive) {
51
- options.recursive = true;
52
- }
53
- if ($p.options.force) {
54
- options.force = true;
55
- }
56
- if ($p.options.errorOnExist) {
57
- options.errorOnExist = true;
58
- }
59
- (0, fs_1.cp)(t_path_to_text.Node_Path($p.source), t_path_to_text.Node_Path($p.target), options, (err) => {
60
- if (err) {
61
- on_error({
62
- 'path': $p.source,
63
- 'type': _p.state.block(() => {
64
- if (err.code === 'ENOENT') {
65
- return ['source does not exist', null];
66
- }
67
- if (err.code === 'EACCES' || err.code === 'EPERM') {
68
- return ['permission denied', null];
69
- }
70
- if (err.code === 'EISDIR' || err.code === 'ERR_FS_EISDIR') {
71
- return ['node is not a file', null];
72
- }
73
- if (err.code === 'EFBIG') {
74
- return ['file too large', null];
75
- }
76
- if (err.code === 'EIO' || err.code === 'ENXIO') {
77
- return ['device not ready', null];
78
- }
79
- throw new Error(`unhandled fs.cp error code: ${err.code}`);
80
- })
81
- });
82
- }
83
- else {
84
- on_success();
85
- }
86
- });
87
- }
88
- });
89
- });
90
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29weS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tYW5kcy9jb3B5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNBLDREQUE2QztBQUU3Qyx5RkFBa0U7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UFBO0FBQ04sQ0FBQyxDQUFDLENBQUEifQ==
@@ -1,7 +0,0 @@
1
- import * as resources from "pareto-resources/dist/interface/resources";
2
- /**
3
- *
4
- * The executable being executed is assumed to only cause side effects
5
- * and not return any meaningful data, std::out is therefor ignored
6
- */
7
- export declare const $$: resources.commands.execute_any_command_executable;
@@ -1,81 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.$$ = void 0;
40
- const _p = __importStar(require("pareto-core/dist/assign"));
41
- const command_1 = __importDefault(require("pareto-core/dist/__internals/async/command"));
42
- const command_promise_1 = __importDefault(require("pareto-core/dist/__internals/async/command_promise"));
43
- //dependencies
44
- const node_child_process_1 = require("node:child_process");
45
- const terminal_output_1 = require("../../terminal_output");
46
- const t_path_to_text = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/text"));
47
- /**
48
- *
49
- * The executable being executed is assumed to only cause side effects
50
- * and not return any meaningful data, std::out is therefor ignored
51
- */
52
- exports.$$ = (0, command_1.default)(($p) => {
53
- const args = $p.args.__get_raw_copy();
54
- return (0, command_promise_1.default)({
55
- 'execute': (on_success, on_error) => {
56
- const child = (0, node_child_process_1.spawn)($p.program, args, {
57
- 'cwd': $p['working directory'].__decide(($) => t_path_to_text.Context_Path($), () => undefined),
58
- 'shell': false, // ✅ direct execution, no shell, no quoting, no escaping, no env var expansion, no globbing
59
- });
60
- let stderrData = "";
61
- child.stderr.on("data", chunk => {
62
- stderrData += chunk.toString("utf8");
63
- });
64
- child.on("error", err => {
65
- on_error(['failed to spawn', { message: (0, terminal_output_1.Message)(err.message) }]);
66
- });
67
- child.on("close", exitCode => {
68
- if (exitCode === 0) {
69
- on_success();
70
- }
71
- else {
72
- on_error(['non zero exit code', {
73
- 'exit code': exitCode === null ? _p.optional.literal.not_set() : _p.optional.literal.set(exitCode),
74
- 'stderr': (0, terminal_output_1.Message)(stderrData),
75
- }]);
76
- }
77
- });
78
- }
79
- });
80
- });
81
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW55X2NvbW1hbmRfZXhlY3V0YWJsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21tYW5kcy9leGVjdXRlL2FueV9jb21tYW5kX2V4ZWN1dGFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ0EsNERBQTZDO0FBRTdDLHlG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BRSxPQUFPLEVBQUUsSUFBQSx5QkFBTyxFQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQTtZQUNwRSxDQUFDLENBQUMsQ0FBQTtZQUVGLEtBQUssQ0FBQyxFQUFFLENBQUMsT0FBTyxFQUFFLFFBQVEsQ0FBQyxFQUFFO2dCQUN6QixJQUFJLFFBQVEsS0FBSyxDQUFDLEVBQUUsQ0FBQztvQkFDakIsVUFBVSxFQUFFLENBQUE7Z0JBQ2hCLENBQUM7cUJBQU0sQ0FBQztvQkFDSixRQUFRLENBQUMsQ0FBQyxvQkFBb0IsRUFBRTs0QkFDNUIsV0FBVyxFQUFFLFFBQVEsS0FBSyxJQUFJLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFDLE9BQU8sRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDOzRCQUNsRyxRQUFRLEVBQUUsSUFBQSx5QkFBTyxFQUFDLFVBQVUsQ0FBQzt5QkFDaEMsQ0FBQyxDQUFDLENBQUE7Z0JBQ1AsQ0FBQztZQUNMLENBQUMsQ0FBQyxDQUFBO1FBQ04sQ0FBQztLQUNKLENBQUMsQ0FBQTtBQUNOLENBQUMsQ0FBQyxDQUFBIn0=
@@ -1,7 +0,0 @@
1
- import * as resources from "pareto-resources/dist/interface/resources";
2
- /**
3
- *
4
- * The executable being executed is assumed to only cause side effects
5
- * and not return any meaningful data, std::out is therefor ignored
6
- */
7
- export declare const $$: resources.commands.execute_any_smelly_command_executable;