exupery-core-bin 0.3.34 → 0.3.36

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.
@@ -27,6 +27,7 @@ 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
+ const t_path_to_text = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
30
31
  exports.$$ = _easync.__create_resource_command(($p) => {
31
32
  const __possibly_escape_filename = (path, escape) => {
32
33
  if (escape) {
@@ -40,7 +41,7 @@ exports.$$ = _easync.__create_resource_command(($p) => {
40
41
  $p.options.recursive.map(($) => { options.recursive = $; });
41
42
  $p.options.force.map(($) => { options.force = $; });
42
43
  $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
+ (0, fs_1.cp)(__possibly_escape_filename(t_path_to_text.Node_Path($p.source.path), $p.source['escape spaces in path']), __possibly_escape_filename(t_path_to_text.Node_Path($p.target.path), $p.target['escape spaces in path']), options, (err) => {
44
45
  if (err) {
45
46
  on_error(_ei.block(() => {
46
47
  if (err.code === 'ENOENT') {
@@ -27,6 +27,7 @@ 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
+ const t_path_to_text = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
30
31
  exports.$$ = _easync.__create_resource_command(($p) => {
31
32
  const __possibly_escape_filename = (path, escape) => {
32
33
  if (escape) {
@@ -36,7 +37,7 @@ exports.$$ = _easync.__create_resource_command(($p) => {
36
37
  };
37
38
  return _easync.__create_command_promise({
38
39
  'execute': (on_success, on_error) => {
39
- (0, fs_1.rm)(__possibly_escape_filename($p.path.path, $p.path['escape spaces in path']), {
40
+ (0, fs_1.rm)(__possibly_escape_filename(t_path_to_text.Node_Path($p.path.path), $p.path['escape spaces in path']), {
40
41
  'recursive': true,
41
42
  }, (err) => {
42
43
  if (err) {
@@ -27,7 +27,7 @@ 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
- const path_1 = require("path");
30
+ const t_path_to_text = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
31
31
  exports.$$ = _easync.__create_resource_command(($p) => {
32
32
  return _easync.__create_command_promise({
33
33
  'execute': (on_success, on_error) => {
@@ -37,8 +37,7 @@ exports.$$ = _easync.__create_resource_command(($p) => {
37
37
  }
38
38
  return path;
39
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), {
40
+ (0, fs_1.mkdir)(__possibly_escape_filename(t_path_to_text.Context_Path($p.path.path.context), $p.path['escape spaces in path']), {
42
41
  'recursive': true
43
42
  }, (err, path) => {
44
43
  if (err) {
@@ -50,7 +49,7 @@ exports.$$ = _easync.__create_resource_command(($p) => {
50
49
  }));
51
50
  return;
52
51
  }
53
- (0, fs_1.writeFile)(fname, $p.data, (err) => {
52
+ (0, fs_1.writeFile)(__possibly_escape_filename(t_path_to_text.Node_Path($p.path.path), $p.path['escape spaces in path']), $p.data, (err) => {
54
53
  if (err) {
55
54
  on_error(_ei.block(() => {
56
55
  if (err.code === 'EACCES' || err.code === 'EPERM') {
@@ -27,6 +27,8 @@ 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
+ const t_path_to_text = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
31
+ const t_path_to_path = __importStar(require("exupery-resources/dist/implementation/transformers/path/path"));
30
32
  exports.$$ = _easync.__create_query(($p) => {
31
33
  const __possibly_escape_filename = (path, escape) => {
32
34
  if (escape) {
@@ -35,7 +37,7 @@ exports.$$ = _easync.__create_query(($p) => {
35
37
  return path;
36
38
  };
37
39
  return _ei.__create_query_result((on_value, on_error) => {
38
- (0, fs_1.readdir)(__possibly_escape_filename($p.path.path, $p.path['escape spaces in path']), {
40
+ (0, fs_1.readdir)(__possibly_escape_filename(t_path_to_text.Node_Path($p.path.path), $p.path['escape spaces in path']), {
39
41
  'encoding': 'utf-8',
40
42
  'withFileTypes': true,
41
43
  }, (err, files) => {
@@ -55,7 +57,8 @@ exports.$$ = _easync.__create_query(($p) => {
55
57
  files.forEach((file) => {
56
58
  out[file.name] = {
57
59
  'node type': file.isFile() ? ['file', null] : ['directory', null],
58
- 'concatenated path': $p.path.path + "/" + file.name
60
+ 'context directory': t_path_to_path.node_path_to_context_path($p.path.path),
61
+ 'path': t_path_to_path.create_node_path(t_path_to_path.node_path_to_context_path($p.path.path), file.name)
59
62
  };
60
63
  });
61
64
  on_value(_ei.dictionary_literal(out));
@@ -26,6 +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 _ei = __importStar(require("exupery-core-internals"));
29
+ const t_path_to_text = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
29
30
  const fs_1 = require("fs");
30
31
  exports.$$ = _easync.__create_query(($p) => {
31
32
  const __possibly_escape_filename = (path, escape) => {
@@ -35,7 +36,7 @@ exports.$$ = _easync.__create_query(($p) => {
35
36
  return path;
36
37
  };
37
38
  return _ei.__create_query_result((on_value, on_error) => {
38
- (0, fs_1.readFile)(__possibly_escape_filename($p.path, $p['escape spaces in path']), { 'encoding': 'utf-8' }, (err, data) => {
39
+ (0, fs_1.readFile)(__possibly_escape_filename(t_path_to_text.Node_Path($p.path), $p['escape spaces in path']), { 'encoding': 'utf-8' }, (err, data) => {
39
40
  if (err) {
40
41
  on_error(_ei.block(() => {
41
42
  if (err.code === 'ENOENT') {
@@ -1,3 +1,2 @@
1
- import * as _et from 'exupery-core-types';
2
- import * as d from "exupery-resources/dist/interface/generated/pareto/schemas/stat/data_types/target";
3
- export declare const $$: _et.Query<d.Result, d.Error, d.Parameters>;
1
+ import { Signature } from "exupery-resources/dist/interface/algorithms/queries/stat";
2
+ export declare const $$: Signature;
@@ -27,6 +27,7 @@ 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
+ const t_path_to_text = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
30
31
  exports.$$ = _easync.__create_query(($p) => {
31
32
  const __possibly_escape_filename = (path, escape) => {
32
33
  if (escape) {
@@ -35,7 +36,7 @@ exports.$$ = _easync.__create_query(($p) => {
35
36
  return path;
36
37
  };
37
38
  return _ei.__create_query_result((on_value, on_error) => {
38
- (0, fs_1.stat)(__possibly_escape_filename($p.path, $p['escape spaces in path']), (err, stats) => {
39
+ (0, fs_1.stat)(__possibly_escape_filename(t_path_to_text.Node_Path($p.path), $p['escape spaces in path']), (err, stats) => {
39
40
  if (err) {
40
41
  on_error(_ei.block(() => {
41
42
  if (err.code === 'ENOENT') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-bin",
3
- "version": "0.3.34",
3
+ "version": "0.3.36",
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",
@@ -29,6 +29,6 @@
29
29
  "dependencies": {
30
30
  "exupery-core-async": "^0.3.75",
31
31
  "exupery-core-internals": "^0.3.17",
32
- "exupery-resources": "^0.3.26"
32
+ "exupery-resources": "^0.3.32"
33
33
  }
34
34
  }