exupery-core-bin 0.3.15 → 0.3.17
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 +41 -43
- package/dist/algorithms/procedures/execute_any_procedure_executable.js +30 -32
- package/dist/algorithms/procedures/execute_any_smelly_procedure_executable.js +36 -38
- package/dist/algorithms/procedures/log.js +10 -12
- package/dist/algorithms/procedures/log_error.js +10 -12
- package/dist/algorithms/procedures/make_directory.js +27 -29
- package/dist/algorithms/procedures/remove.js +38 -40
- package/dist/algorithms/procedures/write_file.js +30 -32
- package/dist/algorithms/procedures/write_to_stderr.js +8 -10
- package/dist/algorithms/procedures/write_to_stdout.js +8 -10
- 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,46 +27,44 @@ 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
|
-
exports.$$ = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
};
|
|
30
|
+
exports.$$ = _easync.__create_procedure_primed_with_resources(($p) => {
|
|
31
|
+
const __possibly_escape_filename = (path, escape) => {
|
|
32
|
+
if (escape) {
|
|
33
|
+
return path.replace(/ /g, '_');
|
|
34
|
+
}
|
|
35
|
+
return path;
|
|
36
|
+
};
|
|
37
|
+
return _easync.__create_procedure_promise({
|
|
38
|
+
'execute': (on_success, on_exception) => {
|
|
39
|
+
const options = {};
|
|
40
|
+
$p.options.recursive.map(($) => { options.recursive = $; });
|
|
41
|
+
$p.options.force.map(($) => { options.force = $; });
|
|
42
|
+
$p.options.errorOnExist.map(($) => { options.errorOnExist = $; });
|
|
43
|
+
(0, fs_1.cp)(__possibly_escape_filename($p.source.path, $p.source['escape spaces in path']), __possibly_escape_filename($p.target.path, $p.target['escape spaces in path']), options, (err) => {
|
|
44
|
+
if (err) {
|
|
45
|
+
on_exception(_ei.block(() => {
|
|
46
|
+
if (err.code === 'ENOENT') {
|
|
47
|
+
return ['source does not exist', null];
|
|
48
|
+
}
|
|
49
|
+
if (err.code === 'EACCES' || err.code === 'EPERM') {
|
|
50
|
+
return ['permission denied', null];
|
|
51
|
+
}
|
|
52
|
+
if (err.code === 'EISDIR' || err.code === 'ERR_FS_EISDIR') {
|
|
53
|
+
return ['node is not a file', null];
|
|
54
|
+
}
|
|
55
|
+
if (err.code === 'EFBIG') {
|
|
56
|
+
return ['file too large', null];
|
|
57
|
+
}
|
|
58
|
+
if (err.code === 'EIO' || err.code === 'ENXIO') {
|
|
59
|
+
return ['device not ready', null];
|
|
60
|
+
}
|
|
61
|
+
return _ei.panic(`unhandled fs.cp error code: ${err.code}`);
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
on_success();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
@@ -32,37 +32,35 @@ 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
|
-
exports.$$ = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
exports.$$ = _easync.__create_procedure_primed_with_resources(($p) => {
|
|
36
|
+
const args = $p.args.__get_raw_copy();
|
|
37
|
+
return _easync.__create_procedure_promise({
|
|
38
|
+
'execute': (on_success, on_exception) => {
|
|
39
|
+
const child = (0, node_child_process_1.spawn)($p.program, args, {
|
|
40
|
+
shell: false, // ✅ direct execution, no shell
|
|
41
|
+
});
|
|
42
|
+
let stderrData = "";
|
|
43
|
+
child.stderr.on("data", chunk => {
|
|
44
|
+
stderrData += chunk.toString("utf8");
|
|
45
|
+
});
|
|
46
|
+
child.on("error", err => {
|
|
47
|
+
on_exception(_ei.block(() => {
|
|
48
|
+
return ['failed to spawn', { message: err instanceof Error ? err.message : `${err}` }];
|
|
49
|
+
}));
|
|
50
|
+
});
|
|
51
|
+
child.on("close", exitCode => {
|
|
52
|
+
if (exitCode === 0) {
|
|
53
|
+
on_success();
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
48
56
|
on_exception(_ei.block(() => {
|
|
49
|
-
return ['
|
|
57
|
+
return ['non zero exit code', {
|
|
58
|
+
'exit code': exitCode === null ? _ei.not_set() : _ei.set(exitCode),
|
|
59
|
+
'stderr': stderrData
|
|
60
|
+
}];
|
|
50
61
|
}));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
else {
|
|
57
|
-
on_exception(_ei.block(() => {
|
|
58
|
-
return ['non zero exit code', {
|
|
59
|
-
'exit code': exitCode === null ? _ei.not_set() : _ei.set(exitCode),
|
|
60
|
-
'stderr': stderrData
|
|
61
|
-
}];
|
|
62
|
-
}));
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
};
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -33,43 +33,41 @@ 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
|
-
exports.$$ = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
exports.$$ = _easync.__create_procedure_primed_with_resources(($p) => {
|
|
37
|
+
const args = $p.args.__get_raw_copy();
|
|
38
|
+
return _easync.__create_procedure_promise({
|
|
39
|
+
'execute': (on_success, on_exception) => {
|
|
40
|
+
const child = (0, node_child_process_1.spawn)($p.program, args, {
|
|
41
|
+
shell: false, // ✅ direct execution, no shell
|
|
42
|
+
});
|
|
43
|
+
let stderrData = "";
|
|
44
|
+
let stdoutData = "";
|
|
45
|
+
child.stdout.on("data", chunk => {
|
|
46
|
+
stdoutData += chunk.toString("utf8");
|
|
47
|
+
});
|
|
48
|
+
child.stderr.on("data", chunk => {
|
|
49
|
+
stderrData += chunk.toString("utf8");
|
|
50
|
+
});
|
|
51
|
+
child.on("error", err => {
|
|
52
|
+
on_exception(_ei.block(() => {
|
|
53
|
+
return ['failed to spawn', { message: err instanceof Error ? err.message : `${err}` }];
|
|
54
|
+
}));
|
|
55
|
+
});
|
|
56
|
+
child.on("close", exitCode => {
|
|
57
|
+
//what does an exit code of null even mean?
|
|
58
|
+
if (exitCode === 0) {
|
|
59
|
+
on_success();
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
53
62
|
on_exception(_ei.block(() => {
|
|
54
|
-
return ['
|
|
63
|
+
return ['non zero exit code', {
|
|
64
|
+
'exit code': exitCode === null ? _ei.not_set() : _ei.set(exitCode),
|
|
65
|
+
'stderr': stderrData,
|
|
66
|
+
'stdout': stdoutData,
|
|
67
|
+
}];
|
|
55
68
|
}));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
on_exception(_ei.block(() => {
|
|
64
|
-
return ['non zero exit code', {
|
|
65
|
-
'exit code': exitCode === null ? _ei.not_set() : _ei.set(exitCode),
|
|
66
|
-
'stderr': stderrData,
|
|
67
|
-
'stdout': stdoutData,
|
|
68
|
-
}];
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -25,15 +25,13 @@ 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
|
-
exports.$$ = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
};
|
|
28
|
+
exports.$$ = _easync.__create_procedure_primed_with_resources(($p) => {
|
|
29
|
+
return _easync.__create_procedure_promise({
|
|
30
|
+
'execute': (on_success) => {
|
|
31
|
+
$p.lines.__for_each(($) => {
|
|
32
|
+
process.stdout.write($ + `\n`);
|
|
33
|
+
});
|
|
34
|
+
on_success();
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -25,15 +25,13 @@ 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
|
-
exports.$$ = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
};
|
|
28
|
+
exports.$$ = _easync.__create_procedure_primed_with_resources(($p) => {
|
|
29
|
+
return _easync.__create_procedure_promise({
|
|
30
|
+
'execute': (on_success) => {
|
|
31
|
+
$p.lines.__for_each(($) => {
|
|
32
|
+
process.stderr.write($ + `\n`);
|
|
33
|
+
});
|
|
34
|
+
on_success();
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -27,32 +27,30 @@ 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
|
-
exports.$$ = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
};
|
|
30
|
+
exports.$$ = _easync.__create_procedure_primed_with_resources(($p) => {
|
|
31
|
+
const __possibly_escape_filename = (path, escape) => {
|
|
32
|
+
if (escape) {
|
|
33
|
+
return path.replace(/ /g, '_');
|
|
34
|
+
}
|
|
35
|
+
return path;
|
|
36
|
+
};
|
|
37
|
+
return _easync.__create_procedure_promise({
|
|
38
|
+
'execute': (on_success, on_exception) => {
|
|
39
|
+
(0, fs_1.mkdir)(__possibly_escape_filename($p.path, $p['escape spaces in path']), {
|
|
40
|
+
'recursive': true,
|
|
41
|
+
}, (err, path) => {
|
|
42
|
+
if (err) {
|
|
43
|
+
on_exception(_ei.block(() => {
|
|
44
|
+
if (err.code === 'EEXIST') {
|
|
45
|
+
return ['directory already exists', null];
|
|
46
|
+
}
|
|
47
|
+
return _ei.panic(`unhandled fs.mkdir error code: ${err.code}`);
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
on_success();
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -27,46 +27,44 @@ 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
|
-
exports.$$ = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (err) {
|
|
44
|
-
|
|
45
|
-
on_success();
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
on_exception(_ei.block(() => {
|
|
49
|
-
if (err.code === 'ENOENT') {
|
|
50
|
-
return ['node does not exist', null];
|
|
51
|
-
}
|
|
52
|
-
if (err.code === 'EACCES' || err.code === 'EPERM') {
|
|
53
|
-
return ['permission denied', null];
|
|
54
|
-
}
|
|
55
|
-
// if (err.code === 'EISDIR' || err.code === 'ENOTDIR') {
|
|
56
|
-
// return ['node is not a directory', null]
|
|
57
|
-
// }
|
|
58
|
-
// if (err.code === 'ERR_FS_EISDIR') {
|
|
59
|
-
// return ['node is a directory', null]
|
|
60
|
-
// }
|
|
61
|
-
return _ei.panic(`unhandled fs.rm error code: ${err.code}`);
|
|
62
|
-
}));
|
|
63
|
-
}
|
|
30
|
+
exports.$$ = _easync.__create_procedure_primed_with_resources(($p) => {
|
|
31
|
+
const __possibly_escape_filename = (path, escape) => {
|
|
32
|
+
if (escape) {
|
|
33
|
+
return path.replace(/ /g, '_');
|
|
34
|
+
}
|
|
35
|
+
return path;
|
|
36
|
+
};
|
|
37
|
+
return _easync.__create_procedure_promise({
|
|
38
|
+
'execute': (on_success, on_exception) => {
|
|
39
|
+
(0, fs_1.rm)(__possibly_escape_filename($p.path.path, $p.path['escape spaces in path']), {
|
|
40
|
+
'recursive': true,
|
|
41
|
+
}, (err) => {
|
|
42
|
+
if (err) {
|
|
43
|
+
if (err.code === 'ENOENT' && !$p['error if not exists']) {
|
|
44
|
+
on_success();
|
|
64
45
|
}
|
|
65
46
|
else {
|
|
66
|
-
|
|
47
|
+
on_exception(_ei.block(() => {
|
|
48
|
+
if (err.code === 'ENOENT') {
|
|
49
|
+
return ['node does not exist', null];
|
|
50
|
+
}
|
|
51
|
+
if (err.code === 'EACCES' || err.code === 'EPERM') {
|
|
52
|
+
return ['permission denied', null];
|
|
53
|
+
}
|
|
54
|
+
// if (err.code === 'EISDIR' || err.code === 'ENOTDIR') {
|
|
55
|
+
// return ['node is not a directory', null]
|
|
56
|
+
// }
|
|
57
|
+
// if (err.code === 'ERR_FS_EISDIR') {
|
|
58
|
+
// return ['node is a directory', null]
|
|
59
|
+
// }
|
|
60
|
+
return _ei.panic(`unhandled fs.rm error code: ${err.code}`);
|
|
61
|
+
}));
|
|
67
62
|
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
};
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
on_success();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
@@ -28,20 +28,29 @@ 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
|
-
exports.$$ = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
exports.$$ = _easync.__create_procedure_primed_with_resources(($p) => {
|
|
32
|
+
return _easync.__create_procedure_promise({
|
|
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
|
+
const fname = __possibly_escape_filename($p.path.path, $p.path['escape spaces in path']);
|
|
41
|
+
(0, fs_1.mkdir)((0, path_1.dirname)(fname), {
|
|
42
|
+
'recursive': true
|
|
43
|
+
}, (err, path) => {
|
|
44
|
+
if (err) {
|
|
45
|
+
on_exception(_ei.block(() => {
|
|
46
|
+
if (err.code === 'EACCES' || err.code === 'EPERM') {
|
|
47
|
+
return ['permission denied', null];
|
|
48
|
+
}
|
|
49
|
+
return _ei.panic(`unhandled fs.writeFile error code: ${err.code}`);
|
|
50
|
+
}));
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
(0, fs_1.writeFile)(fname, $p.data, (err) => {
|
|
45
54
|
if (err) {
|
|
46
55
|
on_exception(_ei.block(() => {
|
|
47
56
|
if (err.code === 'EACCES' || err.code === 'EPERM') {
|
|
@@ -49,23 +58,12 @@ exports.$$ = {
|
|
|
49
58
|
}
|
|
50
59
|
return _ei.panic(`unhandled fs.writeFile error code: ${err.code}`);
|
|
51
60
|
}));
|
|
52
|
-
return;
|
|
53
61
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (err.code === 'EACCES' || err.code === 'EPERM') {
|
|
58
|
-
return ['permission denied', null];
|
|
59
|
-
}
|
|
60
|
-
return _ei.panic(`unhandled fs.writeFile error code: ${err.code}`);
|
|
61
|
-
}));
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
on_success();
|
|
65
|
-
}
|
|
66
|
-
});
|
|
62
|
+
else {
|
|
63
|
+
on_success();
|
|
64
|
+
}
|
|
67
65
|
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
};
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
});
|
|
@@ -25,13 +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
|
-
exports.$$ = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
};
|
|
28
|
+
exports.$$ = _easync.__create_procedure_primed_with_resources(($p) => {
|
|
29
|
+
return _easync.__create_procedure_promise({
|
|
30
|
+
'execute': (on_success) => {
|
|
31
|
+
process.stderr.write($p);
|
|
32
|
+
on_success();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -25,13 +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
|
-
exports.$$ = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
};
|
|
28
|
+
exports.$$ = _easync.__create_procedure_primed_with_resources(($p) => {
|
|
29
|
+
return _easync.__create_procedure_promise({
|
|
30
|
+
'execute': (on_success) => {
|
|
31
|
+
process.stdout.write($p);
|
|
32
|
+
on_success();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
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())['execute with
|
|
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.17",
|
|
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.18",
|
|
31
31
|
"exupery-core-internals": "^0.3.1",
|
|
32
32
|
"exupery-resources": "^0.3.6"
|
|
33
33
|
}
|