codify-plugin-lib 1.0.182-beta15 → 1.0.182-beta16

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.
@@ -166,7 +166,9 @@ export class Plugin {
166
166
  // Default back desired back to current if it is not defined (for destroys only)
167
167
  const validationPlan = await ptyLocalStorage.run(new BackgroundPty(), async () => {
168
168
  const result = await resource.plan(plan.coreParameters, plan.desiredConfig, plan.desiredConfig ?? plan.currentConfig, plan.isStateful, 'validationPlan');
169
+ process.stdout.write(`Validation plan ${result}`);
169
170
  await getPty().kill();
171
+ process.stdout.write('Killed');
170
172
  return result;
171
173
  });
172
174
  if (validationPlan.requiresChanges()) {
@@ -52,6 +52,7 @@ export class BackgroundPty {
52
52
  output += data.toString();
53
53
  process.stdout.write(data);
54
54
  if (output.includes('%%%done%%%"')) {
55
+ process.stdout.write('Done flag detected');
55
56
  const truncOutput = output.replace('%%%done%%%"\n', '');
56
57
  const [data, exit] = truncOutput.split('%%%');
57
58
  // Clean up trailing \n newline if it exists
@@ -59,6 +60,9 @@ export class BackgroundPty {
59
60
  if (strippedData.endsWith('\n')) {
60
61
  strippedData = strippedData.slice(0, -1);
61
62
  }
63
+ process.stdout.write(`Resolved exit ${exit}`);
64
+ process.stdout.write(`Raw data ${data}`);
65
+ process.stdout.write(`Stripped data ${strippedData}`);
62
66
  resolve({
63
67
  status: Number.parseInt(exit ?? 1, 10) === 0 ? 'success' : 'error',
64
68
  exitCode: Number.parseInt(exit ?? 1, 10),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codify-plugin-lib",
3
- "version": "1.0.182-beta15",
3
+ "version": "1.0.182-beta16",
4
4
  "description": "Library plugin library",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -248,7 +248,11 @@ export class Plugin {
248
248
  'validationPlan'
249
249
  );
250
250
 
251
+ process.stdout.write(`Validation plan ${result}`);
252
+
251
253
  await getPty().kill();
254
+
255
+ process.stdout.write('Killed')
252
256
  return result;
253
257
  })
254
258
 
@@ -10,6 +10,7 @@ import { Shell, Utils } from '../utils/index.js';
10
10
  import { VerbosityLevel } from '../utils/verbosity-level.js';
11
11
  import { IPty, SpawnError, SpawnOptions, SpawnResult } from './index.js';
12
12
  import { PromiseQueue } from './promise-queue.js';
13
+ import { str } from 'ajv';
13
14
 
14
15
  EventEmitter.defaultMaxListeners = 1000;
15
16
 
@@ -67,6 +68,7 @@ export class BackgroundPty implements IPty {
67
68
  process.stdout.write(data);
68
69
 
69
70
  if (output.includes('%%%done%%%"')) {
71
+ process.stdout.write('Done flag detected')
70
72
  const truncOutput = output.replace('%%%done%%%"\n', '');
71
73
  const [data, exit] = truncOutput.split('%%%');
72
74
 
@@ -76,6 +78,10 @@ export class BackgroundPty implements IPty {
76
78
  strippedData = strippedData.slice(0, -1);
77
79
  }
78
80
 
81
+ process.stdout.write(`Resolved exit ${exit}`);
82
+ process.stdout.write(`Raw data ${data}`);
83
+ process.stdout.write(`Stripped data ${strippedData}`);
84
+
79
85
  resolve(<SpawnResult>{
80
86
  status: Number.parseInt(exit ?? 1, 10) === 0 ? 'success' : 'error',
81
87
  exitCode: Number.parseInt(exit ?? 1, 10),