snow-flow 2.0.2 → 2.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.
- package/{.claude/mcp-config.json → .mcp.json} +13 -12
- package/.releaserc.json +47 -0
- package/README.md +6 -0
- package/package.json +1 -1
- package/.claude/claude-settings.json +0 -15
- package/.claude/commands/analysis/README.md +0 -9
- package/.claude/commands/automation/README.md +0 -9
- package/.claude/commands/github/README.md +0 -11
- package/.claude/commands/helpers/standard-checkpoint-hooks.sh +0 -179
- package/.claude/commands/hooks/README.md +0 -11
- package/.claude/commands/monitoring/README.md +0 -9
- package/.claude/commands/optimization/README.md +0 -9
- package/.claude/commands/training/README.md +0 -9
- package/.claude/commands/workflows/README.md +0 -9
- package/.claude/config.json +0 -36
- package/.claude/helpers/github-setup.sh +0 -28
- package/.claude/helpers/quick-start.sh +0 -19
- package/.claude/helpers/setup-mcp.sh +0 -18
- package/.claude/settings.json +0 -114
- package/.claude/settings.local.json +0 -33
- package/.claude-flow/metrics/agent-metrics.json +0 -1
- package/.claude-flow/metrics/performance.json +0 -9
- package/.claude-flow/metrics/system-metrics.json +0 -15986
- package/.claude-flow/metrics/task-metrics.json +0 -10
- package/.roo/README.md +0 -402
- package/.roo/mcp-list.txt +0 -257
- package/.roo/mcp.json +0 -32
- package/.roo/workflows/basic-tdd.json +0 -32
- package/.roomodes +0 -201
- package/CLAUDE.md +0 -393
- package/bin/snow-flow.js +0 -3
- package/dist/cli.js.bak +0 -2052
- package/dist/config/snow-flow-config.d.ts +0 -1492
- package/dist/config/snow-flow-config.js +0 -938
- package/scripts/create-env.js +0 -91
- package/scripts/postinstall.js +0 -30
- package/scripts/register-mcp-servers.js +0 -210
- package/scripts/reset-mcp-servers.js +0 -246
- package/scripts/setup-mcp.js +0 -106
- package/scripts/update-version.js +0 -31
- package/src/agents/README.md +0 -192
- package/src/agents/base-agent.ts +0 -251
- package/src/agents/coordinator.ts +0 -971
- package/src/agents/index.ts +0 -18
- package/src/agents/queen-403-handler.ts +0 -230
- package/src/agents/queen-agent.ts +0 -1399
- package/src/agents/script-writer-agent.ts +0 -769
- package/src/agents/security-agent.ts +0 -726
- package/src/agents/widget-creator-agent.ts +0 -568
- package/src/api/error-handling.ts +0 -1758
- package/src/api/natural-language-mapper.ts +0 -630
- package/src/api/performance-optimizer.ts +0 -891
- package/src/api/transaction-manager.ts +0 -754
- package/src/cli/deploy-artifact.ts +0 -304
- package/src/cli/snow-flow-cli-integration.ts +0 -434
- package/src/cli.ts +0 -4455
- package/src/cli.ts.bak +0 -5616
- package/src/compliance/advanced-compliance-system.ts +0 -1268
- package/src/compliance/index.ts +0 -19
- package/src/config/snow-flow-config.ts +0 -1019
- package/src/documentation/index.ts +0 -16
- package/src/documentation/self-documenting-system.ts +0 -1421
- package/src/dynamic-version.ts +0 -44
- package/src/healing/index.ts +0 -20
- package/src/healing/self-healing-system.ts +0 -1435
- package/src/health/README.md +0 -161
- package/src/health/system-health.ts +0 -995
- package/src/index.ts +0 -60
- package/src/intelligence/acl-analyzer.ts +0 -377
- package/src/intelligence/auto-resolution-engine.ts +0 -643
- package/src/intelligence/gap-analysis-engine.ts +0 -488
- package/src/intelligence/manual-instructions-generator.ts +0 -744
- package/src/intelligence/mcp-coverage-analyzer.ts +0 -708
- package/src/intelligence/multi-pass-requirements-analyzer.ts +0 -603
- package/src/intelligence/performance-recommendations-engine.ts +0 -1223
- package/src/intelligence/requirements-analyzer.ts +0 -1148
- package/src/intelligence/task-analyzer.ts +0 -628
- package/src/managers/scope-manager.ts +0 -555
- package/src/mcp/advanced/servicenow-advanced-features-mcp.ts +0 -16110
- package/src/mcp/base-mcp-server.ts +0 -660
- package/src/mcp/http-transport-wrapper.ts +0 -426
- package/src/mcp/service-discovery-client.ts +0 -312
- package/src/mcp/servicenow-automation-mcp-refactored.ts +0 -678
- package/src/mcp/servicenow-automation-mcp.ts +0 -838
- package/src/mcp/servicenow-deployment-mcp-refactored.ts +0 -1292
- package/src/mcp/servicenow-deployment-mcp.ts +0 -7244
- package/src/mcp/servicenow-graph-memory-mcp-refactored.ts +0 -721
- package/src/mcp/servicenow-graph-memory-mcp.ts +0 -832
- package/src/mcp/servicenow-integration-mcp-refactored.ts +0 -655
- package/src/mcp/servicenow-integration-mcp.ts +0 -819
- package/src/mcp/servicenow-intelligent-mcp-refactored.ts +0 -977
- package/src/mcp/servicenow-intelligent-mcp.ts +0 -4638
- package/src/mcp/servicenow-mcp-server.ts +0 -728
- package/src/mcp/servicenow-memory-mcp.ts +0 -474
- package/src/mcp/servicenow-operations-mcp-refactored.ts +0 -1995
- package/src/mcp/servicenow-operations-mcp.ts +0 -3384
- package/src/mcp/servicenow-platform-development-mcp-refactored.ts +0 -611
- package/src/mcp/servicenow-platform-development-mcp.ts +0 -970
- package/src/mcp/servicenow-progressive-indexer.ts +0 -370
- package/src/mcp/servicenow-reporting-analytics-mcp-refactored.ts +0 -695
- package/src/mcp/servicenow-reporting-analytics-mcp.ts +0 -1123
- package/src/mcp/servicenow-security-compliance-mcp-refactored.ts +0 -642
- package/src/mcp/servicenow-security-compliance-mcp.ts +0 -1157
- package/src/mcp/servicenow-update-set-mcp-refactored.ts +0 -751
- package/src/mcp/servicenow-update-set-mcp.ts +0 -811
- package/src/mcp/shared/agent-context-provider.ts +0 -365
- package/src/mcp/shared/base-mcp-server.ts +0 -2463
- package/src/mcp/shared/mcp-memory-manager.ts +0 -540
- package/src/mcp/shared/mcp-resource-manager.ts +0 -367
- package/src/mcp/snow-flow-mcp.ts +0 -911
- package/src/mcp/start-all-mcp-servers.ts +0 -102
- package/src/mcp/start-servicenow-mcp.ts +0 -67
- package/src/monitoring/enhanced-monitoring-system.ts +0 -1345
- package/src/monitoring/performance-tracker.ts +0 -777
- package/src/optimization/cost-optimization-engine.ts +0 -1125
- package/src/optimization/index.ts +0 -10
- package/src/queen/README.md +0 -403
- package/src/queen/agent-factory.ts +0 -574
- package/src/queen/index.ts +0 -94
- package/src/queen/mcp-execution-bridge.ts +0 -681
- package/src/queen/neural-learning.ts +0 -319
- package/src/queen/parallel-agent-engine.ts +0 -848
- package/src/queen/queen-memory-system.ts +0 -490
- package/src/queen/queen-memory.ts +0 -456
- package/src/queen/servicenow-queen.ts +0 -1029
- package/src/queen/types.ts +0 -87
- package/src/rollback/smart-rollback-system.ts +0 -866
- package/src/schemas/deployment.schema.json +0 -58
- package/src/schemas/flow.schema.json +0 -79
- package/src/schemas/widget.schema.json +0 -72
- package/src/snow-flow-system.ts +0 -541
- package/src/sparc/sparc-help.ts +0 -49
- package/src/sparc/team-sparc.ts +0 -88
- package/src/strategies/global-scope-strategy.ts +0 -736
- package/src/templates/base/application.template.json +0 -45
- package/src/templates/base/business_rule.template.json +0 -33
- package/src/templates/base/script_include.template.json +0 -18
- package/src/templates/base/table.template.json +0 -64
- package/src/templates/base/widget.template.json +0 -25
- package/src/templates/patterns/composite.incident-management.template.json +0 -140
- package/src/templates/patterns/widget.dashboard.template.json +0 -238
- package/src/templates/patterns/widget.datatable.template.json +0 -292
- package/src/testing/integration-test-suite.ts +0 -1276
- package/src/types/index.ts +0 -183
- package/src/types/neo4j-driver.d.ts +0 -23
- package/src/types/servicenow.types.ts +0 -307
- package/src/types/snow-flow.types.ts +0 -186
- package/src/types/todo.types.ts +0 -70
- package/src/utils/action-type-cache.ts +0 -286
- package/src/utils/agent-detector.ts +0 -573
- package/src/utils/artifact-tracker.ts +0 -379
- package/src/utils/dependency-detector.ts +0 -233
- package/src/utils/deployment-metadata-handler.ts +0 -518
- package/src/utils/error-recovery.ts +0 -680
- package/src/utils/logger.ts +0 -60
- package/src/utils/mcp-auth-middleware.ts +0 -262
- package/src/utils/mcp-config-manager.ts +0 -270
- package/src/utils/mcp-server-manager.ts +0 -446
- package/src/utils/mcp-tool-registry.ts +0 -298
- package/src/utils/migrate-snow-flow.ts +0 -98
- package/src/utils/oauth-html-templates.ts +0 -188
- package/src/utils/scope-utils.ts +0 -443
- package/src/utils/servicenow-client.ts +0 -3321
- package/src/utils/servicenow-id-generator.ts +0 -181
- package/src/utils/snow-memory-manager.ts +0 -605
- package/src/utils/snow-oauth.ts +0 -797
- package/src/utils/template-engine.ts +0 -463
- package/src/utils/theme-manager.ts +0 -295
- package/src/utils/unified-auth-store.ts +0 -222
- package/src/utils/update-set-importer.ts +0 -422
- package/src/utils/update-set-xml-packager.ts +0 -371
- package/src/utils/widget-template-generator.ts +0 -1744
- package/src/version.ts +0 -1950
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Generic Artifact Deployer
|
|
4
|
-
* Deploy any ServiceNow artifact type dynamically
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { Command } from 'commander';
|
|
8
|
-
import { ServiceNowClient } from '../utils/servicenow-client.js';
|
|
9
|
-
import { ServiceNowOAuth } from '../utils/snow-oauth.js';
|
|
10
|
-
import { Logger } from '../utils/logger.js';
|
|
11
|
-
import { promises as fs } from 'fs';
|
|
12
|
-
import chalk from 'chalk';
|
|
13
|
-
|
|
14
|
-
const logger = new Logger('DeployArtifact');
|
|
15
|
-
|
|
16
|
-
interface ArtifactConfig {
|
|
17
|
-
type: 'widget' | 'flow' | 'script_include' | 'business_rule' | 'application' | 'table';
|
|
18
|
-
name: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
config: Record<string, any>;
|
|
21
|
-
template?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
async function deployArtifact(type: string, configPath: string) {
|
|
25
|
-
try {
|
|
26
|
-
logger.info(`Deploying ${type} artifact from ${configPath}`);
|
|
27
|
-
|
|
28
|
-
// Load configuration
|
|
29
|
-
const configContent = await fs.readFile(configPath, 'utf-8');
|
|
30
|
-
const config: ArtifactConfig = JSON.parse(configContent);
|
|
31
|
-
|
|
32
|
-
// Validate configuration
|
|
33
|
-
if (!config.name) {
|
|
34
|
-
throw new Error('Artifact name is required in configuration');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Check authentication
|
|
38
|
-
const oauth = new ServiceNowOAuth();
|
|
39
|
-
const isAuth = await oauth.isAuthenticated();
|
|
40
|
-
if (!isAuth) {
|
|
41
|
-
throw new Error('Not authenticated. Run "snow-flow auth login" first.');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Create client
|
|
45
|
-
const client = new ServiceNowClient();
|
|
46
|
-
|
|
47
|
-
// Deploy based on type
|
|
48
|
-
let result;
|
|
49
|
-
switch (type) {
|
|
50
|
-
case 'widget':
|
|
51
|
-
result = await deployWidget(client, config);
|
|
52
|
-
break;
|
|
53
|
-
case 'flow':
|
|
54
|
-
result = await deployFlow(client, config);
|
|
55
|
-
break;
|
|
56
|
-
case 'script_include':
|
|
57
|
-
result = await deployScriptInclude(client, config);
|
|
58
|
-
break;
|
|
59
|
-
case 'business_rule':
|
|
60
|
-
result = await deployBusinessRule(client, config);
|
|
61
|
-
break;
|
|
62
|
-
case 'application':
|
|
63
|
-
result = await deployApplication(client, config);
|
|
64
|
-
break;
|
|
65
|
-
case 'table':
|
|
66
|
-
result = await deployTable(client, config);
|
|
67
|
-
break;
|
|
68
|
-
default:
|
|
69
|
-
throw new Error(`Unsupported artifact type: ${type}`);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Display result
|
|
73
|
-
if (result.success) {
|
|
74
|
-
console.log(chalk.green('\n✅ Deployment successful!'));
|
|
75
|
-
console.log(chalk.blue(`\n📋 Artifact Details:`));
|
|
76
|
-
console.log(` Name: ${config.name}`);
|
|
77
|
-
console.log(` Type: ${type}`);
|
|
78
|
-
console.log(` Sys ID: ${result.data?.sys_id}`);
|
|
79
|
-
|
|
80
|
-
const credentials = await oauth.loadCredentials();
|
|
81
|
-
console.log(chalk.yellow(`\n🔗 View in ServiceNow:`));
|
|
82
|
-
console.log(` ${getArtifactUrl(credentials?.instance || '', type, result.data?.sys_id)}`);
|
|
83
|
-
} else {
|
|
84
|
-
throw new Error(result.error || 'Deployment failed');
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
} catch (error) {
|
|
88
|
-
logger.error('Deployment failed', error);
|
|
89
|
-
console.error(chalk.red(`\n❌ Error: ${error instanceof Error ? error.message : String(error)}`));
|
|
90
|
-
process.exit(1);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
async function deployWidget(client: ServiceNowClient, config: ArtifactConfig) {
|
|
95
|
-
return await client.createWidget({
|
|
96
|
-
name: config.name,
|
|
97
|
-
id: config.config.id || config.name.toLowerCase().replace(/\s+/g, '_'),
|
|
98
|
-
title: config.config.title || config.name,
|
|
99
|
-
description: config.description || '',
|
|
100
|
-
template: config.config.template || '',
|
|
101
|
-
css: config.config.css || '',
|
|
102
|
-
client_script: config.config.client_script || '',
|
|
103
|
-
server_script: config.config.server_script || '',
|
|
104
|
-
option_schema: config.config.option_schema || '[]',
|
|
105
|
-
demo_data: config.config.demo_data || '{}',
|
|
106
|
-
has_preview: config.config.has_preview || false,
|
|
107
|
-
category: config.config.category || 'custom'
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
async function deployFlow(client: ServiceNowClient, config: ArtifactConfig) {
|
|
112
|
-
return await client.createFlow({
|
|
113
|
-
name: config.name,
|
|
114
|
-
description: config.description || '',
|
|
115
|
-
active: config.config.active !== false,
|
|
116
|
-
table: config.config.table || '',
|
|
117
|
-
trigger_type: config.config.trigger_type || 'manual',
|
|
118
|
-
condition: config.config.condition || '',
|
|
119
|
-
flow_definition: JSON.stringify(config.config.flow_definition || {}),
|
|
120
|
-
category: config.config.category || 'automation'
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
async function deployScriptInclude(client: ServiceNowClient, config: ArtifactConfig) {
|
|
125
|
-
return await client.createScriptInclude({
|
|
126
|
-
name: config.name,
|
|
127
|
-
api_name: config.config.api_name || config.name,
|
|
128
|
-
description: config.description || '',
|
|
129
|
-
script: config.config.script || '',
|
|
130
|
-
active: config.config.active !== false,
|
|
131
|
-
access: config.config.access || 'public'
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
async function deployBusinessRule(client: ServiceNowClient, config: ArtifactConfig) {
|
|
136
|
-
return await client.createBusinessRule({
|
|
137
|
-
name: config.name,
|
|
138
|
-
table: config.config.table || 'incident',
|
|
139
|
-
when: config.config.when || 'after',
|
|
140
|
-
condition: config.config.condition || '',
|
|
141
|
-
script: config.config.script || '',
|
|
142
|
-
description: config.description || '',
|
|
143
|
-
active: config.config.active !== false,
|
|
144
|
-
order: config.config.order || 100
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
async function deployApplication(client: ServiceNowClient, config: ArtifactConfig) {
|
|
149
|
-
return await client.createApplication({
|
|
150
|
-
name: config.name,
|
|
151
|
-
scope: config.config.scope || 'x_' + config.name.toLowerCase().replace(/\s+/g, '_'),
|
|
152
|
-
version: config.config.version || '1.0.0',
|
|
153
|
-
short_description: config.config.short_description || config.description || '',
|
|
154
|
-
description: config.description || '',
|
|
155
|
-
vendor: config.config.vendor || 'Custom',
|
|
156
|
-
vendor_prefix: config.config.vendor_prefix || 'x',
|
|
157
|
-
active: config.config.active !== false
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
async function deployTable(client: ServiceNowClient, config: ArtifactConfig) {
|
|
162
|
-
return await client.createTable({
|
|
163
|
-
name: config.name,
|
|
164
|
-
label: config.config.label || config.name,
|
|
165
|
-
extends_table: config.config.extends_table || 'sys_metadata',
|
|
166
|
-
is_extendable: config.config.is_extendable !== false,
|
|
167
|
-
access: config.config.access || 'public',
|
|
168
|
-
create_access_controls: config.config.create_access_controls !== false
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
function getArtifactUrl(instance: string, type: string, sysId: string): string {
|
|
173
|
-
const baseUrl = `https://${instance}`;
|
|
174
|
-
switch (type) {
|
|
175
|
-
case 'widget':
|
|
176
|
-
return `${baseUrl}/sp_config?id=widget_editor&sys_id=${sysId}`;
|
|
177
|
-
case 'flow':
|
|
178
|
-
return `${baseUrl}/flow-designer/flow/${sysId}`;
|
|
179
|
-
case 'script_include':
|
|
180
|
-
return `${baseUrl}/sys_script_include.do?sys_id=${sysId}`;
|
|
181
|
-
case 'business_rule':
|
|
182
|
-
return `${baseUrl}/sys_script.do?sys_id=${sysId}`;
|
|
183
|
-
case 'application':
|
|
184
|
-
return `${baseUrl}/sys_app.do?sys_id=${sysId}`;
|
|
185
|
-
case 'table':
|
|
186
|
-
return `${baseUrl}/sys_db_object.do?sys_id=${sysId}`;
|
|
187
|
-
default:
|
|
188
|
-
return baseUrl;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// CLI setup
|
|
193
|
-
const program = new Command();
|
|
194
|
-
|
|
195
|
-
program
|
|
196
|
-
.name('deploy-artifact')
|
|
197
|
-
.description('Deploy any ServiceNow artifact type dynamically')
|
|
198
|
-
.version('1.0.0');
|
|
199
|
-
|
|
200
|
-
program
|
|
201
|
-
.command('deploy')
|
|
202
|
-
.description('Deploy an artifact from configuration file')
|
|
203
|
-
.requiredOption('-t, --type <type>', 'Artifact type (widget, flow, script_include, business_rule, application, table)')
|
|
204
|
-
.requiredOption('-c, --config <path>', 'Path to artifact configuration file (JSON)')
|
|
205
|
-
.action(async (options) => {
|
|
206
|
-
await deployArtifact(options.type, options.config);
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
program
|
|
210
|
-
.command('template')
|
|
211
|
-
.description('Generate a template configuration file')
|
|
212
|
-
.requiredOption('-t, --type <type>', 'Artifact type')
|
|
213
|
-
.requiredOption('-o, --output <path>', 'Output file path')
|
|
214
|
-
.action(async (options) => {
|
|
215
|
-
const template = getTemplate(options.type);
|
|
216
|
-
await fs.writeFile(options.output, JSON.stringify(template, null, 2));
|
|
217
|
-
console.log(chalk.green(`✅ Template created: ${options.output}`));
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
function getTemplate(type: string): any {
|
|
221
|
-
const templates: Record<string, any> = {
|
|
222
|
-
widget: {
|
|
223
|
-
type: 'widget',
|
|
224
|
-
name: 'My Custom Widget',
|
|
225
|
-
description: 'A custom ServiceNow widget',
|
|
226
|
-
config: {
|
|
227
|
-
title: 'My Widget',
|
|
228
|
-
category: 'custom',
|
|
229
|
-
template: '<div>{{c.data.message}}</div>',
|
|
230
|
-
css: '.my-widget { padding: 20px; }',
|
|
231
|
-
client_script: 'function() { var c = this; c.data.message = "Hello World"; }',
|
|
232
|
-
server_script: '(function() { data.message = "Server message"; })()',
|
|
233
|
-
option_schema: '[]',
|
|
234
|
-
demo_data: '{}'
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
flow: {
|
|
238
|
-
type: 'flow',
|
|
239
|
-
name: 'My Custom Flow',
|
|
240
|
-
description: 'A custom ServiceNow flow',
|
|
241
|
-
config: {
|
|
242
|
-
table: 'incident',
|
|
243
|
-
trigger_type: 'record_created',
|
|
244
|
-
condition: 'active=true',
|
|
245
|
-
category: 'automation',
|
|
246
|
-
flow_definition: {
|
|
247
|
-
activities: [],
|
|
248
|
-
variables: []
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
script_include: {
|
|
253
|
-
type: 'script_include',
|
|
254
|
-
name: 'MyUtilityClass',
|
|
255
|
-
description: 'Utility functions',
|
|
256
|
-
config: {
|
|
257
|
-
api_name: 'MyUtilityClass',
|
|
258
|
-
script: 'var MyUtilityClass = Class.create();\nMyUtilityClass.prototype = {\n initialize: function() {},\n type: "MyUtilityClass"\n};',
|
|
259
|
-
access: 'public'
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
business_rule: {
|
|
263
|
-
type: 'business_rule',
|
|
264
|
-
name: 'My Business Rule',
|
|
265
|
-
description: 'A custom business rule',
|
|
266
|
-
config: {
|
|
267
|
-
table: 'incident',
|
|
268
|
-
when: 'before',
|
|
269
|
-
condition: '',
|
|
270
|
-
script: '(function executeRule(current, previous) {\n // Business rule logic here\n})(current, previous);',
|
|
271
|
-
active: true,
|
|
272
|
-
order: 100
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
application: {
|
|
276
|
-
type: 'application',
|
|
277
|
-
name: 'My Custom Application',
|
|
278
|
-
description: 'A custom ServiceNow application',
|
|
279
|
-
config: {
|
|
280
|
-
scope: 'x_custom',
|
|
281
|
-
version: '1.0.0',
|
|
282
|
-
vendor: 'Custom',
|
|
283
|
-
vendor_prefix: 'x',
|
|
284
|
-
active: true
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
table: {
|
|
288
|
-
type: 'table',
|
|
289
|
-
name: 'u_custom_table',
|
|
290
|
-
description: 'A custom ServiceNow table',
|
|
291
|
-
config: {
|
|
292
|
-
label: 'Custom Table',
|
|
293
|
-
extends_table: 'task',
|
|
294
|
-
is_extendable: true,
|
|
295
|
-
access: 'public',
|
|
296
|
-
create_access_controls: true
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
return templates[type] || { type, name: 'New Artifact', config: {} };
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
program.parse(process.argv);
|