exupery-core-bin 0.3.14 → 0.3.16
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.
- package/dist/algorithms/procedures/copy.js +3 -4
- package/dist/algorithms/procedures/execute_any_procedure_executable.js +3 -4
- package/dist/algorithms/procedures/execute_any_smelly_procedure_executable.js +3 -4
- package/dist/algorithms/procedures/log.js +3 -4
- package/dist/algorithms/procedures/log_error.js +3 -4
- package/dist/algorithms/procedures/make_directory.js +3 -4
- package/dist/algorithms/procedures/remove.js +3 -4
- package/dist/algorithms/procedures/write_file.js +9 -10
- package/dist/algorithms/procedures/write_to_stderr.js +3 -4
- package/dist/algorithms/procedures/write_to_stdout.js +3 -4
- package/dist/algorithms/queries/guaranteed/execute_query_executable_and_catch.js +1 -1
- package/dist/algorithms/queries/guaranteed/get_instream_data.js +1 -1
- package/dist/algorithms/queries/unguaranteed/execute_any_query_executable.js +1 -1
- package/dist/algorithms/queries/unguaranteed/read_directory.js +1 -1
- package/dist/algorithms/queries/unguaranteed/read_file.js +1 -1
- package/dist/algorithms/queries/unguaranteed/stat.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -27,14 +27,14 @@ exports.$$ = void 0;
|
|
|
27
27
|
const _easync = __importStar(require("exupery-core-async"));
|
|
28
28
|
const _ei = __importStar(require("exupery-core-internals"));
|
|
29
29
|
const fs_1 = require("fs");
|
|
30
|
-
|
|
30
|
+
exports.$$ = _easync.create_procedure_primed_with_resources(($p) => {
|
|
31
31
|
const __possibly_escape_filename = (path, escape) => {
|
|
32
32
|
if (escape) {
|
|
33
33
|
return path.replace(/ /g, '_');
|
|
34
34
|
}
|
|
35
35
|
return path;
|
|
36
36
|
};
|
|
37
|
-
return _easync.
|
|
37
|
+
return _easync.__create_procedure_promise({
|
|
38
38
|
'execute': (on_success, on_exception) => {
|
|
39
39
|
const options = {};
|
|
40
40
|
$p.options.recursive.map(($) => { options.recursive = $; });
|
|
@@ -67,5 +67,4 @@ const $$ = ($p) => {
|
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
|
-
};
|
|
71
|
-
exports.$$ = $$;
|
|
70
|
+
});
|
|
@@ -32,9 +32,9 @@ const node_child_process_1 = require("node:child_process");
|
|
|
32
32
|
* The executable being executed is assumed to only cause side effects
|
|
33
33
|
* and not return any meaningful data, std::out is therefor ignored
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
exports.$$ = _easync.create_procedure_primed_with_resources(($p) => {
|
|
36
36
|
const args = $p.args.__get_raw_copy();
|
|
37
|
-
return _easync.
|
|
37
|
+
return _easync.__create_procedure_promise({
|
|
38
38
|
'execute': (on_success, on_exception) => {
|
|
39
39
|
const child = (0, node_child_process_1.spawn)($p.program, args, {
|
|
40
40
|
shell: false, // ✅ direct execution, no shell
|
|
@@ -63,5 +63,4 @@ const $$ = ($p) => {
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
-
};
|
|
67
|
-
exports.$$ = $$;
|
|
66
|
+
});
|
|
@@ -33,9 +33,9 @@ const node_child_process_1 = require("node:child_process");
|
|
|
33
33
|
* The executable being executed is assumed to only cause side effects
|
|
34
34
|
* and not return any meaningful data, std::out is therefor ignored
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
exports.$$ = _easync.create_procedure_primed_with_resources(($p) => {
|
|
37
37
|
const args = $p.args.__get_raw_copy();
|
|
38
|
-
return _easync.
|
|
38
|
+
return _easync.__create_procedure_promise({
|
|
39
39
|
'execute': (on_success, on_exception) => {
|
|
40
40
|
const child = (0, node_child_process_1.spawn)($p.program, args, {
|
|
41
41
|
shell: false, // ✅ direct execution, no shell
|
|
@@ -70,5 +70,4 @@ const $$ = ($p) => {
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
};
|
|
74
|
-
exports.$$ = $$;
|
|
73
|
+
});
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.$$ = void 0;
|
|
27
27
|
const _easync = __importStar(require("exupery-core-async"));
|
|
28
|
-
|
|
29
|
-
return _easync.
|
|
28
|
+
exports.$$ = _easync.create_procedure_primed_with_resources(($p) => {
|
|
29
|
+
return _easync.__create_procedure_promise({
|
|
30
30
|
'execute': (on_success) => {
|
|
31
31
|
$p.lines.__for_each(($) => {
|
|
32
32
|
process.stdout.write($ + `\n`);
|
|
@@ -34,5 +34,4 @@ const $$ = ($p) => {
|
|
|
34
34
|
on_success();
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
};
|
|
38
|
-
exports.$$ = $$;
|
|
37
|
+
});
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.$$ = void 0;
|
|
27
27
|
const _easync = __importStar(require("exupery-core-async"));
|
|
28
|
-
|
|
29
|
-
return _easync.
|
|
28
|
+
exports.$$ = _easync.create_procedure_primed_with_resources(($p) => {
|
|
29
|
+
return _easync.__create_procedure_promise({
|
|
30
30
|
'execute': (on_success) => {
|
|
31
31
|
$p.lines.__for_each(($) => {
|
|
32
32
|
process.stderr.write($ + `\n`);
|
|
@@ -34,5 +34,4 @@ const $$ = ($p) => {
|
|
|
34
34
|
on_success();
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
};
|
|
38
|
-
exports.$$ = $$;
|
|
37
|
+
});
|
|
@@ -27,14 +27,14 @@ exports.$$ = void 0;
|
|
|
27
27
|
const _easync = __importStar(require("exupery-core-async"));
|
|
28
28
|
const _ei = __importStar(require("exupery-core-internals"));
|
|
29
29
|
const fs_1 = require("fs");
|
|
30
|
-
|
|
30
|
+
exports.$$ = _easync.create_procedure_primed_with_resources(($p) => {
|
|
31
31
|
const __possibly_escape_filename = (path, escape) => {
|
|
32
32
|
if (escape) {
|
|
33
33
|
return path.replace(/ /g, '_');
|
|
34
34
|
}
|
|
35
35
|
return path;
|
|
36
36
|
};
|
|
37
|
-
return _easync.
|
|
37
|
+
return _easync.__create_procedure_promise({
|
|
38
38
|
'execute': (on_success, on_exception) => {
|
|
39
39
|
(0, fs_1.mkdir)(__possibly_escape_filename($p.path, $p['escape spaces in path']), {
|
|
40
40
|
'recursive': true,
|
|
@@ -53,5 +53,4 @@ const $$ = ($p) => {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
};
|
|
57
|
-
exports.$$ = $$;
|
|
56
|
+
});
|
|
@@ -27,14 +27,14 @@ exports.$$ = void 0;
|
|
|
27
27
|
const _easync = __importStar(require("exupery-core-async"));
|
|
28
28
|
const _ei = __importStar(require("exupery-core-internals"));
|
|
29
29
|
const fs_1 = require("fs");
|
|
30
|
-
|
|
30
|
+
exports.$$ = _easync.create_procedure_primed_with_resources(($p) => {
|
|
31
31
|
const __possibly_escape_filename = (path, escape) => {
|
|
32
32
|
if (escape) {
|
|
33
33
|
return path.replace(/ /g, '_');
|
|
34
34
|
}
|
|
35
35
|
return path;
|
|
36
36
|
};
|
|
37
|
-
return _easync.
|
|
37
|
+
return _easync.__create_procedure_promise({
|
|
38
38
|
'execute': (on_success, on_exception) => {
|
|
39
39
|
(0, fs_1.rm)(__possibly_escape_filename($p.path.path, $p.path['escape spaces in path']), {
|
|
40
40
|
'recursive': true,
|
|
@@ -67,5 +67,4 @@ const $$ = ($p) => {
|
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
|
-
};
|
|
71
|
-
exports.$$ = $$;
|
|
70
|
+
});
|
|
@@ -28,15 +28,15 @@ const _easync = __importStar(require("exupery-core-async"));
|
|
|
28
28
|
const _ei = __importStar(require("exupery-core-internals"));
|
|
29
29
|
const fs_1 = require("fs");
|
|
30
30
|
const path_1 = require("path");
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (escape) {
|
|
34
|
-
return path.replace(/ /g, '_');
|
|
35
|
-
}
|
|
36
|
-
return path;
|
|
37
|
-
};
|
|
38
|
-
return _easync.__create_procedure({
|
|
31
|
+
exports.$$ = _easync.create_procedure_primed_with_resources(($p) => {
|
|
32
|
+
return _easync.__create_procedure_promise({
|
|
39
33
|
'execute': (on_success, on_exception) => {
|
|
34
|
+
const __possibly_escape_filename = (path, escape) => {
|
|
35
|
+
if (escape) {
|
|
36
|
+
return path.replace(/ /g, '_');
|
|
37
|
+
}
|
|
38
|
+
return path;
|
|
39
|
+
};
|
|
40
40
|
const fname = __possibly_escape_filename($p.path.path, $p.path['escape spaces in path']);
|
|
41
41
|
(0, fs_1.mkdir)((0, path_1.dirname)(fname), {
|
|
42
42
|
'recursive': true
|
|
@@ -66,5 +66,4 @@ const $$ = ($p) => {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
};
|
|
70
|
-
exports.$$ = $$;
|
|
69
|
+
});
|
|
@@ -25,12 +25,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.$$ = void 0;
|
|
27
27
|
const _easync = __importStar(require("exupery-core-async"));
|
|
28
|
-
|
|
29
|
-
return _easync.
|
|
28
|
+
exports.$$ = _easync.create_procedure_primed_with_resources(($p) => {
|
|
29
|
+
return _easync.__create_procedure_promise({
|
|
30
30
|
'execute': (on_success) => {
|
|
31
31
|
process.stderr.write($p);
|
|
32
32
|
on_success();
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
|
-
};
|
|
36
|
-
exports.$$ = $$;
|
|
35
|
+
});
|
|
@@ -25,12 +25,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.$$ = void 0;
|
|
27
27
|
const _easync = __importStar(require("exupery-core-async"));
|
|
28
|
-
|
|
29
|
-
return _easync.
|
|
28
|
+
exports.$$ = _easync.create_procedure_primed_with_resources(($p) => {
|
|
29
|
+
return _easync.__create_procedure_promise({
|
|
30
30
|
'execute': (on_success) => {
|
|
31
31
|
process.stdout.write($p);
|
|
32
32
|
on_success();
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
|
-
};
|
|
36
|
-
exports.$$ = $$;
|
|
35
|
+
});
|
|
@@ -34,7 +34,7 @@ const node_child_process_1 = require("node:child_process");
|
|
|
34
34
|
*/
|
|
35
35
|
const $$ = ($p) => {
|
|
36
36
|
const args = $p.args.__get_raw_copy();
|
|
37
|
-
return _easync.
|
|
37
|
+
return _easync.__create_query_promise({
|
|
38
38
|
'execute': (on_result) => {
|
|
39
39
|
const child = (0, node_child_process_1.spawn)($p.program, args, {
|
|
40
40
|
shell: false, // ✅ no implicit parsing
|
|
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.$$ = void 0;
|
|
27
27
|
const _easync = __importStar(require("exupery-core-async"));
|
|
28
28
|
const $$ = () => {
|
|
29
|
-
return _easync.
|
|
29
|
+
return _easync.__create_query_promise({
|
|
30
30
|
'execute': (on_value) => {
|
|
31
31
|
const stdin = process.stdin;
|
|
32
32
|
let data = '';
|
|
@@ -34,7 +34,7 @@ const node_child_process_1 = require("node:child_process");
|
|
|
34
34
|
*/
|
|
35
35
|
const $$ = ($p) => {
|
|
36
36
|
const args = $p.args.__get_raw_copy();
|
|
37
|
-
return _easync.
|
|
37
|
+
return _easync.__create_query_promise({
|
|
38
38
|
'execute': (on_value, on_exception) => {
|
|
39
39
|
const child = (0, node_child_process_1.spawn)($p.program, args, {
|
|
40
40
|
shell: false, // ✅ no implicit parsing
|
|
@@ -34,7 +34,7 @@ const $$ = ($p) => {
|
|
|
34
34
|
}
|
|
35
35
|
return path;
|
|
36
36
|
};
|
|
37
|
-
return _easync.
|
|
37
|
+
return _easync.__create_query_promise({
|
|
38
38
|
'execute': (on_value, on_exception) => {
|
|
39
39
|
(0, fs_1.readdir)(__possibly_escape_filename($p.path.path, $p.path['escape spaces in path']), {
|
|
40
40
|
'encoding': 'utf-8',
|
|
@@ -34,7 +34,7 @@ const $$ = ($p) => {
|
|
|
34
34
|
}
|
|
35
35
|
return path;
|
|
36
36
|
};
|
|
37
|
-
return _easync.
|
|
37
|
+
return _easync.__create_query_promise({
|
|
38
38
|
'execute': (on_value, on_exception) => {
|
|
39
39
|
(0, fs_1.readFile)(__possibly_escape_filename($p.path, $p['escape spaces in path']), { 'encoding': 'utf-8' }, (err, data) => {
|
|
40
40
|
if (err) {
|
|
@@ -34,7 +34,7 @@ const $$ = ($p) => {
|
|
|
34
34
|
}
|
|
35
35
|
return path;
|
|
36
36
|
};
|
|
37
|
-
return _easync.
|
|
37
|
+
return _easync.__create_query_promise({
|
|
38
38
|
'execute': (on_value, on_exception) => {
|
|
39
39
|
(0, fs_1.stat)(__possibly_escape_filename($p.path, $p['escape spaces in path']), (err, stats) => {
|
|
40
40
|
if (err) {
|
package/dist/index.js
CHANGED
|
@@ -68,7 +68,7 @@ const create_available_resources = () => {
|
|
|
68
68
|
* returned value when the async value completes.
|
|
69
69
|
*/
|
|
70
70
|
const run_main_procedure = (get_main) => {
|
|
71
|
-
get_main(create_available_resources())({
|
|
71
|
+
get_main(create_available_resources())['execute with synchronous data']({
|
|
72
72
|
'arguments': _ei.array_literal(process.argv.slice(2))
|
|
73
73
|
}).__start(() => {
|
|
74
74
|
}, ($) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exupery-core-bin",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.16",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"description": "this is one of the core packages for Exupery. it provides functionality to create executables",
|
|
6
6
|
"author": "Corno",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"url": "git+https://github.com/corno/exupery-core.git"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"exupery-core-async": "^0.3.
|
|
30
|
+
"exupery-core-async": "^0.3.17",
|
|
31
31
|
"exupery-core-internals": "^0.3.1",
|
|
32
32
|
"exupery-resources": "^0.3.6"
|
|
33
33
|
}
|