pareto-host-nodejs 0.2.51 → 0.2.52

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 (134) hide show
  1. package/dist/commands/execute/any_command_executable.d.ts +7 -0
  2. package/dist/commands/execute/any_command_executable.js +81 -0
  3. package/dist/commands/execute/any_smelly_command_executable.d.ts +7 -0
  4. package/dist/commands/execute/any_smelly_command_executable.js +89 -0
  5. package/dist/commands/fs/sandboxed/chmod.d.ts +5 -0
  6. package/dist/commands/fs/sandboxed/chmod.js +51 -0
  7. package/dist/commands/fs/sandboxed/copy.d.ts +6 -0
  8. package/dist/commands/fs/sandboxed/copy.js +54 -0
  9. package/dist/commands/fs/sandboxed/make_directory.d.ts +5 -0
  10. package/dist/commands/fs/sandboxed/make_directory.js +51 -0
  11. package/dist/commands/fs/sandboxed/remove.d.ts +1 -0
  12. package/dist/commands/fs/sandboxed/remove.js +21 -0
  13. package/dist/commands/fs/sandboxed/write_file.d.ts +5 -0
  14. package/dist/commands/fs/sandboxed/write_file.js +51 -0
  15. package/dist/commands/fs/unrestricted/chmod.d.ts +2 -0
  16. package/dist/commands/fs/unrestricted/chmod.js +107 -0
  17. package/dist/commands/fs/unrestricted/copy.d.ts +2 -0
  18. package/dist/commands/fs/unrestricted/copy.js +90 -0
  19. package/dist/commands/fs/unrestricted/make_directory.d.ts +2 -0
  20. package/dist/commands/fs/unrestricted/make_directory.js +97 -0
  21. package/dist/commands/fs/unrestricted/remove.d.ts +2 -0
  22. package/dist/commands/fs/unrestricted/remove.js +84 -0
  23. package/dist/commands/fs/unrestricted/write_file.d.ts +2 -0
  24. package/dist/commands/fs/unrestricted/write_file.js +85 -0
  25. package/dist/commands/stream/log.d.ts +2 -0
  26. package/dist/commands/stream/log.js +56 -0
  27. package/dist/commands/stream/log_error.d.ts +2 -0
  28. package/dist/commands/stream/log_error.js +56 -0
  29. package/dist/commands/stream/write_to_stderr.d.ts +2 -0
  30. package/dist/commands/stream/write_to_stderr.js +17 -0
  31. package/dist/commands/stream/write_to_stdout.d.ts +2 -0
  32. package/dist/commands/stream/write_to_stdout.js +17 -0
  33. package/dist/execute_unrestricted/commands/command_executable.d.ts +7 -0
  34. package/dist/execute_unrestricted/commands/command_executable.js +81 -0
  35. package/dist/execute_unrestricted/commands/smelly_command_executable.d.ts +7 -0
  36. package/dist/execute_unrestricted/commands/smelly_command_executable.js +89 -0
  37. package/dist/execute_unrestricted/queries/query_executable.d.ts +7 -0
  38. package/dist/execute_unrestricted/queries/query_executable.js +94 -0
  39. package/dist/file_system sandboxed/commands/chmod.d.ts +5 -0
  40. package/dist/file_system sandboxed/commands/chmod.js +51 -0
  41. package/dist/file_system sandboxed/commands/copy.d.ts +6 -0
  42. package/dist/file_system sandboxed/commands/copy.js +54 -0
  43. package/dist/file_system sandboxed/commands/make_directory.d.ts +5 -0
  44. package/dist/file_system sandboxed/commands/make_directory.js +51 -0
  45. package/dist/file_system sandboxed/commands/remove.d.ts +1 -0
  46. package/dist/file_system sandboxed/commands/remove.js +21 -0
  47. package/dist/file_system sandboxed/commands/write_file.d.ts +5 -0
  48. package/dist/file_system sandboxed/commands/write_file.js +51 -0
  49. package/dist/file_system unrestricted/commands/chmod.d.ts +2 -0
  50. package/dist/file_system unrestricted/commands/chmod.js +107 -0
  51. package/dist/file_system unrestricted/commands/copy.d.ts +2 -0
  52. package/dist/file_system unrestricted/commands/copy.js +90 -0
  53. package/dist/file_system unrestricted/commands/make_directory.d.ts +2 -0
  54. package/dist/file_system unrestricted/commands/make_directory.js +97 -0
  55. package/dist/file_system unrestricted/commands/remove.d.ts +2 -0
  56. package/dist/file_system unrestricted/commands/remove.js +84 -0
  57. package/dist/file_system unrestricted/commands/write_file.d.ts +2 -0
  58. package/dist/file_system unrestricted/commands/write_file.js +85 -0
  59. package/dist/file_system unrestricted/queries/read_directory.d.ts +2 -0
  60. package/dist/file_system unrestricted/queries/read_directory.js +84 -0
  61. package/dist/file_system unrestricted/queries/read_file.d.ts +2 -0
  62. package/dist/file_system unrestricted/queries/read_file.js +79 -0
  63. package/dist/file_system unrestricted/queries/stat.d.ts +2 -0
  64. package/dist/file_system unrestricted/queries/stat.js +66 -0
  65. package/dist/file_system unrestricted/queries/stat_possible_node.d.ts +2 -0
  66. package/dist/file_system unrestricted/queries/stat_possible_node.js +70 -0
  67. package/dist/file_system_sandboxed/commands/chmod.d.ts +5 -0
  68. package/dist/file_system_sandboxed/commands/chmod.js +47 -0
  69. package/dist/file_system_sandboxed/commands/copy.d.ts +6 -0
  70. package/dist/file_system_sandboxed/commands/copy.js +50 -0
  71. package/dist/file_system_sandboxed/commands/make_directory.d.ts +5 -0
  72. package/dist/file_system_sandboxed/commands/make_directory.js +47 -0
  73. package/dist/file_system_sandboxed/commands/remove.d.ts +1 -0
  74. package/dist/file_system_sandboxed/commands/remove.js +21 -0
  75. package/dist/file_system_sandboxed/commands/write_file.d.ts +5 -0
  76. package/dist/file_system_sandboxed/commands/write_file.js +51 -0
  77. package/dist/file_system_sandboxed/queries/read_directory.d.ts +2 -0
  78. package/dist/file_system_sandboxed/queries/read_directory.js +84 -0
  79. package/dist/file_system_sandboxed/queries/read_file.d.ts +2 -0
  80. package/dist/file_system_sandboxed/queries/read_file.js +79 -0
  81. package/dist/file_system_sandboxed/queries/stat.d.ts +2 -0
  82. package/dist/file_system_sandboxed/queries/stat.js +66 -0
  83. package/dist/file_system_sandboxed/queries/stat_possible_node.d.ts +2 -0
  84. package/dist/file_system_sandboxed/queries/stat_possible_node.js +70 -0
  85. package/dist/file_system_unrestricted/commands/chmod.d.ts +2 -0
  86. package/dist/file_system_unrestricted/commands/chmod.js +107 -0
  87. package/dist/file_system_unrestricted/commands/copy.d.ts +2 -0
  88. package/dist/file_system_unrestricted/commands/copy.js +90 -0
  89. package/dist/file_system_unrestricted/commands/make_directory.d.ts +2 -0
  90. package/dist/file_system_unrestricted/commands/make_directory.js +97 -0
  91. package/dist/file_system_unrestricted/commands/remove.d.ts +2 -0
  92. package/dist/file_system_unrestricted/commands/remove.js +84 -0
  93. package/dist/file_system_unrestricted/commands/write_file.d.ts +2 -0
  94. package/dist/file_system_unrestricted/commands/write_file.js +85 -0
  95. package/dist/file_system_unrestricted/queries/read_directory.d.ts +2 -0
  96. package/dist/file_system_unrestricted/queries/read_directory.js +84 -0
  97. package/dist/file_system_unrestricted/queries/read_file.d.ts +2 -0
  98. package/dist/file_system_unrestricted/queries/read_file.js +79 -0
  99. package/dist/file_system_unrestricted/queries/stat.d.ts +2 -0
  100. package/dist/file_system_unrestricted/queries/stat.js +66 -0
  101. package/dist/file_system_unrestricted/queries/stat_possible_node.d.ts +2 -0
  102. package/dist/file_system_unrestricted/queries/stat_possible_node.js +70 -0
  103. package/dist/index.js +66 -37
  104. package/dist/queries/execute/any_query_executable.d.ts +7 -0
  105. package/dist/queries/execute/any_query_executable.js +94 -0
  106. package/dist/queries/execute_any_query_executable.js +2 -2
  107. package/dist/queries/fs/unrestricted/read_directory.d.ts +2 -0
  108. package/dist/queries/fs/unrestricted/read_directory.js +84 -0
  109. package/dist/queries/fs/unrestricted/read_file.d.ts +2 -0
  110. package/dist/queries/fs/unrestricted/read_file.js +79 -0
  111. package/dist/queries/fs/unrestricted/stat.d.ts +2 -0
  112. package/dist/queries/fs/unrestricted/stat.js +66 -0
  113. package/dist/queries/fs/unrestricted/stat_possible_node.d.ts +2 -0
  114. package/dist/queries/fs/unrestricted/stat_possible_node.js +70 -0
  115. package/dist/queries/read_directory.js +3 -3
  116. package/dist/queries/read_file.js +2 -2
  117. package/dist/queries/stat.js +2 -2
  118. package/dist/queries/stat_possible_node.js +2 -2
  119. package/dist/queries/stream/get_instream_data.d.ts +2 -0
  120. package/dist/queries/stream/get_instream_data.js +23 -0
  121. package/dist/signatures.d.ts +32 -20
  122. package/dist/stream/commands/log.d.ts +2 -0
  123. package/dist/stream/commands/log.js +56 -0
  124. package/dist/stream/commands/log_error.d.ts +2 -0
  125. package/dist/stream/commands/log_error.js +56 -0
  126. package/dist/stream/commands/write_to_stderr.d.ts +2 -0
  127. package/dist/stream/commands/write_to_stderr.js +17 -0
  128. package/dist/stream/commands/write_to_stdout.d.ts +2 -0
  129. package/dist/stream/commands/write_to_stdout.js +17 -0
  130. package/dist/stream/queries/get_instream_data.d.ts +2 -0
  131. package/dist/stream/queries/get_instream_data.js +23 -0
  132. package/dist/temp_create_command.d.ts +2 -0
  133. package/dist/temp_create_command.js +12 -0
  134. package/package.json +1 -1
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,89 @@
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
+ // import { Signature } from "pareto-resources/dist/interface/algorithms/commands/execute_smelly_procedure_executable"
48
+ /**
49
+ *
50
+ * The executable being executed is assumed to only cause side effects
51
+ * and not return any meaningful data, std::out is therefor ignored
52
+ */
53
+ exports.$$ = (0, command_1.default)(($p) => {
54
+ const args = $p.args.__get_raw_copy();
55
+ return (0, command_promise_1.default)({
56
+ 'execute': (on_success, on_error) => {
57
+ const child = (0, node_child_process_1.spawn)($p.program, args, {
58
+ 'cwd': $p['working directory'].__decide(($) => t_path_to_text.Context_Path($), () => undefined),
59
+ shell: false, // direct execution, no shell
60
+ stdio: ['pipe', 'pipe', 'pipe'], // explicitly pipe stdin, stdout, stderr
61
+ });
62
+ let stderrData = "";
63
+ let stdoutData = "";
64
+ child.stdout.on("data", chunk => {
65
+ stdoutData += chunk.toString("utf8");
66
+ });
67
+ child.stderr.on("data", chunk => {
68
+ stderrData += chunk.toString("utf8");
69
+ });
70
+ child.on("error", err => {
71
+ on_error(['failed to spawn', { message: (0, terminal_output_1.Message)(err.message) }]);
72
+ });
73
+ child.on("close", exitCode => {
74
+ //what does an exit code of null even mean?
75
+ if (exitCode === 0) {
76
+ on_success();
77
+ }
78
+ else {
79
+ on_error(['non zero exit code', {
80
+ 'exit code': exitCode === null ? _p.optional.literal.not_set() : _p.optional.literal.set(exitCode),
81
+ 'stderr': (0, terminal_output_1.Message)(stderrData),
82
+ 'stdout': (0, terminal_output_1.Message)(stdoutData),
83
+ }]);
84
+ }
85
+ });
86
+ }
87
+ });
88
+ });
89
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21lbGx5X2NvbW1hbmRfZXhlY3V0YWJsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGVjdXRlX3VucmVzdHJpY3RlZC9jb21tYW5kcy9zbWVsbHlfY29tbWFuZF9leGVjdXRhYmxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVBLDREQUE2QztBQUU3Qyx5RkFBa0U7QUFDbEUseUdBQWtGO0FBS2xGLGNBQWM7QUFDZCwyREFBMEM7QUFDMUMsMkRBQStDO0FBQy9DLGdJQUFpSDtBQUVqSCxzSEFBc0g7QUFHdEg7Ozs7R0FJRztBQUNVLFFBQUEsRUFBRSxHQUE2RCxJQUFBLGlCQUFTLEVBQUMsQ0FDbEYsRUFBRSxFQUNKLEVBQUU7SUFDQSxNQUFNLElBQUksR0FBRyxFQUFFLENBQUMsSUFBSSxDQUFDLGNBQWMsRUFBRSxDQUFBO0lBQ3JDLE9BQU8sSUFBQSx5QkFBaUIsRUFBQztRQUNyQixTQUFTLEVBQUUsQ0FBQyxVQUFVLEVBQUUsUUFBUSxFQUFFLEVBQUU7WUFFaEMsTUFBTSxLQUFLLEdBQUcsSUFBQSwwQkFBSyxFQUFDLEVBQUUsQ0FBQyxPQUFPLEVBQUUsSUFBSSxFQUFFO2dCQUNsQyxLQUFLLEVBQUUsRUFBRSxDQUFDLG1CQUFtQixDQUFDLENBQUMsUUFBUSxDQUNuQ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kFFM0MsSUFBSSxRQUFRLEtBQUssQ0FBQyxFQUFFLENBQUM7b0JBQ2pCLFVBQVUsRUFBRSxDQUFBO2dCQUNoQixDQUFDO3FCQUFNLENBQUM7b0JBQ0osUUFBUSxDQUFDLENBQUMsb0JBQW9CLEVBQUU7NEJBQzVCLFdBQVcsRUFBRSxRQUFRLEtBQUssSUFBSSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLFFBQVEsQ0FBQzs0QkFDbEcsUUFBUSxFQUFFLElBQUEseUJBQU8sRUFBQyxVQUFVLENBQUM7NEJBQzdCLFFBQVEsRUFBRSxJQUFBLHlCQUFPLEVBQUMsVUFBVSxDQUFDO3lCQUNoQyxDQUFDLENBQUMsQ0FBQTtnQkFDUCxDQUFDO1lBQ0wsQ0FBQyxDQUFDLENBQUE7UUFDTixDQUFDO0tBQ0osQ0FBQyxDQUFBO0FBQ04sQ0FBQyxDQUFDLENBQUEifQ==
@@ -0,0 +1,7 @@
1
+ import * as resources from "pareto-resources/dist/interface/resources";
2
+ /**
3
+ *
4
+ * The executable being executed is assumed to be side effect free
5
+ * There is no way to give guarantees about that though
6
+ */
7
+ export declare const $$: resources.queries.execute_any_query_executable;
@@ -0,0 +1,94 @@
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 query_1 = __importDefault(require("pareto-core/dist/__internals/async/query"));
42
+ const __query_result_1 = __importDefault(require("pareto-core/dist/__internals/async/__query_result"));
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 be side effect free
50
+ * There is no way to give guarantees about that though
51
+ */
52
+ exports.$$ = (0, query_1.default)(($p) => {
53
+ const args = $p.args.__get_raw_copy();
54
+ return (0, __query_result_1.default)((on_value, on_error) => {
55
+ const child = (0, node_child_process_1.spawn)($p.program, args, {
56
+ 'cwd': $p['working directory'].__decide(($) => t_path_to_text.Context_Path($), () => undefined),
57
+ shell: false, // ✅ no implicit parsing
58
+ });
59
+ let stdoutData = "";
60
+ let stderrData = "";
61
+ child.stdout.on("data", chunk => {
62
+ stdoutData += chunk.toString("utf8");
63
+ });
64
+ child.stderr.on("data", chunk => {
65
+ stderrData += chunk.toString("utf8");
66
+ });
67
+ child.on("error", err => {
68
+ on_error(_p.state.block(() => {
69
+ if (!(err instanceof Error)) {
70
+ throw new Error(`Expected an Error instance, got: ${typeof err}`);
71
+ }
72
+ return ['failed to spawn', {
73
+ message: (0, terminal_output_1.Message)(err.message),
74
+ }];
75
+ }));
76
+ });
77
+ child.on("close", exitCode => {
78
+ if (exitCode === 0) {
79
+ on_value({
80
+ 'stdout': (0, terminal_output_1.Message)(stdoutData),
81
+ });
82
+ }
83
+ else {
84
+ on_error(_p.state.block(() => {
85
+ return ['non zero exit code', {
86
+ 'exit code': exitCode === null ? _p.optional.literal.not_set() : _p.optional.literal.set(exitCode),
87
+ 'stderr': (0, terminal_output_1.Message)(stderrData),
88
+ }];
89
+ }));
90
+ }
91
+ });
92
+ });
93
+ });
94
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnlfZXhlY3V0YWJsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGVjdXRlX3VucmVzdHJpY3RlZC9xdWVyaWVzL3F1ZXJ5X2V4ZWN1dGFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ0EsNERBQTZDO0FBRTdDLHFGQUE4RDtBQUM5RCx1R0FBOEU7QUFLOUUsY0FBYztBQUNkLDJEQUEwQztBQUMxQywyREFBK0M7QUFDL0MsZ0lBQWlIO0FBR2pIOzs7O0dBSUc7QUFDVSxRQUFBLEVBQUUsR0FBbUQsSUFBQSxlQUFPLEVBQ3JFLENBQUMsRUFBRSxFQUFHLEVBQUU7SUFDSixNQUFNLElBQUksR0FBRyxFQUFFLENBQ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WUFDUCxDQUFDO1FBQ0wsQ0FBQyxDQUFDLENBQUE7SUFDTixDQUFDLENBQUMsQ0FBQTtBQUNOLENBQUMsQ0FDSixDQUFBIn0=
@@ -0,0 +1,5 @@
1
+ import * as d_fs_unrestricted_path from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_path/data";
2
+ import * as resources from "pareto-resources/dist/interface/resources";
3
+ export declare const $$: ($x: {
4
+ 'context': d_fs_unrestricted_path.Context_Path;
5
+ }) => resources.commands.fs_sandboxed_chmod;
@@ -0,0 +1,51 @@
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 command_1 = __importDefault(require("pareto-core/dist/__internals/async/command"));
41
+ //dependencies
42
+ const c_unrestricted = __importStar(require("../unrestricted/chmod"));
43
+ const t_sandboxed_path_to_unrestricted_path = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/sandboxed_path"));
44
+ const $$ = ($x) => (0, command_1.default)(($p) => c_unrestricted.$$.execute({
45
+ 'mode': $p.mode,
46
+ 'path': t_sandboxed_path_to_unrestricted_path.Node_Path($p.path, {
47
+ 'context': $x.context,
48
+ }),
49
+ }, ($) => $));
50
+ exports.$$ = $$;
51
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2htb2QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZmlsZV9zeXN0ZW0gc2FuZGJveGVkL2NvbW1hbmRzL2NobW9kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUdBLHlGQUFrRTtBQVlsRSxjQUFjO0FBQ2Qsc0VBQXVEO0FBQ3ZELGlLQUFrSjtBQUUzSSxNQUFNLEVBQUUsR0FJOEIsQ0FBQyxFQUFFLEVBQUUsRUFBRSxDQUFDLElBQUEsaUJBQVMsRUFDMUQsQ0FBQyxFQUFFLEVBQUUsRUFBRSxDQUFDLGNBQWMsQ0FBQyxFQUFFLENBQUMsT0FBTyxDQUM3QjtJQUNJLE1BQU0sRUFBRSxFQUFFLENBQUMsSUFBSTtJQUNmLE1BQU0sRUFBRSxxQ0FBcUMsQ0FBQyxTQUFTLENBQ25ELEVBQUUsQ0FBQyxJQUFJLEVBQ1A7UUFDSSxTQUFTLEVBQUUsRUFBRSxDQUFDLE9BQU87S0FDeEIsQ0FDSjtDQUNKLEVBQ0QsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FDWCxDQUNKLENBQUE7QUFqQlksUUFBQSxFQUFFLE1BaUJkIn0=
@@ -0,0 +1,6 @@
1
+ import * as d_fs_unrestricted_path from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_path/data";
2
+ import * as resources from "pareto-resources/dist/interface/resources";
3
+ export declare const $$: ($x: {
4
+ 'source context': d_fs_unrestricted_path.Context_Path;
5
+ 'target context': d_fs_unrestricted_path.Context_Path;
6
+ }) => resources.commands.fs_sandboxed_copy;
@@ -0,0 +1,54 @@
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 command_1 = __importDefault(require("pareto-core/dist/__internals/async/command"));
41
+ //dependencies
42
+ const c_unrestricted = __importStar(require("../unrestricted/copy"));
43
+ const t_sandboxed_path_to_unrestricted_path = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/sandboxed_path"));
44
+ const $$ = ($x) => (0, command_1.default)(($p) => c_unrestricted.$$.execute({
45
+ 'options': $p.options,
46
+ 'target': t_sandboxed_path_to_unrestricted_path.Node_Path($p.target, {
47
+ 'context': $x['target context'],
48
+ }),
49
+ 'source': t_sandboxed_path_to_unrestricted_path.Node_Path($p.source, {
50
+ 'context': $x['source context'],
51
+ }),
52
+ }, ($) => $));
53
+ exports.$$ = $$;
54
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29weS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9maWxlX3N5c3RlbSBzYW5kYm94ZWQvY29tbWFuZHMvY29weS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFHQSx5RkFBa0U7QUFZbEUsY0FBYztBQUNkLHFFQUFzRDtBQUN0RCxpS0FBa0o7QUFFM0ksTUFBTSxFQUFFLEdBSzZCLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxJQUFBLGlCQUFTLEVBQ3pELENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxjQUFjLENBQUMsRUFBRSxDQUFDLE9BQU8sQ0FDN0I7SUFDSSxTQUFTLEVBQUUsRUFBRSxDQUFDLE9BQU87SUFDckIsUUFBUSxFQUFFLHFDQUFxQyxDQUFDLFNBQVMsQ0FDckQsRUFBRSxDQUFDLE1BQU0sRUFDVDtRQUNJLFNBQVMsRUFBRSxFQUFFLENBQUMsZ0JBQWdCLENBQUM7S0FDbEMsQ0FDSjtJQUNELFFBQVEsRUFBRSxxQ0FBcUMsQ0FBQyxTQUFTLENBQ3JELEVBQUUsQ0FBQyxNQUFNLEVBQ1Q7UUFDSSxTQUFTLEVBQUUsRUFBRSxDQUFDLGdCQUFnQixDQUFDO0tBQ2xDLENBQ0o7Q0FDSixFQUNELENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQ1gsQ0FDSixDQUFBO0FBeEJZLFFBQUEsRUFBRSxNQXdCZCJ9
@@ -0,0 +1,5 @@
1
+ import * as d_fs_unrestricted_path from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_path/data";
2
+ import * as resources from "pareto-resources/dist/interface/resources";
3
+ export declare const $$: ($x: {
4
+ 'context': d_fs_unrestricted_path.Context_Path;
5
+ }) => resources.commands.fs_sandboxed_make_directory;
@@ -0,0 +1,51 @@
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 command_1 = __importDefault(require("pareto-core/dist/__internals/async/command"));
41
+ //dependencies
42
+ const c_unrestricted = __importStar(require("../unrestricted/make_directory"));
43
+ const t_sandboxed_path_to_unrestricted_path = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/sandboxed_path"));
44
+ const $$ = ($x) => (0, command_1.default)(($p) => c_unrestricted.$$.execute({
45
+ 'delete existing': $p['delete existing'],
46
+ 'path': t_sandboxed_path_to_unrestricted_path.Node_Path($p.path, {
47
+ 'context': $x.context,
48
+ }),
49
+ }, ($) => $));
50
+ exports.$$ = $$;
51
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFrZV9kaXJlY3RvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZmlsZV9zeXN0ZW0gc2FuZGJveGVkL2NvbW1hbmRzL21ha2VfZGlyZWN0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUdBLHlGQUFrRTtBQVlsRSxjQUFjO0FBQ2QsK0VBQWdFO0FBQ2hFLGlLQUFrSjtBQUUzSSxNQUFNLEVBQUUsR0FJdUMsQ0FBQyxFQUFFLEVBQUUsRUFBRSxDQUFDLElBQUEsaUJBQVMsRUFDbkUsQ0FBQyxFQUFFLEVBQUUsRUFBRSxDQUFDLGNBQWMsQ0FBQyxFQUFFLENBQUMsT0FBTyxDQUM3QjtJQUNJLGlCQUFpQixFQUFFLEVBQUUsQ0FBQyxpQkFBaUIsQ0FBQztJQUN4QyxNQUFNLEVBQUUscUNBQXFDLENBQUMsU0FBUyxDQUNuRCxFQUFFLENBQUMsSUFBSSxFQUNQO1FBQ0ksU0FBUyxFQUFFLEVBQUUsQ0FBQyxPQUFPO0tBQ3hCLENBQ0o7Q0FDSixFQUNELENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQ1gsQ0FDSixDQUFBO0FBakJZLFFBQUEsRUFBRSxNQWlCZCJ9
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // export const $$: (
4
+ // $x: {
5
+ // 'context': d_fs_unrestricted_path.Context_Path
6
+ // }
7
+ // ) => resources.commands.fs_sandboxed_remove = ($x) => __command(
8
+ // ($p) => c_unrestricted.$$.execute(
9
+ // {
10
+ // 'error if not exists': $p['error if not exists'],
11
+ // 'path': t_sandboxed_path_to_unrestricted_path.Context_Path(
12
+ // $p.path,
13
+ // {
14
+ // 'context': $x.context,
15
+ // }
16
+ // ),
17
+ // },
18
+ // ($) => $
19
+ // )
20
+ // )
21
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVtb3ZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2ZpbGVfc3lzdGVtIHNhbmRib3hlZC9jb21tYW5kcy9yZW1vdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFtQkEscUJBQXFCO0FBQ3JCLFlBQVk7QUFDWix5REFBeUQ7QUFDekQsUUFBUTtBQUNSLG1FQUFtRTtBQUNuRSx5Q0FBeUM7QUFDekMsWUFBWTtBQUNaLGdFQUFnRTtBQUNoRSwwRUFBMEU7QUFDMUUsMkJBQTJCO0FBQzNCLG9CQUFvQjtBQUNwQiw2Q0FBNkM7QUFDN0Msb0JBQW9CO0FBQ3BCLGlCQUFpQjtBQUNqQixhQUFhO0FBQ2IsbUJBQW1CO0FBQ25CLFFBQVE7QUFDUixJQUFJIn0=
@@ -0,0 +1,5 @@
1
+ import * as d_fs_unrestricted_path from "pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_path/data";
2
+ import * as resources from "pareto-resources/dist/interface/resources";
3
+ export declare const $$: ($x: {
4
+ 'context': d_fs_unrestricted_path.Context_Path;
5
+ }) => resources.commands.fs_sandboxed_write_file;
@@ -0,0 +1,51 @@
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 command_1 = __importDefault(require("pareto-core/dist/__internals/async/command"));
41
+ //dependencies
42
+ const c_unrestricted = __importStar(require("../unrestricted/write_file"));
43
+ const t_sandboxed_path_to_unrestricted_path = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/sandboxed_path"));
44
+ const $$ = ($x) => (0, command_1.default)(($p) => c_unrestricted.$$.execute({
45
+ 'data': $p.data,
46
+ 'path': t_sandboxed_path_to_unrestricted_path.Node_Path($p.path, {
47
+ 'context': $x.context,
48
+ }),
49
+ }, ($) => $));
50
+ exports.$$ = $$;
51
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JpdGVfZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9maWxlX3N5c3RlbSBzYW5kYm94ZWQvY29tbWFuZHMvd3JpdGVfZmlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFHQSx5RkFBa0U7QUFZbEUsY0FBYztBQUNkLDJFQUE0RDtBQUM1RCxpS0FBa0o7QUFFM0ksTUFBTSxFQUFFLEdBSW1DLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxJQUFBLGlCQUFTLEVBQy9ELENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxjQUFjLENBQUMsRUFBRSxDQUFDLE9BQU8sQ0FDN0I7SUFDSSxNQUFNLEVBQUUsRUFBRSxDQUFDLElBQUk7SUFDZixNQUFNLEVBQUUscUNBQXFDLENBQUMsU0FBUyxDQUNuRCxFQUFFLENBQUMsSUFBSSxFQUNQO1FBQ0ksU0FBUyxFQUFFLEVBQUUsQ0FBQyxPQUFPO0tBQ3hCLENBQ0o7Q0FDSixFQUNELENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQ1gsQ0FDSixDQUFBO0FBakJZLFFBQUEsRUFBRSxNQWlCZCJ9
@@ -0,0 +1,2 @@
1
+ import * as resources from "pareto-resources/dist/interface/resources";
2
+ export declare const $$: resources.commands.fs_unrestricted_chmod;
@@ -0,0 +1,107 @@
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/unrestricted_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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2htb2QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZmlsZV9zeXN0ZW0gdW5yZXN0cmljdGVkL2NvbW1hbmRzL2NobW9kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNBLDREQUE2QztBQUU3Qyx5RkFBa0U7QUFDbEUseUdBQWtGO0FBVWxGLGNBQWM7QUFDZCwyQkFBc0M7QUFDdEMsZ0lBQWlIO0FBRWpILFNBQVMsb0JBQW9CLENBQUMsV0FBMEI7SUFDcEQsSUFBSSxLQUFLLEdBQUcsQ0FBQyxDQUFBO0lBQ2IsSUFBSSxXQUFXLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDbkIsS0FBSyxJQUFJLENBQUMsQ0FBQTtJQUNkLENBQUM7SUFDRCxJQUFJLFdBQVcsQ0FBQyxLQUFLLEVBQUUsQ0FBQztRQUNwQixLQUFLLElBQUksQ0FBQyxDQUFBO0lBQ2QsQ0FBQztJQUNELElBQUksV0FBVyxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ3RCLEtBQUssSUFBSSxDQUFDLENBQUE7SUFDZCxDQUFDO0lBQ0QsT0FBTyxLQUFLLENBQUE7QUFDaEIsQ0FBQztBQUVZLFFBQUEsRUFBRSxHQUE2QyxJQUFBLGlCQUFTLEVBQUMsQ0FDbEUsRUFBRSxFQUNKLEVBQUU7SUFDQSxPQUFPLElBQUEseUJBQWlCLEVBQUM7U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