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,70 @@
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 fs_1 = require("fs");
45
+ const t_path_to_text = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/text"));
46
+ exports.$$ = (0, query_1.default)(($p) => {
47
+ return (0, __query_result_1.default)((on_value, on_error) => {
48
+ (0, fs_1.stat)(t_path_to_text.Node_Path($p), (err, stats) => {
49
+ if (err) {
50
+ if (err.code === 'ENOENT') {
51
+ on_value(['does not exist', null]);
52
+ }
53
+ else {
54
+ on_error({
55
+ 'path': $p,
56
+ 'type': _p.state.block(() => {
57
+ throw new Error(`unhandled fs.stat error code: ${err.code}`);
58
+ })
59
+ });
60
+ }
61
+ }
62
+ else {
63
+ on_value(stats.isFile()
64
+ ? ['file', null]
65
+ : ['directory', null]);
66
+ }
67
+ });
68
+ });
69
+ });
70
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdF9wb3NzaWJsZV9ub2RlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2ZpbGVfc3lzdGVtIHVucmVzdHJpY3RlZC9xdWVyaWVzL3N0YXRfcG9zc2libGVfbm9kZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFDQSw0REFBNkM7QUFFN0MscUZBQThEO0FBQzlELHVHQUE4RTtBQU05RSxjQUFjO0FBQ2QsMkJBQW9DO0FBQ3BDLGdJQUFpSDtBQUVwRyxRQUFBLEVBQUUsR0FBeUQsSUFBQSxlQUFPLEVBQUMsQ0FDNUUsRUFBRSxFQUNKLEVBQUU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
2
+ import * as d_fs_sandboxed from "pareto-resources/dist/interface/generated/liana/schemas/fs_sandboxed_chmod/data";
3
+ export declare const $$: ($x: {
4
+ context: d_fs_unrestricted_path.Context_Path;
5
+ }) => import("pareto-core/dist/interface").Command<import("pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_chmod/data").Error_, d_fs_sandboxed.Parameters_>;
@@ -0,0 +1,47 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.$$ = void 0;
37
+ const temp_create_command_1 = require("../../temp_create_command");
38
+ //dependencies
39
+ const c_unrestricted = __importStar(require("../../file_system_unrestricted/commands/chmod"));
40
+ const t_sandboxed_path_to_unrestricted_path = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/sandboxed_path"));
41
+ exports.$$ = (0, temp_create_command_1.__create_command)(($x) => ($p) => c_unrestricted.$$.execute({
42
+ 'mode': $p.mode,
43
+ 'path': t_sandboxed_path_to_unrestricted_path.Node_Path($p.path, {
44
+ 'context': $x.context,
45
+ }),
46
+ }, ($) => $));
47
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2htb2QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZmlsZV9zeXN0ZW1fc2FuZGJveGVkL2NvbW1hbmRzL2NobW9kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLG1FQUE0RDtBQU01RCxjQUFjO0FBQ2QsOEZBQStFO0FBQy9FLGlLQUFrSjtBQUdySSxRQUFBLEVBQUUsR0FBRyxJQUFBLHNDQUFnQixFQUM5QixDQUNJLEVBRUMsRUFDSCxFQUFFLENBQUMsQ0FBQyxFQUE2QixFQUFFLEVBQUUsQ0FBQyxjQUFjLENBQUMsRUFBRSxDQUFDLE9BQU8sQ0FDN0Q7SUFDSSxNQUFNLEVBQUUsRUFBRSxDQUFDLElBQUk7SUFDZixNQUFNLEVBQUUscUNBQXFDLENBQUMsU0FBUyxDQUNuRCxFQUFFLENBQUMsSUFBSSxFQUNQO1FBQ0ksU0FBUyxFQUFFLEVBQUUsQ0FBQyxPQUFPO0tBQ3hCLENBQ0o7Q0FDSixFQUNELENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQ1gsQ0FDSixDQUFBIn0=
@@ -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 d_fs_sandboxed from "pareto-resources/dist/interface/generated/liana/schemas/fs_sandboxed_copy/data";
3
+ export declare const $$: ($x: {
4
+ 'source context': d_fs_unrestricted_path.Context_Path;
5
+ 'target context': d_fs_unrestricted_path.Context_Path;
6
+ }) => import("pareto-core/dist/interface").Command<import("pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_copy/data").Error_, d_fs_sandboxed.Parameters_>;
@@ -0,0 +1,50 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.$$ = void 0;
37
+ const temp_create_command_1 = require("../../temp_create_command");
38
+ //dependencies
39
+ const c_unrestricted = __importStar(require("../../file_system_unrestricted/commands/copy"));
40
+ const t_sandboxed_path_to_unrestricted_path = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/sandboxed_path"));
41
+ exports.$$ = (0, temp_create_command_1.__create_command)(($x) => ($p) => c_unrestricted.$$.execute({
42
+ 'options': $p.options,
43
+ 'target': t_sandboxed_path_to_unrestricted_path.Node_Path($p.target, {
44
+ 'context': $x['target context'],
45
+ }),
46
+ 'source': t_sandboxed_path_to_unrestricted_path.Node_Path($p.source, {
47
+ 'context': $x['source context'],
48
+ }),
49
+ }, ($) => $));
50
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29weS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9maWxlX3N5c3RlbV9zYW5kYm94ZWQvY29tbWFuZHMvY29weS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxtRUFBNEQ7QUFNNUQsY0FBYztBQUNkLDZGQUE4RTtBQUM5RSxpS0FBa0o7QUFHckksUUFBQSxFQUFFLEdBQUcsSUFBQSxzQ0FBZ0IsRUFDOUIsQ0FDSSxFQUdDLEVBQ0gsRUFBRSxDQUFDLENBQUMsRUFBNkIsRUFBRSxFQUFFLENBQUMsY0FBYyxDQUFDLEVBQUUsQ0FBQyxPQUFPLENBQzdEO0lBQ0ksU0FBUyxFQUFFLEVBQUUsQ0FBQyxPQUFPO0lBQ3JCLFFBQVEsRUFBRSxxQ0FBcUMsQ0FBQyxTQUFTLENBQ3JELEVBQUUsQ0FBQyxNQUFNLEVBQ1Q7UUFDSSxTQUFTLEVBQUUsRUFBRSxDQUFDLGdCQUFnQixDQUFDO0tBQ2xDLENBQ0o7SUFDRCxRQUFRLEVBQUUscUNBQXFDLENBQUMsU0FBUyxDQUNyRCxFQUFFLENBQUMsTUFBTSxFQUNUO1FBQ0ksU0FBUyxFQUFFLEVBQUUsQ0FBQyxnQkFBZ0IsQ0FBQztLQUNsQyxDQUNKO0NBQ0osRUFDRCxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUNYLENBQ0osQ0FBQSJ9
@@ -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 d_fs_sandboxed from "pareto-resources/dist/interface/generated/liana/schemas/fs_sandboxed_make_directory/data";
3
+ export declare const $$: ($x: {
4
+ context: d_fs_unrestricted_path.Context_Path;
5
+ }) => import("pareto-core/dist/interface").Command<import("pareto-resources/dist/interface/generated/liana/schemas/fs_unrestricted_make_directory/data").Error_, d_fs_sandboxed.Parameters_>;
@@ -0,0 +1,47 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.$$ = void 0;
37
+ const temp_create_command_1 = require("../../temp_create_command");
38
+ //dependencies
39
+ const c_unrestricted = __importStar(require("../../file_system_unrestricted/commands/make_directory"));
40
+ const t_sandboxed_path_to_unrestricted_path = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/sandboxed_path"));
41
+ exports.$$ = (0, temp_create_command_1.__create_command)(($x) => ($p) => c_unrestricted.$$.execute({
42
+ 'delete existing': $p['delete existing'],
43
+ 'path': t_sandboxed_path_to_unrestricted_path.Node_Path($p.path, {
44
+ 'context': $x.context,
45
+ }),
46
+ }, ($) => $));
47
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFrZV9kaXJlY3RvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZmlsZV9zeXN0ZW1fc2FuZGJveGVkL2NvbW1hbmRzL21ha2VfZGlyZWN0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLG1FQUE0RDtBQU01RCxjQUFjO0FBQ2QsdUdBQXdGO0FBQ3hGLGlLQUFrSjtBQUdySSxRQUFBLEVBQUUsR0FBRyxJQUFBLHNDQUFnQixFQUM5QixDQUNJLEVBRUMsRUFDSCxFQUFFLENBQUMsQ0FBQyxFQUE2QixFQUFFLEVBQUUsQ0FBQyxjQUFjLENBQUMsRUFBRSxDQUFDLE9BQU8sQ0FDN0Q7SUFDSSxpQkFBaUIsRUFBRSxFQUFFLENBQUMsaUJBQWlCLENBQUM7SUFDeEMsTUFBTSxFQUFFLHFDQUFxQyxDQUFDLFNBQVMsQ0FDbkQsRUFBRSxDQUFDLElBQUksRUFDUDtRQUNJLFNBQVMsRUFBRSxFQUFFLENBQUMsT0FBTztLQUN4QixDQUNKO0NBQ0osRUFDRCxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUNYLENBQ0osQ0FBQSJ9
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // export const $$ = __create_command(
4
+ // (
5
+ // $x: {
6
+ // 'context': d_fs_unrestricted_path.Context_Path
7
+ // }
8
+ // ) => ($p: d_fs_sandboxed.Parameters) => c_unrestricted.$$.execute(
9
+ // {
10
+ // 'error if not exists': $p['error if not exists'],
11
+ // 'path': t_sandboxed_path_to_unrestricted_path.Node_Path(
12
+ // $p.path,
13
+ // {
14
+ // 'context': $x.context,
15
+ // }
16
+ // ),
17
+ // },
18
+ // ($) => $
19
+ // )
20
+ // )
21
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVtb3ZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2ZpbGVfc3lzdGVtX3NhbmRib3hlZC9jb21tYW5kcy9yZW1vdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFXQSxzQ0FBc0M7QUFDdEMsUUFBUTtBQUNSLGdCQUFnQjtBQUNoQiw2REFBNkQ7QUFDN0QsWUFBWTtBQUNaLHlFQUF5RTtBQUN6RSxZQUFZO0FBQ1osZ0VBQWdFO0FBQ2hFLHVFQUF1RTtBQUN2RSwyQkFBMkI7QUFDM0Isb0JBQW9CO0FBQ3BCLDZDQUE2QztBQUM3QyxvQkFBb0I7QUFDcEIsaUJBQWlCO0FBQ2pCLGFBQWE7QUFDYixtQkFBbUI7QUFDbkIsUUFBUTtBQUNSLElBQUkifQ==
@@ -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("../../file_system_unrestricted/commands/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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JpdGVfZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9maWxlX3N5c3RlbV9zYW5kYm94ZWQvY29tbWFuZHMvd3JpdGVfZmlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFHQSx5RkFBa0U7QUFZbEUsY0FBYztBQUNkLG1HQUFvRjtBQUNwRixpS0FBa0o7QUFFM0ksTUFBTSxFQUFFLEdBSW1DLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxJQUFBLGlCQUFTLEVBQy9ELENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxjQUFjLENBQUMsRUFBRSxDQUFDLE9BQU8sQ0FDN0I7SUFDSSxNQUFNLEVBQUUsRUFBRSxDQUFDLElBQUk7SUFDZixNQUFNLEVBQUUscUNBQXFDLENBQUMsU0FBUyxDQUNuRCxFQUFFLENBQUMsSUFBSSxFQUNQO1FBQ0ksU0FBUyxFQUFFLEVBQUUsQ0FBQyxPQUFPO0tBQ3hCLENBQ0o7Q0FDSixFQUNELENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQ1gsQ0FDSixDQUFBO0FBakJZLFFBQUEsRUFBRSxNQWlCZCJ9
@@ -0,0 +1,2 @@
1
+ import * as resources from "pareto-resources/dist/interface/resources";
2
+ export declare const $$: resources.queries.fs_unrestricted_read_directory;
@@ -0,0 +1,84 @@
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 _p_unreachable_code_path_1 = __importDefault(require("pareto-core/dist/_p_unreachable_code_path"));
42
+ const query_1 = __importDefault(require("pareto-core/dist/__internals/async/query"));
43
+ const __query_result_1 = __importDefault(require("pareto-core/dist/__internals/async/__query_result"));
44
+ //dependencies
45
+ const fs_1 = require("fs");
46
+ const t_path_to_text = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/text"));
47
+ const t_path_to_path = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/unrestricted_path"));
48
+ exports.$$ = (0, query_1.default)(($p) => {
49
+ return (0, __query_result_1.default)((on_value, on_error) => {
50
+ (0, fs_1.readdir)(t_path_to_text.Context_Path($p.path), {
51
+ 'encoding': 'utf-8',
52
+ 'withFileTypes': true,
53
+ }, (err, nodes) => {
54
+ if (err) {
55
+ on_error({
56
+ 'path': $p.path,
57
+ 'type': _p.state.block(() => {
58
+ if (err.code === 'ENOENT') {
59
+ return ['directory does not exist', null];
60
+ }
61
+ if (err.code === 'ENOTDIR' || err.code === 'EISDIR') {
62
+ return ['node is not a directory', null];
63
+ }
64
+ throw new Error(`unhandled fs.readdir error code: ${err.code}`);
65
+ })
66
+ });
67
+ }
68
+ else {
69
+ on_value(_p.dictionary.from.list(_p.list.literal(nodes)).convert(($) => $.name, ($) => ({
70
+ 'node type': $.isFile()
71
+ ? ['file', null]
72
+ : $.isDirectory() ? ['directory', null] : ['other', null],
73
+ 'context directory': $p.path,
74
+ 'path': t_path_to_path.create_node_path($p.path, {
75
+ 'node': $.name,
76
+ })
77
+ }), {
78
+ duplicate_id: ($) => (0, _p_unreachable_code_path_1.default)("the nodejs api guarantees that all items will have a unique name")
79
+ }));
80
+ }
81
+ });
82
+ });
83
+ });
84
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhZF9kaXJlY3RvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZmlsZV9zeXN0ZW1fc2FuZGJveGVkL3F1ZXJpZXMvcmVhZF9kaXJlY3RvcnkudHMiXSwibmFtZ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0FDSixDQUFBO0lBQ0wsQ0FBQyxDQUFDLENBQUE7QUFDTixDQUFDLENBQUMsQ0FBQSJ9
@@ -0,0 +1,2 @@
1
+ import * as resources from "pareto-resources/dist/interface/resources";
2
+ export declare const $$: resources.queries.fs_unrestricted_read_file;
@@ -0,0 +1,79 @@
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 _p_list_from_text_1 = __importDefault(require("pareto-core/dist/_p_list_from_text"));
42
+ const query_1 = __importDefault(require("pareto-core/dist/__internals/async/query"));
43
+ const __query_result_1 = __importDefault(require("pareto-core/dist/__internals/async/__query_result"));
44
+ //dependencies
45
+ const t_path_to_text = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/text"));
46
+ const fs_1 = require("fs");
47
+ exports.$$ = (0, query_1.default)(($p) => {
48
+ return (0, __query_result_1.default)((on_value, on_error) => {
49
+ (0, fs_1.readFile)(t_path_to_text.Node_Path($p), { 'encoding': 'utf-8' }, (err, data) => {
50
+ if (err) {
51
+ on_error({
52
+ 'path': $p,
53
+ 'type': _p.state.block(() => {
54
+ if (err.code === 'ENOENT') {
55
+ return ['file does not exist', null];
56
+ }
57
+ if (err.code === 'EACCES' || err.code === 'EPERM') {
58
+ return ['permission denied', null];
59
+ }
60
+ if (err.code === 'EISDIR' || err.code === 'ENOTDIR') {
61
+ return ['node is not a file', null];
62
+ }
63
+ if (err.code === 'EFBIG') {
64
+ return ['file too large', null];
65
+ }
66
+ if (err.code === 'EIO' || err.code === 'ENXIO') {
67
+ return ['device not ready', null];
68
+ }
69
+ throw new Error(`unhandled fs.readFile error code: ${err.code}`);
70
+ })
71
+ });
72
+ }
73
+ else {
74
+ on_value((0, _p_list_from_text_1.default)(data, ($) => $));
75
+ }
76
+ });
77
+ });
78
+ });
79
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhZF9maWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2ZpbGVfc3lzdGVtX3NhbmRib3hlZC9xdWVyaWVzL3JlYWRfZmlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFDQSw0REFBNkM7QUFDN0MsMkZBQWtFO0FBRWxFLHFGQUE4RDtBQUM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HLENBQUMsSUFBSSxLQUFLLE9BQU8sRUFBRSxDQUFDOzRCQUN2QixPQUFPLENBQUMsZ0JBQWdCLEVBQUUsSUFBSSxDQUFDLENBQUE7d0JBQ25DLENBQUM7d0JBQ0QsSUFBSSxHQUFHLENBQUMsSUFBSSxLQUFLLEtBQUssSUFBSSxHQUFHLENBQUMsSUFBSSxLQUFLLE9BQU8sRUFBRSxDQUFDOzRCQUM3QyxPQUFPLENBQUMsa0JBQWtCLEVBQUUsSUFBSSxDQUFDLENBQUE7d0JBQ3JDLENBQUM7d0JBQ0QsTUFBTSxJQUFJLEtBQUssQ0FBQyxxQ0FBcUMsR0FBRyxDQUFDLElBQUksRUFBRSxDQUFDLENBQUE7b0JBQ3BFLENBQUMsQ0FBQztpQkFDTCxDQUFDLENBQUE7WUFDTixDQUFDO2lCQUFNLENBQUM7Z0JBQ0osUUFBUSxDQUFDLElBQUEsMkJBQWlCLEVBQ3RCLElBQUksRUFDSixDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUNYLENBQUMsQ0FBQTtZQUNOLENBQUM7UUFDTCxDQUFDLENBQ0osQ0FBQTtJQUNMLENBQUMsQ0FBQyxDQUFBO0FBQ04sQ0FBQyxDQUFDLENBQUEifQ==
@@ -0,0 +1,2 @@
1
+ import * as resources from "pareto-resources/dist/interface/resources";
2
+ export declare const $$: resources.queries.fs_unrestricted_stat;
@@ -0,0 +1,66 @@
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 fs_1 = require("fs");
45
+ const t_path_to_text = __importStar(require("pareto-resources/dist/implementation/manual/transformers/unrestricted_path/text"));
46
+ exports.$$ = (0, query_1.default)(($p) => {
47
+ return (0, __query_result_1.default)((on_value, on_error) => {
48
+ (0, fs_1.stat)(t_path_to_text.Node_Path($p), (err, stats) => {
49
+ if (err) {
50
+ on_error({
51
+ 'path': $p,
52
+ 'type': _p.state.block(() => {
53
+ if (err.code === 'ENOENT') {
54
+ return ['node does not exist', null];
55
+ }
56
+ throw new Error(`unhandled fs.stat error code: ${err.code}`);
57
+ })
58
+ });
59
+ }
60
+ on_value(stats.isFile()
61
+ ? ['file', null]
62
+ : ['directory', null]);
63
+ });
64
+ });
65
+ });
66
+ //# sourceMappingUR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UE7WUFDTixDQUFDO1lBQ0QsUUFBUSxDQUFDLEtBQUssQ0FBQyxNQUFNLEVBQUU7Z0JBQ25CLENBQUMsQ0FBQyxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUM7Z0JBQ2hCLENBQUMsQ0FBQyxDQUFDLFdBQVcsRUFBRSxJQUFJLENBQUMsQ0FDeEIsQ0FBQTtRQUNMLENBQUMsQ0FDSixDQUFBO0lBQ0wsQ0FBQyxDQUFDLENBQUE7QUFDTixDQUFDLENBQUMsQ0FBQSJ9
@@ -0,0 +1,2 @@
1
+ import * as resources from "pareto-resources/dist/interface/resources";
2
+ export declare const $$: resources.queries.fs_unrestricted_stat_possible_node;