codify-plugin-lib 1.0.169 → 1.0.171

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.
@@ -74,7 +74,7 @@ export class BackgroundPty {
74
74
  // Redirecting everything to the pipe and running in theb background avoids most if not all back-pressure problems
75
75
  // Done is used to denote the end of the command
76
76
  // Use the \\" at the end differentiate between command and response. \\" will evaluate to " in the terminal
77
- const command = `((${cdCommand}${cmd}; echo %%%$?%%%done%%%\\") > "/tmp/${cid}" 2>&1 &); echo %%%done%%%${cid}\\";`;
77
+ const command = ` ((${cdCommand}${cmd}; echo %%%$?%%%done%%%\\") > "/tmp/${cid}" 2>&1 &); echo %%%done%%%${cid}\\";`;
78
78
  let output = '';
79
79
  const listener = this.basePty.onData((data) => {
80
80
  output += data;
@@ -103,10 +103,10 @@ export class BackgroundPty {
103
103
  await this.promiseQueue.run(async () => {
104
104
  let outputBuffer = '';
105
105
  return new Promise(resolve => {
106
- this.basePty.write('set +o history;\n');
107
- this.basePty.write('unset PS1;\n');
108
- this.basePty.write('unset PS0;\n');
109
- this.basePty.write('echo setup complete\\"\n');
106
+ this.basePty.write('setopt hist_ignore_space;\n');
107
+ this.basePty.write(' unset PS1;\n');
108
+ this.basePty.write(' unset PS0;\n');
109
+ this.basePty.write(' echo setup complete\\"\n');
110
110
  const listener = this.basePty.onData((data) => {
111
111
  outputBuffer += data;
112
112
  if (outputBuffer.includes('setup complete"')) {
@@ -63,7 +63,7 @@ export function resolveFnFromEqualsFnOrString(fnOrString) {
63
63
  }
64
64
  const ParameterTransformationDefaults = {
65
65
  'directory': {
66
- to: (a) => path.resolve(resolvePathWithVariables((untildify(String(a))))),
66
+ to: (a) => resolvePathWithVariables((untildify(String(a)))),
67
67
  from: (a, original) => {
68
68
  if (ParameterEqualsDefaults.directory(a, original)) {
69
69
  return original;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codify-plugin-lib",
3
- "version": "1.0.169",
3
+ "version": "1.0.171",
4
4
  "description": "Library plugin library",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -89,7 +89,7 @@ export class BackgroundPty implements IPty {
89
89
  // Redirecting everything to the pipe and running in theb background avoids most if not all back-pressure problems
90
90
  // Done is used to denote the end of the command
91
91
  // Use the \\" at the end differentiate between command and response. \\" will evaluate to " in the terminal
92
- const command = `((${cdCommand}${cmd}; echo %%%$?%%%done%%%\\") > "/tmp/${cid}" 2>&1 &); echo %%%done%%%${cid}\\";`
92
+ const command = ` ((${cdCommand}${cmd}; echo %%%$?%%%done%%%\\") > "/tmp/${cid}" 2>&1 &); echo %%%done%%%${cid}\\";`
93
93
 
94
94
  let output = '';
95
95
  const listener = this.basePty.onData((data: any) => {
@@ -127,10 +127,10 @@ export class BackgroundPty implements IPty {
127
127
  let outputBuffer = '';
128
128
 
129
129
  return new Promise(resolve => {
130
- this.basePty.write('set +o history;\n');
131
- this.basePty.write('unset PS1;\n');
132
- this.basePty.write('unset PS0;\n')
133
- this.basePty.write('echo setup complete\\"\n')
130
+ this.basePty.write('setopt hist_ignore_space;\n');
131
+ this.basePty.write(' unset PS1;\n');
132
+ this.basePty.write(' unset PS0;\n')
133
+ this.basePty.write(' echo setup complete\\"\n')
134
134
 
135
135
  const listener = this.basePty.onData((data: string) => {
136
136
  outputBuffer += data;
@@ -398,7 +398,7 @@ export function resolveFnFromEqualsFnOrString(
398
398
 
399
399
  const ParameterTransformationDefaults: Partial<Record<ParameterSettingType, InputTransformation>> = {
400
400
  'directory': {
401
- to: (a: unknown) => path.resolve(resolvePathWithVariables((untildify(String(a))))),
401
+ to: (a: unknown) => resolvePathWithVariables((untildify(String(a)))),
402
402
  from: (a: unknown, original) => {
403
403
  if (ParameterEqualsDefaults.directory!(a, original)) {
404
404
  return original;