@lingk/sync 1.1.38 → 1.1.39

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.
@@ -46,12 +46,12 @@ module.exports =
46
46
  /***/ 0:
47
47
  /***/ function(module, exports, __webpack_require__) {
48
48
 
49
- module.exports = __webpack_require__(49);
49
+ module.exports = __webpack_require__(66);
50
50
 
51
51
 
52
52
  /***/ },
53
53
 
54
- /***/ 49:
54
+ /***/ 66:
55
55
  /***/ function(module, exports) {
56
56
 
57
57
  'use strict';
@@ -59,9 +59,6 @@ module.exports =
59
59
  Object.defineProperty(exports, "__esModule", {
60
60
  value: true
61
61
  });
62
-
63
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
64
-
65
62
  exports.metadataFunctions = metadataFunctions;
66
63
  /*
67
64
  Provider-specific nested alphabetization of resources and properties
@@ -84,400 +81,345 @@ module.exports =
84
81
  }
85
82
 
86
83
  var meta = null;
87
- var canvasResources;
88
- var blackboardResources;
89
- var resources;
90
- var rscs;
91
-
92
- (function () {
93
- switch (providerType) {
94
-
95
- /*case 'Banner':
96
- if(res){
97
- var bannerResources = []
98
- res.forEach(rsc=>{
99
- rsc.properties && rsc.properties.sort((a, b)=>{
100
- if(a.label < b.label) return -1;
101
- if(a.label > b.label) return 1;
102
- return 0;
103
- })
104
- bannerResources.push(rsc)
105
- })
106
- meta = bannerResources
107
- }
108
- break;*/
109
-
110
- /*case 'Moodle':
111
- if(res){
112
- var moodleResources = []
113
- res.resources.forEach(rsc=>{
114
- rsc.properties && rsc.properties.sort((a, b)=>{
115
- if(a.label < b.label) return -1;
116
- if(a.label > b.label) return 1;
117
- return 0;
118
- })
119
- moodleResources.push(rsc)
84
+ switch (providerType) {
85
+
86
+ /*case 'Banner':
87
+ if(res){
88
+ var bannerResources = []
89
+ res.forEach(rsc=>{
90
+ rsc.properties && rsc.properties.sort((a, b)=>{
91
+ if(a.label < b.label) return -1;
92
+ if(a.label > b.label) return 1;
93
+ return 0;
120
94
  })
121
- meta = moodleResources
122
- }
123
- break;*/
124
-
125
- /*case 'LingkAdapter':
126
- if(res){
127
- var lingkResources = []
128
- res.forEach(rsc=>{
129
- rsc.properties && rsc.properties.sort((a, b)=>{
130
- if(a.label < b.label) return -1;
131
- if(a.label > b.label) return 1;
132
- return 0;
133
- })
134
- lingkResources.push(rsc)
95
+ bannerResources.push(rsc)
96
+ })
97
+ meta = bannerResources
98
+ }
99
+ break;*/
100
+
101
+ /*case 'Moodle':
102
+ if(res){
103
+ var moodleResources = []
104
+ res.resources.forEach(rsc=>{
105
+ rsc.properties && rsc.properties.sort((a, b)=>{
106
+ if(a.label < b.label) return -1;
107
+ if(a.label > b.label) return 1;
108
+ return 0;
135
109
  })
136
- meta = lingkResources
137
- }
138
- break;*/
139
-
140
- /*case 'Colleague':
141
- if(res){
142
- var colleagueResources = []
143
- res.forEach(rsc=>{
144
- rsc.properties && rsc.properties.sort((a, b)=>{
145
- if(a.label < b.label) return -1;
146
- if(a.label > b.label) return 1;
147
- return 0;
148
- })
149
- colleagueResources.push(rsc)
110
+ moodleResources.push(rsc)
111
+ })
112
+ meta = moodleResources
113
+ }
114
+ break;*/
115
+
116
+ /*case 'LingkAdapter':
117
+ if(res){
118
+ var lingkResources = []
119
+ res.forEach(rsc=>{
120
+ rsc.properties && rsc.properties.sort((a, b)=>{
121
+ if(a.label < b.label) return -1;
122
+ if(a.label > b.label) return 1;
123
+ return 0;
150
124
  })
151
- meta = colleagueResources
152
- meta.sort(function(a, b){
153
- if(a.name < b.name) return -1;
154
- if(a.name > b.name) return 1;
125
+ lingkResources.push(rsc)
126
+ })
127
+ meta = lingkResources
128
+ }
129
+ break;*/
130
+
131
+ /*case 'Colleague':
132
+ if(res){
133
+ var colleagueResources = []
134
+ res.forEach(rsc=>{
135
+ rsc.properties && rsc.properties.sort((a, b)=>{
136
+ if(a.label < b.label) return -1;
137
+ if(a.label > b.label) return 1;
155
138
  return 0;
156
139
  })
157
- }
158
- break;*/
159
-
160
- case 'Canvas':
161
- if (res) {
162
- canvasResources = [];
163
- // sort properties
164
-
165
- res.forEach(function (rsc) {
166
- rsc.properties && rsc.properties.sort(function (a, b) {
167
- if (a && b) {
168
- if (a.label < b.label) return -1;
169
- if (a.label > b.label) return 1;
170
- }
171
- return 0;
172
- });
173
- canvasResources.push(rsc);
174
- });
175
- // sort resources
176
- canvasResources.sort(function (a, b) {
177
- if (a.type < b.type) return -1;
178
- if (a.type > b.type) return 1;
140
+ colleagueResources.push(rsc)
141
+ })
142
+ meta = colleagueResources
143
+ meta.sort(function(a, b){
144
+ if(a.name < b.name) return -1;
145
+ if(a.name > b.name) return 1;
146
+ return 0;
147
+ })
148
+ }
149
+ break;*/
150
+
151
+ case 'Canvas':
152
+ if (res) {
153
+ var canvasResources = [];
154
+ // sort properties
155
+ res.forEach(function (rsc) {
156
+ rsc.properties && rsc.properties.sort(function (a, b) {
157
+ if (a && b) {
158
+ if (a.label < b.label) return -1;
159
+ if (a.label > b.label) return 1;
160
+ }
179
161
  return 0;
180
162
  });
163
+ canvasResources.push(rsc);
164
+ });
165
+ // sort resources
166
+ canvasResources.sort(function (a, b) {
167
+ if (a.type < b.type) return -1;
168
+ if (a.type > b.type) return 1;
169
+ return 0;
170
+ });
181
171
 
182
- // sort nesting of resources
183
- meta = [];
184
- canvasResources = canvasResources.map(function (r) {
185
- if (r && !r.parentRef) {
186
- meta.push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
172
+ // sort nesting of resources
173
+ meta = [];
174
+ canvasResources = canvasResources.map(function (r) {
175
+ if (r && !r.parentRef) {
176
+ meta.push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
177
+ return null;
178
+ }
179
+ return r;
180
+ });
181
+ canvasResources = canvasResources.map(function (r) {
182
+ if (r && r.parentRef.length === 1) {
183
+ var parentString = r.parentRef[0].ref.split('/')[2];
184
+ var parentIndex = meta.findIndex(function (r) {
185
+ return r[0].type === parentString;
186
+ });
187
+ if (parentIndex > -1) {
188
+ meta[parentIndex].push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
187
189
  return null;
188
190
  }
189
- return r;
190
- });
191
- canvasResources = canvasResources.map(function (r) {
192
- if (r && r.parentRef.length === 1) {
193
- var _ret2 = function () {
194
- var parentString = r.parentRef[0].ref.split('/')[2];
195
- var parentIndex = meta.findIndex(function (r) {
196
- return r[0].type === parentString;
197
- });
198
- if (parentIndex > -1) {
199
- meta[parentIndex].push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
200
- return {
201
- v: null
202
- };
203
- }
204
- }();
205
-
206
- if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v;
207
- }
208
- return r;
209
- });
210
- canvasResources = canvasResources.map(function (r) {
211
- if (r && r.parentRef.length === 2) {
212
- var _ret3 = function () {
213
- var grandParentString = r.parentRef[1].ref.split('/')[2];
214
- var grandParentIndex = meta.findIndex(function (r) {
215
- return r[0].type === grandParentString;
216
- });
217
- if (grandParentIndex > -1) {
218
- var _ret4 = function () {
219
- var parentString = r.parentRef[0].ref.split('/')[2];
220
- var parentIndex = meta[grandParentIndex].findIndex(function (r) {
221
- return r[0] && r[0].type === parentString;
222
- });
223
- if (parentIndex > -1) {
224
- meta[grandParentIndex][parentIndex].push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
225
- return {
226
- v: {
227
- v: null
228
- }
229
- };
230
- }
231
- return {
232
- v: {
233
- v: r
234
- }
235
- };
236
- }();
237
-
238
- if ((typeof _ret4 === 'undefined' ? 'undefined' : _typeof(_ret4)) === "object") return _ret4.v;
239
- }
240
- }();
241
-
242
- if ((typeof _ret3 === 'undefined' ? 'undefined' : _typeof(_ret3)) === "object") return _ret3.v;
191
+ }
192
+ return r;
193
+ });
194
+ canvasResources = canvasResources.map(function (r) {
195
+ if (r && r.parentRef.length === 2) {
196
+ var grandParentString = r.parentRef[1].ref.split('/')[2];
197
+ var grandParentIndex = meta.findIndex(function (r) {
198
+ return r[0].type === grandParentString;
199
+ });
200
+ if (grandParentIndex > -1) {
201
+ var parentString = r.parentRef[0].ref.split('/')[2];
202
+ var parentIndex = meta[grandParentIndex].findIndex(function (r) {
203
+ return r[0] && r[0].type === parentString;
204
+ });
205
+ if (parentIndex > -1) {
206
+ meta[grandParentIndex][parentIndex].push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
207
+ return null;
208
+ }
209
+ return r;
243
210
  }
244
- return r;
245
- });
246
- meta = flatten(meta);
247
- }
248
- break;
249
-
250
- /*case 'PeopleSoft':
251
- if(res){
252
- var psResources = []
253
- res.forEach(rsc=>{
254
- rsc.properties && rsc.properties.sort((a, b)=>{
255
- if(a.label < b.label) return -1;
256
- if(a.label > b.label) return 1;
257
- return 0;
258
- })
259
- psResources.push(rsc)
260
- })
261
- meta = psResources
262
- meta.sort(function(a, b){
263
- if(a.name < b.name) return -1;
264
- if(a.name > b.name) return 1;
211
+ }
212
+ return r;
213
+ });
214
+ meta = flatten(meta);
215
+ }
216
+ break;
217
+
218
+ /*case 'PeopleSoft':
219
+ if(res){
220
+ var psResources = []
221
+ res.forEach(rsc=>{
222
+ rsc.properties && rsc.properties.sort((a, b)=>{
223
+ if(a.label < b.label) return -1;
224
+ if(a.label > b.label) return 1;
265
225
  return 0;
266
226
  })
267
- }
268
- break;*/
227
+ psResources.push(rsc)
228
+ })
229
+ meta = psResources
230
+ meta.sort(function(a, b){
231
+ if(a.name < b.name) return -1;
232
+ if(a.name > b.name) return 1;
233
+ return 0;
234
+ })
235
+ }
236
+ break;*/
237
+
238
+ case 'Blackboard':
239
+ var recurseSort = function recurseSort(rsc) {
240
+ rsc.properties && rsc.properties.sort(function (a, b) {
241
+ if (a.hasOwnProperty('object') === b.hasOwnProperty('object')) {
242
+ if (a.label < b.label) return -1;
243
+ if (a.label > b.label) return 1;
244
+ return 0;
245
+ } else if (a.hasOwnProperty('object')) return -1;else return 1;
246
+ });
247
+ rsc.properties && rsc.properties.forEach(function (p) {
248
+ if (p.object) {
249
+ recurseSort(p.object);
250
+ }
251
+ });
252
+ return rsc;
253
+ };
269
254
 
270
- case 'Blackboard':
271
- var recurseSort = function recurseSort(rsc) {
272
- rsc.properties && rsc.properties.sort(function (a, b) {
273
- if (a.hasOwnProperty('object') === b.hasOwnProperty('object')) {
274
- if (a.label < b.label) return -1;
275
- if (a.label > b.label) return 1;
276
- return 0;
277
- } else if (a.hasOwnProperty('object')) return -1;else return 1;
278
- });
279
- rsc.properties && rsc.properties.forEach(function (p) {
280
- if (p.object) {
281
- recurseSort(p.object);
282
- }
283
- });
255
+ if (res) {
256
+ var blackboardResources = [];
257
+ res.forEach(function (rsc) {
258
+ return blackboardResources.push(recurseSort(rsc));
259
+ });
260
+ blackboardResources.sort(function (a, b) {
261
+ if (a.type < b.type) return -1;
262
+ if (a.type > b.type) return 1;
263
+ return 0;
264
+ });
265
+ meta = [];
266
+ blackboardResources = blackboardResources.map(function (rsc) {
267
+ if (rsc && !rsc.parentRef) {
268
+ meta.push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
269
+ return null;
270
+ }
284
271
  return rsc;
285
- };
286
-
287
- if (res) {
288
- blackboardResources = [];
289
-
290
- res.forEach(function (rsc) {
291
- return blackboardResources.push(recurseSort(rsc));
292
- });
293
- blackboardResources.sort(function (a, b) {
294
- if (a.type < b.type) return -1;
295
- if (a.type > b.type) return 1;
296
- return 0;
297
- });
298
- meta = [];
299
- blackboardResources = blackboardResources.map(function (rsc) {
300
- if (rsc && !rsc.parentRef) {
301
- meta.push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
272
+ });
273
+ blackboardResources = blackboardResources.map(function (rsc) {
274
+ if (rsc && rsc.parentRef.length === 1) {
275
+ var parentString = rsc.parentRef[0].ref.split('/')[2];
276
+ var index = meta.findIndex(function (r) {
277
+ return r[0].type === parentString;
278
+ });
279
+ if (index > -1) {
280
+ meta[index].push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
302
281
  return null;
303
282
  }
304
- return rsc;
305
- });
306
- blackboardResources = blackboardResources.map(function (rsc) {
307
- if (rsc && rsc.parentRef.length === 1) {
308
- var _ret5 = function () {
309
- var parentString = rsc.parentRef[0].ref.split('/')[2];
310
- var index = meta.findIndex(function (r) {
311
- return r[0].type === parentString;
312
- });
313
- if (index > -1) {
314
- meta[index].push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
315
- return {
316
- v: null
317
- };
318
- }
319
- }();
320
-
321
- if ((typeof _ret5 === 'undefined' ? 'undefined' : _typeof(_ret5)) === "object") return _ret5.v;
283
+ }
284
+ return rsc;
285
+ });
286
+ blackboardResources = blackboardResources.map(function (rsc) {
287
+ if (rsc && rsc.parentRef.length === 2) {
288
+ var grandParentString = rsc.parentRef[1].ref.split('/')[2];
289
+ var grandParentIndex = meta.findIndex(function (r) {
290
+ return r[0].type === grandParentString;
291
+ });
292
+ if (grandParentIndex > -1) {
293
+ var parentString = rsc.parentRef[0].ref.split('/')[2];
294
+ var parentIndex = meta[grandParentIndex].findIndex(function (r) {
295
+ return r[0] && r[0].type === parentString;
296
+ });
297
+ if (parentIndex > -1) {
298
+ meta[grandParentIndex][parentIndex].push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
299
+ return null;
300
+ }
301
+ return rsc;
322
302
  }
323
- return rsc;
303
+ }
304
+ return rsc;
305
+ });
306
+ meta = flatten(meta);
307
+ }
308
+ break;
309
+
310
+ case 'Salesforce':
311
+ var resources = [];
312
+ res.forEach(function (rsc) {
313
+ if (!rsc.properties.find(function (p) {
314
+ return p.name === 'Lingk_External_Id__c';
315
+ })) {
316
+ rsc.properties.push({
317
+ label: 'Lingk External Id',
318
+ name: 'Lingk_External_Id__c',
319
+ readOnly: false,
320
+ required: false,
321
+ size: 150,
322
+ type: 'string',
323
+ updateable: true,
324
+ fake: true
324
325
  });
325
- blackboardResources = blackboardResources.map(function (rsc) {
326
- if (rsc && rsc.parentRef.length === 2) {
327
- var _ret6 = function () {
328
- var grandParentString = rsc.parentRef[1].ref.split('/')[2];
329
- var grandParentIndex = meta.findIndex(function (r) {
330
- return r[0].type === grandParentString;
331
- });
332
- if (grandParentIndex > -1) {
333
- var _ret7 = function () {
334
- var parentString = rsc.parentRef[0].ref.split('/')[2];
335
- var parentIndex = meta[grandParentIndex].findIndex(function (r) {
336
- return r[0] && r[0].type === parentString;
337
- });
338
- if (parentIndex > -1) {
339
- meta[grandParentIndex][parentIndex].push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
340
- return {
341
- v: {
342
- v: null
343
- }
344
- };
345
- }
346
- return {
347
- v: {
348
- v: rsc
349
- }
350
- };
351
- }();
326
+ }
352
327
 
353
- if ((typeof _ret7 === 'undefined' ? 'undefined' : _typeof(_ret7)) === "object") return _ret7.v;
354
- }
355
- }();
328
+ rsc.properties && rsc.properties.sort(function (a, b) {
329
+ if (a.required === b.required) {
330
+ if (a.label < b.label) return -1;
331
+ if (a.label > b.label) return 1;
332
+ return 0;
333
+ } else if (a.required) return -1;else return 1;
334
+ });
356
335
 
357
- if ((typeof _ret6 === 'undefined' ? 'undefined' : _typeof(_ret6)) === "object") return _ret6.v;
336
+ if (rsc.metadata && rsc.metadata.recordTypes && rsc.metadata.recordTypes.length > 0) {
337
+ rsc.metadata.recordTypes.forEach(function (recordType) {
338
+ if (recordType.isActive) {
339
+ var metadataResource = res.find(function (r) {
340
+ return r.type === recordType.sobjectType;
341
+ });
342
+ metadataResource && resources.push({
343
+ name: metadataResource.name + ' - ' + recordType.name,
344
+ type: metadataResource.type,
345
+ recordTypeId: recordType.id,
346
+ properties: metadataResource.properties,
347
+ endpointSuffix: metadataResource.endpointSuffix
348
+ });
358
349
  }
359
- return rsc;
360
350
  });
361
- meta = flatten(meta);
351
+ } else {
352
+ resources.push(rsc);
362
353
  }
363
- break;
364
-
365
- case 'Salesforce':
366
- resources = [];
354
+ });
355
+ meta = resources;
356
+ meta.sort(function (a, b) {
357
+ if (a.name < b.name) return -1;
358
+ if (a.name > b.name) return 1;
359
+ return 0;
360
+ });
361
+ break;
362
+
363
+ /*case 'SFTP':
364
+ if(res && res.resources){
365
+ var sftpRsc = []
366
+ res.resources.forEach(rsc=>{
367
+ rsc.properties && rsc.properties.sort((a, b)=>{
368
+ if(a.label < b.label) return -1;
369
+ if(a.label > b.label) return 1;
370
+ return 0;
371
+ })
372
+ sftpRsc.push(rsc)
373
+ })
374
+ meta = sftpRsc
375
+ meta.sort(function(a, b){
376
+ if(a.name < b.name) return -1;
377
+ if(a.name > b.name) return 1;
378
+ return 0;
379
+ })
380
+ }
381
+ break;*/
382
+
383
+ /*case 'Ethos':
384
+ if(res && res.resources){
385
+ var ethosRsc = []
386
+ res.resources.forEach(rsc=>{
387
+ rsc.properties && rsc.properties.sort((a, b)=>{
388
+ if(a.label < b.label) return -1;
389
+ if(a.label > b.label) return 1;
390
+ return 0;
391
+ })
392
+ ethosRsc.push(rsc)
393
+ })
394
+ meta = ethosRsc
395
+ meta.sort(function(a, b){
396
+ if(a.name < b.name) return -1;
397
+ if(a.name > b.name) return 1;
398
+ return 0;
399
+ })
400
+ }
401
+ break;*/
367
402
 
403
+ default:
404
+ if (res) {
405
+ var rscs = [];
368
406
  res.forEach(function (rsc) {
369
- if (!rsc.properties.find(function (p) {
370
- return p.name === 'Lingk_External_Id__c';
371
- })) {
372
- rsc.properties.push({
373
- label: 'Lingk External Id',
374
- name: 'Lingk_External_Id__c',
375
- readOnly: false,
376
- required: false,
377
- size: 150,
378
- type: 'string',
379
- updateable: true,
380
- fake: true
381
- });
382
- }
383
-
384
407
  rsc.properties && rsc.properties.sort(function (a, b) {
385
- if (a.required === b.required) {
386
- if (a.label < b.label) return -1;
387
- if (a.label > b.label) return 1;
388
- return 0;
389
- } else if (a.required) return -1;else return 1;
408
+ if (a.label < b.label) return -1;
409
+ if (a.label > b.label) return 1;
410
+ return 0;
390
411
  });
391
-
392
- if (rsc.metadata && rsc.metadata.recordTypes && rsc.metadata.recordTypes.length > 0) {
393
- rsc.metadata.recordTypes.forEach(function (recordType) {
394
- if (recordType.isActive) {
395
- var metadataResource = res.find(function (r) {
396
- return r.type === recordType.sobjectType;
397
- });
398
- metadataResource && resources.push({
399
- name: metadataResource.name + ' - ' + recordType.name,
400
- type: metadataResource.type,
401
- recordTypeId: recordType.id,
402
- properties: metadataResource.properties,
403
- endpointSuffix: metadataResource.endpointSuffix
404
- });
405
- }
406
- });
407
- } else {
408
- resources.push(rsc);
409
- }
412
+ rscs.push(rsc);
410
413
  });
411
- meta = resources;
414
+ meta = rscs;
412
415
  meta.sort(function (a, b) {
413
416
  if (a.name < b.name) return -1;
414
417
  if (a.name > b.name) return 1;
415
418
  return 0;
416
419
  });
417
- break;
418
-
419
- /*case 'SFTP':
420
- if(res && res.resources){
421
- var sftpRsc = []
422
- res.resources.forEach(rsc=>{
423
- rsc.properties && rsc.properties.sort((a, b)=>{
424
- if(a.label < b.label) return -1;
425
- if(a.label > b.label) return 1;
426
- return 0;
427
- })
428
- sftpRsc.push(rsc)
429
- })
430
- meta = sftpRsc
431
- meta.sort(function(a, b){
432
- if(a.name < b.name) return -1;
433
- if(a.name > b.name) return 1;
434
- return 0;
435
- })
436
- }
437
- break;*/
438
-
439
- /*case 'Ethos':
440
- if(res && res.resources){
441
- var ethosRsc = []
442
- res.resources.forEach(rsc=>{
443
- rsc.properties && rsc.properties.sort((a, b)=>{
444
- if(a.label < b.label) return -1;
445
- if(a.label > b.label) return 1;
446
- return 0;
447
- })
448
- ethosRsc.push(rsc)
449
- })
450
- meta = ethosRsc
451
- meta.sort(function(a, b){
452
- if(a.name < b.name) return -1;
453
- if(a.name > b.name) return 1;
454
- return 0;
455
- })
456
- }
457
- break;*/
458
-
459
- default:
460
- if (res) {
461
- rscs = [];
462
-
463
- res.forEach(function (rsc) {
464
- rsc.properties && rsc.properties.sort(function (a, b) {
465
- if (a.label < b.label) return -1;
466
- if (a.label > b.label) return 1;
467
- return 0;
468
- });
469
- rscs.push(rsc);
470
- });
471
- meta = rscs;
472
- meta.sort(function (a, b) {
473
- if (a.name < b.name) return -1;
474
- if (a.name > b.name) return 1;
475
- return 0;
476
- });
477
- }
478
- break;
479
- }
480
- })();
420
+ }
421
+ break;
422
+ }
481
423
 
482
424
  return meta.map(function (m) {
483
425
  return Object.assign({}, m, {