exupery-core-bin 0.3.38 → 0.3.41

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.
@@ -29,19 +29,13 @@ const _ei = __importStar(require("exupery-core-internals"));
29
29
  const fs_1 = require("fs");
30
30
  const t_path_to_text = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
31
31
  exports.$$ = _easync.__create_resource_command(($p) => {
32
- const __possibly_escape_filename = (path, escape) => {
33
- if (escape) {
34
- return path.replace(/ /g, '_');
35
- }
36
- return path;
37
- };
38
32
  return _easync.__create_command_promise({
39
33
  'execute': (on_success, on_error) => {
40
34
  const options = {};
41
35
  $p.options.recursive.map(($) => { options.recursive = $; });
42
36
  $p.options.force.map(($) => { options.force = $; });
43
37
  $p.options.errorOnExist.map(($) => { options.errorOnExist = $; });
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) => {
38
+ (0, fs_1.cp)(t_path_to_text.Node_Path($p.source), t_path_to_text.Node_Path($p.target), options, (err) => {
45
39
  if (err) {
46
40
  on_error(_ei.block(() => {
47
41
  if (err.code === 'ENOENT') {
@@ -29,15 +29,9 @@ const _ei = __importStar(require("exupery-core-internals"));
29
29
  const fs_1 = require("fs");
30
30
  const t_path = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
31
31
  exports.$$ = _easync.__create_resource_command(($p) => {
32
- const __possibly_escape_filename = (path, escape) => {
33
- if (escape) {
34
- return path.replace(/ /g, '_');
35
- }
36
- return path;
37
- };
38
32
  return _easync.__create_command_promise({
39
33
  'execute': (on_success, on_error) => {
40
- (0, fs_1.mkdir)(__possibly_escape_filename(t_path.Context_Path($p.path.context) + `/${$p.path.node}`, $p['escape spaces in path']), {
34
+ (0, fs_1.mkdir)(t_path.Node_Path($p), {
41
35
  'recursive': true,
42
36
  }, (err, path) => {
43
37
  if (err) {
@@ -29,15 +29,9 @@ const _ei = __importStar(require("exupery-core-internals"));
29
29
  const fs_1 = require("fs");
30
30
  const t_path_to_text = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
31
31
  exports.$$ = _easync.__create_resource_command(($p) => {
32
- const __possibly_escape_filename = (path, escape) => {
33
- if (escape) {
34
- return path.replace(/ /g, '_');
35
- }
36
- return path;
37
- };
38
32
  return _easync.__create_command_promise({
39
33
  'execute': (on_success, on_error) => {
40
- (0, fs_1.rm)(__possibly_escape_filename(t_path_to_text.Node_Path($p.path.path), $p.path['escape spaces in path']), {
34
+ (0, fs_1.rm)(t_path_to_text.Node_Path($p.path), {
41
35
  'recursive': true,
42
36
  }, (err) => {
43
37
  if (err) {
@@ -31,13 +31,7 @@ const t_path_to_text = __importStar(require("exupery-resources/dist/implementati
31
31
  exports.$$ = _easync.__create_resource_command(($p) => {
32
32
  return _easync.__create_command_promise({
33
33
  'execute': (on_success, on_error) => {
34
- const __possibly_escape_filename = (path, escape) => {
35
- if (escape) {
36
- return path.replace(/ /g, '_');
37
- }
38
- return path;
39
- };
40
- (0, fs_1.mkdir)(__possibly_escape_filename(t_path_to_text.Context_Path($p.path.path.context), $p.path['escape spaces in path']), {
34
+ (0, fs_1.mkdir)(t_path_to_text.Context_Path($p.path.context), {
41
35
  'recursive': true
42
36
  }, (err, path) => {
43
37
  if (err) {
@@ -49,7 +43,7 @@ exports.$$ = _easync.__create_resource_command(($p) => {
49
43
  }));
50
44
  return;
51
45
  }
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) => {
46
+ (0, fs_1.writeFile)(t_path_to_text.Node_Path($p.path), $p.data, (err) => {
53
47
  if (err) {
54
48
  on_error(_ei.block(() => {
55
49
  if (err.code === 'EACCES' || err.code === 'EPERM') {
@@ -30,14 +30,8 @@ const fs_1 = require("fs");
30
30
  const t_path_to_text = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
31
31
  const t_path_to_path = __importStar(require("exupery-resources/dist/implementation/transformers/path/path"));
32
32
  exports.$$ = _easync.__create_query(($p) => {
33
- const __possibly_escape_filename = (path, escape) => {
34
- if (escape) {
35
- return path.replace(/ /g, '_');
36
- }
37
- return path;
38
- };
39
33
  return _ei.__create_query_result((on_value, on_error) => {
40
- (0, fs_1.readdir)(__possibly_escape_filename(t_path_to_text.Node_Path($p.path.path), $p.path['escape spaces in path']), {
34
+ (0, fs_1.readdir)(t_path_to_text.Node_Path($p.path), {
41
35
  'encoding': 'utf-8',
42
36
  'withFileTypes': true,
43
37
  }, (err, files) => {
@@ -59,8 +53,10 @@ exports.$$ = _easync.__create_query(($p) => {
59
53
  'node type': node.isFile()
60
54
  ? ['file', null]
61
55
  : node.isDirectory() ? ['directory', null] : ['other', null],
62
- 'context directory': t_path_to_path.node_path_to_context_path($p.path.path),
63
- 'path': t_path_to_path.create_node_path(t_path_to_path.node_path_to_context_path($p.path.path), __possibly_escape_filename(node.name, $p.path['escape spaces in path']))
56
+ 'context directory': t_path_to_path.deprecated_node_path_to_context_path($p.path),
57
+ 'path': t_path_to_path.extend_node_path($p.path, {
58
+ 'addition': node.name,
59
+ })
64
60
  };
65
61
  });
66
62
  on_value(_ei.dictionary_literal(out));
@@ -29,14 +29,8 @@ const _ei = __importStar(require("exupery-core-internals"));
29
29
  const t_path_to_text = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
30
30
  const fs_1 = require("fs");
31
31
  exports.$$ = _easync.__create_query(($p) => {
32
- const __possibly_escape_filename = (path, escape) => {
33
- if (escape) {
34
- return path.replace(/ /g, '_');
35
- }
36
- return path;
37
- };
38
32
  return _ei.__create_query_result((on_value, on_error) => {
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) => {
33
+ (0, fs_1.readFile)(t_path_to_text.Node_Path($p), { 'encoding': 'utf-8' }, (err, data) => {
40
34
  if (err) {
41
35
  on_error(_ei.block(() => {
42
36
  if (err.code === 'ENOENT') {
@@ -29,14 +29,8 @@ const _ei = __importStar(require("exupery-core-internals"));
29
29
  const fs_1 = require("fs");
30
30
  const t_path_to_text = __importStar(require("exupery-resources/dist/implementation/transformers/path/text"));
31
31
  exports.$$ = _easync.__create_query(($p) => {
32
- const __possibly_escape_filename = (path, escape) => {
33
- if (escape) {
34
- return path.replace(/ /g, '_');
35
- }
36
- return path;
37
- };
38
32
  return _ei.__create_query_result((on_value, on_error) => {
39
- (0, fs_1.stat)(__possibly_escape_filename(t_path_to_text.Node_Path($p.path), $p['escape spaces in path']), (err, stats) => {
33
+ (0, fs_1.stat)(t_path_to_text.Node_Path($p), (err, stats) => {
40
34
  if (err) {
41
35
  on_error(_ei.block(() => {
42
36
  if (err.code === 'ENOENT') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-bin",
3
- "version": "0.3.38",
3
+ "version": "0.3.41",
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.37"
32
+ "exupery-resources": "^0.3.39"
33
33
  }
34
34
  }