snow-flow 1.3.10 → 1.3.11

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/cli.js CHANGED
@@ -159,8 +159,8 @@ program
159
159
  cliLogger.info('šŸ“‹ Creating production-ready ServiceNow flow XML...');
160
160
  cliLogger.info('šŸ’” Reason: Flow Designer flows are most reliable with XML-first approach\n');
161
161
  try {
162
- // Import XML flow generator
163
- const { generateProductionFlowXML } = await Promise.resolve().then(() => __importStar(require('./utils/xml-first-flow-generator.js')));
162
+ // Import IMPROVED XML flow generator (fixes "too small to work" issue!)
163
+ const { generateImprovedFlowXML } = await Promise.resolve().then(() => __importStar(require('./utils/improved-flow-xml-generator.js')));
164
164
  // Parse instruction to determine activities
165
165
  const activities = [];
166
166
  const objectiveLower = objective.toLowerCase();
@@ -236,12 +236,25 @@ program
236
236
  outputs: { started: 'boolean' }
237
237
  }]
238
238
  };
239
- // Generate XML
240
- cliLogger.info('šŸ—ļø Generating production XML...');
241
- const result = generateProductionFlowXML(flowDef);
239
+ // Generate IMPROVED XML with enhanced structure
240
+ cliLogger.info('šŸ—ļø Generating IMPROVED production XML...');
241
+ // Convert to improved flow definition
242
+ const improvedFlowDef = {
243
+ ...flowDef,
244
+ run_as: 'user',
245
+ accessible_from: 'package_private',
246
+ category: 'custom',
247
+ tags: ['auto-generated'],
248
+ activities: flowDef.activities.map((act) => ({
249
+ ...act,
250
+ description: act.description || act.name
251
+ }))
252
+ };
253
+ const result = generateImprovedFlowXML(improvedFlowDef);
242
254
  xmlFlowResult = { ...result, flowDefinition: flowDef };
243
- cliLogger.info(`\nāœ… XML Generated Successfully!`);
255
+ cliLogger.info(`\nāœ… IMPROVED XML Generated Successfully!`);
244
256
  cliLogger.info(`šŸ“ File saved to: ${result.filePath}`);
257
+ cliLogger.info(`šŸ”„ IMPROVEMENTS: Uses v2 tables, Base64+gzip encoding, complete label_cache!`);
245
258
  cliLogger.info(`šŸ“Š Flow structure:`);
246
259
  cliLogger.info(` - Name: ${flowDef.name}`);
247
260
  cliLogger.info(` - Table: ${flowDef.table}`);
@@ -4324,8 +4337,8 @@ program
4324
4337
  console.log(`\nšŸ”§ XML-First Flow Generator v${version_js_1.VERSION}`);
4325
4338
  console.log('šŸ“‹ Creating production-ready ServiceNow flow XML...\n');
4326
4339
  try {
4327
- // Import XML flow generator
4328
- const { generateProductionFlowXML } = await Promise.resolve().then(() => __importStar(require('./utils/xml-first-flow-generator.js')));
4340
+ // Import IMPROVED XML flow generator (fixes "too small to work" issue!)
4341
+ const { generateImprovedFlowXML } = await Promise.resolve().then(() => __importStar(require('./utils/improved-flow-xml-generator.js')));
4329
4342
  // Parse instruction to determine activities
4330
4343
  const activities = [];
4331
4344
  // Check for common patterns in instruction
@@ -4403,11 +4416,24 @@ return { started: true };`
4403
4416
  }
4404
4417
  ];
4405
4418
  }
4406
- // Generate XML
4407
- console.log('\nšŸ—ļø Generating production XML...');
4408
- const result = generateProductionFlowXML(flowDef);
4409
- console.log(`\nāœ… XML Generated Successfully!`);
4419
+ // Generate IMPROVED XML with enhanced structure
4420
+ console.log('\nšŸ—ļø Generating IMPROVED production XML...');
4421
+ // Convert to improved flow definition
4422
+ const improvedFlowDef = {
4423
+ ...flowDef,
4424
+ run_as: 'user',
4425
+ accessible_from: 'package_private',
4426
+ category: 'custom',
4427
+ tags: ['cli-generated'],
4428
+ activities: flowDef.activities.map((act) => ({
4429
+ ...act,
4430
+ description: act.description || act.name
4431
+ }))
4432
+ };
4433
+ const result = generateImprovedFlowXML(improvedFlowDef);
4434
+ console.log(`\nāœ… IMPROVED XML Generated Successfully!`);
4410
4435
  console.log(`šŸ“ File saved to: ${result.filePath}`);
4436
+ console.log(`šŸ”„ IMPROVEMENTS: Uses v2 tables, Base64+gzip encoding, complete label_cache!`);
4411
4437
  console.log(`šŸ“Š Flow structure:`);
4412
4438
  console.log(` - Name: ${flowDef.name}`);
4413
4439
  console.log(` - Table: ${flowDef.table}`);