snow-flow 4.0.2 → 4.0.3
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.
|
@@ -621,12 +621,12 @@ class ServiceNowLocalDevelopmentMCP extends enhanced_base_mcp_server_js_1.Enhanc
|
|
|
621
621
|
// Check for large server scripts that need chunking
|
|
622
622
|
const serverFile = widget.files.find(f => f.type === 'server_script' || f.filename.includes('.server'));
|
|
623
623
|
const serverSize = serverFile?.content?.length || 0;
|
|
624
|
-
if (serverSize >
|
|
624
|
+
if (serverSize > 100000 && !force) {
|
|
625
625
|
return {
|
|
626
626
|
content: [
|
|
627
627
|
{
|
|
628
628
|
type: 'text',
|
|
629
|
-
text: `⚠️ Server script is ${serverSize} characters (>
|
|
629
|
+
text: `⚠️ Server script is ${serverSize} characters (>100k limit).\n\n🔧 SOLUTIONS:\n1. Use force: true to attempt push anyway\n2. Manually copy-paste the server script in ServiceNow\n3. Break script into smaller Script Includes\n\n💡 Very large scripts (>100k) may hit API token limits during updates.`
|
|
630
630
|
}
|
|
631
631
|
]
|
|
632
632
|
};
|
|
@@ -33,7 +33,7 @@ exports.ARTIFACT_REGISTRY = {
|
|
|
33
33
|
fileExtension: 'html',
|
|
34
34
|
description: 'HTML template with Angular bindings',
|
|
35
35
|
wrapperHeader: '<!-- ServiceNow Widget Template: {name} -->\n<!-- Angular bindings: {{data.x}}, ng-click="method()" -->\n\n',
|
|
36
|
-
maxTokens:
|
|
36
|
+
maxTokens: 50000,
|
|
37
37
|
isRequired: true
|
|
38
38
|
},
|
|
39
39
|
{
|
|
@@ -43,7 +43,7 @@ exports.ARTIFACT_REGISTRY = {
|
|
|
43
43
|
description: 'Server-side script (ES5 ONLY)',
|
|
44
44
|
wrapperHeader: '/**\n * Server Script for Widget: {name}\n * ES5 ONLY - No arrow functions, const/let, template literals\n * Available: data, input, options, gs, $sp\n */\n\n(function() {\n',
|
|
45
45
|
wrapperFooter: '\n})();',
|
|
46
|
-
maxTokens:
|
|
46
|
+
maxTokens: 50000,
|
|
47
47
|
isRequired: false,
|
|
48
48
|
validateES5: true
|
|
49
49
|
},
|
|
@@ -54,7 +54,7 @@ exports.ARTIFACT_REGISTRY = {
|
|
|
54
54
|
description: 'Client-side AngularJS controller',
|
|
55
55
|
wrapperHeader: '/**\n * Client Controller for Widget: {name}\n * AngularJS 1.x\n * Available: c (this), c.data, c.server, $scope\n */\n\nfunction(',
|
|
56
56
|
wrapperFooter: ')',
|
|
57
|
-
maxTokens:
|
|
57
|
+
maxTokens: 50000,
|
|
58
58
|
isRequired: false
|
|
59
59
|
},
|
|
60
60
|
{
|
|
@@ -63,7 +63,7 @@ exports.ARTIFACT_REGISTRY = {
|
|
|
63
63
|
fileExtension: 'css',
|
|
64
64
|
description: 'Widget-specific CSS styles',
|
|
65
65
|
wrapperHeader: '/* Styles for Widget: {name} */\n/* Prefix classes to avoid conflicts */\n\n',
|
|
66
|
-
maxTokens:
|
|
66
|
+
maxTokens: 50000,
|
|
67
67
|
isRequired: false
|
|
68
68
|
},
|
|
69
69
|
{
|
|
@@ -243,7 +243,7 @@ exports.ARTIFACT_REGISTRY = {
|
|
|
243
243
|
description: 'Business rule script',
|
|
244
244
|
wrapperHeader: '/**\n * Business Rule: {name}\n * Table: {collection}\n * When: {when}\n * Order: {order}\n * Available: current, previous, gs, g_scratchpad\n */\n\n(function executeRule(current, previous /*null when async*/) {\n',
|
|
245
245
|
wrapperFooter: '\n})(current, previous);',
|
|
246
|
-
maxTokens:
|
|
246
|
+
maxTokens: 50000,
|
|
247
247
|
isRequired: true,
|
|
248
248
|
validateES5: true
|
|
249
249
|
},
|
|
@@ -281,7 +281,7 @@ exports.ARTIFACT_REGISTRY = {
|
|
|
281
281
|
localFileName: '{name}.client',
|
|
282
282
|
fileExtension: 'js',
|
|
283
283
|
description: 'Client-side JavaScript',
|
|
284
|
-
maxTokens:
|
|
284
|
+
maxTokens: 50000,
|
|
285
285
|
isRequired: false
|
|
286
286
|
},
|
|
287
287
|
{
|
|
@@ -289,7 +289,7 @@ exports.ARTIFACT_REGISTRY = {
|
|
|
289
289
|
localFileName: '{name}.server',
|
|
290
290
|
fileExtension: 'js',
|
|
291
291
|
description: 'Server-side processing script (ES5)',
|
|
292
|
-
maxTokens:
|
|
292
|
+
maxTokens: 50000,
|
|
293
293
|
isRequired: false,
|
|
294
294
|
validateES5: true
|
|
295
295
|
}
|
|
@@ -310,7 +310,7 @@ exports.ARTIFACT_REGISTRY = {
|
|
|
310
310
|
fileExtension: 'js',
|
|
311
311
|
description: 'Client-side form script',
|
|
312
312
|
wrapperHeader: '/**\n * Client Script: {name}\n * Table: {table}\n * Type: {type}\n * Available: g_form, g_user, g_list\n */\n\n',
|
|
313
|
-
maxTokens:
|
|
313
|
+
maxTokens: 50000,
|
|
314
314
|
isRequired: true
|
|
315
315
|
}
|
|
316
316
|
]
|
|
@@ -375,7 +375,7 @@ exports.ARTIFACT_REGISTRY = {
|
|
|
375
375
|
localFileName: '{name}',
|
|
376
376
|
fileExtension: 'js',
|
|
377
377
|
description: 'Transform map script',
|
|
378
|
-
maxTokens:
|
|
378
|
+
maxTokens: 50000,
|
|
379
379
|
isRequired: false,
|
|
380
380
|
validateES5: true
|
|
381
381
|
}
|
|
@@ -396,7 +396,7 @@ exports.ARTIFACT_REGISTRY = {
|
|
|
396
396
|
fileExtension: 'js',
|
|
397
397
|
description: 'Scheduled job script (ES5)',
|
|
398
398
|
wrapperHeader: '/**\n * Scheduled Job: {name}\n * Run as: {run_as}\n * Time zone: {time_zone}\n */\n\n',
|
|
399
|
-
maxTokens:
|
|
399
|
+
maxTokens: 50000,
|
|
400
400
|
isRequired: true,
|
|
401
401
|
validateES5: true
|
|
402
402
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "KNOWLEDGE BASE VERIFICATION - v3.6.25 adds critical validation to snow_create_knowledge_article. Now throws error when non-existent knowledge base is specified, preventing orphaned articles. Includes helpful suggestions to create or discover valid knowledge bases.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|