@salesforce/plugin-omnistudio-migration-tool 1.2.52 → 1.3.1-dev.0

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.
@@ -17,7 +17,7 @@ class QueryTools {
17
17
  }
18
18
  static buildCustomObjectFields(namespace, fields) {
19
19
  const queryFields = [];
20
- fields.forEach(field => {
20
+ fields.forEach((field) => {
21
21
  if (field.indexOf('__') > -1) {
22
22
  queryFields.push(namespace + '__' + field);
23
23
  }
@@ -37,7 +37,7 @@ class QueryTools {
37
37
  // Load more pages
38
38
  while (results.nextRecordsUrl) {
39
39
  results = await connection.queryMore(results.nextRecordsUrl);
40
- results.records.forEach(row => {
40
+ results.records.forEach((row) => {
41
41
  allrecords.push(row);
42
42
  });
43
43
  }
@@ -54,7 +54,31 @@ class QueryTools {
54
54
  // Load more pages
55
55
  while (results.nextRecordsUrl) {
56
56
  results = await connection.queryMore(results.nextRecordsUrl);
57
- results.records.forEach(row => {
57
+ results.records.forEach((row) => {
58
+ allrecords.push(row);
59
+ });
60
+ }
61
+ }
62
+ return allrecords;
63
+ }
64
+ static async queryWithFilterAndSort(connection, namespace, objectName, fields, filters, orderBy) {
65
+ let allrecords = [];
66
+ let query = QueryTools.buildCustomObjectQuery(namespace, objectName, fields, filters);
67
+ if (orderBy && orderBy.length > 0) {
68
+ const sortings = [];
69
+ for (let ob of orderBy) {
70
+ sortings.push(ob.field + ' ' + ob.direction);
71
+ }
72
+ query += ' ORDER BY ' + sortings.join(', ');
73
+ }
74
+ // Execute the query
75
+ let results = await connection.query(query);
76
+ if (results && results.totalSize > 0) {
77
+ allrecords = results.records;
78
+ // Load more pages
79
+ while (results.nextRecordsUrl) {
80
+ results = await connection.queryMore(results.nextRecordsUrl);
81
+ results.records.forEach((row) => {
58
82
  allrecords.push(row);
59
83
  });
60
84
  }
@@ -85,7 +109,7 @@ class QueryTools {
85
109
  // Load more pages
86
110
  while (results.nextRecordsUrl) {
87
111
  results = await connection.queryMore(results.nextRecordsUrl);
88
- results.records.forEach(row => {
112
+ results.records.forEach((row) => {
89
113
  allrecords.push(row);
90
114
  });
91
115
  }
@@ -109,24 +133,24 @@ class QueryTools {
109
133
  // Load more pages
110
134
  while (results.nextRecordsUrl) {
111
135
  results = await connection.queryMore(results.nextRecordsUrl);
112
- results.records.forEach(row => {
136
+ results.records.forEach((row) => {
113
137
  allrecords.push(row);
114
138
  });
115
139
  }
116
140
  }
117
- return allrecords.map(record => record['Id']);
141
+ return allrecords.map((record) => record['Id']);
118
142
  }
119
143
  static getFilterValue(val) {
120
144
  switch (typeof val) {
121
- case "bigint":
122
- case "boolean":
123
- case "number":
145
+ case 'bigint':
146
+ case 'boolean':
147
+ case 'number':
124
148
  return `${val}`;
125
- case "function":
149
+ case 'function':
126
150
  return `'${val()}'`;
127
- case "undefined":
151
+ case 'undefined':
128
152
  return 'NULL';
129
- case "string":
153
+ case 'string':
130
154
  default:
131
155
  return `'${val}'`;
132
156
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/query/index.ts"],"names":[],"mappings":";;;AAGA,oBAAoB;AACpB,MAAa,UAAU;IAEZ,MAAM,CAAC,sBAAsB,CAAC,SAAiB,EAAE,IAAY,EAAE,MAAgB,EAAE,OAA0B;QAC9G,MAAM,WAAW,GAAG,IAAI,CAAC,uBAAuB,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;QAE/E,IAAI,KAAK,GAAG,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,QAAQ,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;QAEpF,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,IAAI,OAAO,IAAI,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE;YAC7B,KAAK,IAAI,MAAM,IAAI,OAAO,CAAC,IAAI,EAAE,EAAE;gBAC/B,UAAU,CAAC,IAAI,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,KAAK,CAAC,CAAC;QAErD,IAAI,OAAO,IAAI,OAAO,CAAC,SAAS,GAAG,CAAC,EAAE;YACpC,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC;YAE7B,kBAAkB;YAClB,OAAO,OAAO,CAAC,cAAc,EAAE;gBAC7B,OAAO,GAAG,MAAM,UAAU,CAAC,SAAS,CAAU,OAAO,CAAC,cAAc,CAAC,CAAC;gBACtE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;oBAC9B,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACvB,CAAC,CAAC,CAAC;aACJ;SACF;QAED,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,CAAC;IAEO,MAAM,CAAC,cAAc,CAAC,GAAQ;QACpC,QAAQ,OAAO,GAAG,EAAE;YAClB,KAAK,QAAQ,CAAC;YACd,KAAK,SAAS,CAAC;YACf,KAAK,QAAQ;gBACX,OAAO,GAAG,GAAG,EAAE,CAAC;YAClB,KAAK,UAAU;gBACb,OAAO,IAAI,GAAG,EAAE,GAAG,CAAC;YACtB,KAAK,WAAW;gBACd,OAAO,MAAM,CAAC;YAChB,KAAK,QAAQ,CAAC;YACd;gBACE,OAAO,IAAI,GAAG,GAAG,CAAC;SACrB;IACH,CAAC;CACF;AA7ND,gCA6NC;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,4BAAW,CAAA;IACX,8BAAa,CAAA;AACf,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
@@ -6,5 +6,6 @@
6
6
  "examples": [
7
7
  "sfdx omnistudio:migration:info --targetusername myOrg@example.com --targetdevhubusername devhub@org.com",
8
8
  "sfdx omnistudio:migration:info --name myname --targetusername myOrg@example.com"
9
- ]
10
- }
9
+ ],
10
+ "allVersionsDescription": "Migrate all versions of a component"
11
+ }
@@ -24,5 +24,6 @@
24
24
  "errorWhileActivatingOs": "Could not activate OmniScript / Integration Procedure: ",
25
25
  "errorWhileActivatingCard": "Could not activate Card: ",
26
26
  "errorWhileUploadingCard": "An error ocurred while uploading Card: ",
27
- "errorWhileCreatingElements": "An error ocurred while saving OmniScript elements: "
28
- }
27
+ "errorWhileCreatingElements": "An error ocurred while saving OmniScript elements: ",
28
+ "allVersionsDescription": "Migrate all versions of a component"
29
+ }
@@ -1 +1 @@
1
- {"version":"1.2.52","commands":{"basecommand":{"id":"basecommand","usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-omnistudio-migration-tool","pluginType":"core","aliases":[],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"}},"args":[]},"omnistudio:migration:info":{"id":"omnistudio:migration:info","description":"print a greeting and your org IDs","usage":"<%= command.id %> [-n <string>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-omnistudio-migration-tool","pluginType":"core","aliases":[],"examples":["sfdx omnistudio:migration:info --targetusername myOrg@example.com --targetdevhubusername devhub@org.com","sfdx omnistudio:migration:info --name myname --targetusername myOrg@example.com"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetdevhubusername":{"name":"targetdevhubusername","type":"option","char":"v","description":"username or alias for the dev hub org; overrides default dev hub org"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"name":{"name":"name","type":"option","char":"n","description":"name to print"}},"args":[{"name":"file"}]},"omnistudio:migration:migrate":{"id":"omnistudio:migration:migrate","description":"print a greeting and your org IDs","usage":"<%= command.id %> [-n <string>] [-o <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-omnistudio-migration-tool","pluginType":"core","aliases":[],"examples":["omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=dr","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=ip","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=os","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=fc"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"namespace":{"name":"namespace","type":"option","char":"n","description":"The namespaced of the package"},"only":{"name":"only","type":"option","char":"o","description":"Migrate a single element: osip | fc | dr"}},"args":[{"name":"file"}]}}}
1
+ {"version":"1.3.1-dev.0","commands":{"basecommand":{"id":"basecommand","usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-omnistudio-migration-tool","pluginType":"core","aliases":[],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"}},"args":[]},"omnistudio:migration:info":{"id":"omnistudio:migration:info","description":"print a greeting and your org IDs","usage":"<%= command.id %> [-n <string>] [-a] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-omnistudio-migration-tool","pluginType":"core","aliases":[],"examples":["sfdx omnistudio:migration:info --targetusername myOrg@example.com --targetdevhubusername devhub@org.com","sfdx omnistudio:migration:info --name myname --targetusername myOrg@example.com"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetdevhubusername":{"name":"targetdevhubusername","type":"option","char":"v","description":"username or alias for the dev hub org; overrides default dev hub org"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"name":{"name":"name","type":"option","char":"n","description":"name to print"},"allversions":{"name":"allversions","type":"boolean","char":"a","description":"Migrate all versions of a component","required":false,"allowNo":false}},"args":[{"name":"file"}]},"omnistudio:migration:migrate":{"id":"omnistudio:migration:migrate","description":"print a greeting and your org IDs","usage":"<%= command.id %> [-n <string>] [-o <string>] [-a] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-omnistudio-migration-tool","pluginType":"core","aliases":[],"examples":["omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=dr","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=ip","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=os","omnistudio:migration:migrate -u orguser@domain.com --namespace=YOUR_PACKAGE_NAMESPACE --only=fc"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"namespace":{"name":"namespace","type":"option","char":"n","description":"The namespaced of the package"},"only":{"name":"only","type":"option","char":"o","description":"Migrate a single element: osip | fc | dr"},"allversions":{"name":"allversions","type":"boolean","char":"a","description":"Migrate all versions of a component","required":false,"allowNo":false}},"args":[{"name":"file"}]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-omnistudio-migration-tool",
3
3
  "description": "This SFDX plugin migrates FlexCard, OmniScript, DataRaptor, and Integration Procedure custom objects to standard objects.",
4
- "version": "1.2.52",
4
+ "version": "1.3.1-dev.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
@@ -25,7 +25,7 @@
25
25
  "@salesforce/plugin-command-reference": "^1.4.7",
26
26
  "@salesforce/prettier-config": "^0.0.3",
27
27
  "@salesforce/ts-sinon": "^1",
28
- "@types/jsforce": "^1.11.3",
28
+ "@types/jsforce": "^1.11.5",
29
29
  "@typescript-eslint/eslint-plugin": "^4.2.0",
30
30
  "@typescript-eslint/parser": "^4.2.0",
31
31
  "chai": "^4.3.10",
@@ -47,7 +47,7 @@
47
47
  "prettier": "^2.8.8",
48
48
  "pretty-quick": "^3.1.0",
49
49
  "sinon": "10.0.0",
50
- "ts-node": "^10.0.0",
50
+ "ts-node": "^10.9.2",
51
51
  "typescript": "^4.9.5"
52
52
  },
53
53
  "engines": {
@@ -115,7 +115,7 @@
115
115
  }
116
116
  },
117
117
  "sfdx": {
118
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/1.2.52.crt",
119
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/1.2.52.sig"
118
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/1.3.1-dev.0.crt",
119
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/1.3.1-dev.0.sig"
120
120
  }
121
121
  }