@digipair/skill-mongodb 0.32.7 → 0.33.1

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/index.cjs.js CHANGED
@@ -23581,14 +23581,14 @@ function indent(str, spaces) {
23581
23581
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23582
23582
  // match is required
23583
23583
  if (!match) {
23584
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23584
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23585
23585
  v: nextMatch1
23586
23586
  };
23587
23587
  }
23588
23588
  var token = match.token, offset = match.offset;
23589
23589
  i1 += offset;
23590
23590
  if (token === " ") {
23591
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23591
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23592
23592
  }
23593
23593
  tokens1 = _to_consumable_array$a(tokens1).concat([
23594
23594
  token
@@ -23607,7 +23607,7 @@ function indent(str, spaces) {
23607
23607
  if (contextKeys.some(function(el) {
23608
23608
  return el.startsWith(name);
23609
23609
  })) {
23610
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23610
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23611
23611
  }
23612
23612
  if (dateTimeIdentifiers.some(function(el) {
23613
23613
  return el === name;
@@ -23626,9 +23626,9 @@ function indent(str, spaces) {
23626
23626
  if (dateTimeIdentifiers.some(function(el) {
23627
23627
  return el.startsWith(name);
23628
23628
  })) {
23629
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23629
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23630
23630
  }
23631
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23631
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23632
23632
  v: nextMatch1
23633
23633
  };
23634
23634
  };
@@ -27418,7 +27418,8 @@ const globalInstance = typeof window === 'undefined' ? global : window;
27418
27418
  var _globalInstance___DIGIPAIR_CONFIG__;
27419
27419
  const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
27420
27420
  LIBRARIES: {},
27421
- BASE_URL: 'https://cdn.jsdelivr.net/npm'
27421
+ BASE_URL: 'https://cdn.jsdelivr.net/npm',
27422
+ ALIAS: []
27422
27423
  };
27423
27424
  const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
27424
27425
  const isPinsSettings = (value)=>{
@@ -27455,7 +27456,15 @@ const applyTemplate = (value, context)=>{
27455
27456
  };
27456
27457
  const executePins = async (settingsOrigin, context = {})=>{
27457
27458
  var _settings_conditions, _settings_conditions1;
27458
- const settings = await preparePinsSettings(settingsOrigin, context);
27459
+ let settings = await preparePinsSettings(settingsOrigin, context);
27460
+ const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
27461
+ if (alias) {
27462
+ settings = await preparePinsSettings(_extends$1({}, settings, alias), {
27463
+ settings: _extends$1({}, settings, {
27464
+ library: settings.library.substring(alias.name.length + 1)
27465
+ })
27466
+ });
27467
+ }
27459
27468
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27460
27469
  const results = [];
27461
27470
  for(let index = 0; index < settings.conditions.each.length; index++){
package/index.esm.js CHANGED
@@ -27368,7 +27368,8 @@ const globalInstance = typeof window === 'undefined' ? global : window;
27368
27368
  var _globalInstance___DIGIPAIR_CONFIG__;
27369
27369
  const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
27370
27370
  LIBRARIES: {},
27371
- BASE_URL: 'https://cdn.jsdelivr.net/npm'
27371
+ BASE_URL: 'https://cdn.jsdelivr.net/npm',
27372
+ ALIAS: []
27372
27373
  };
27373
27374
  const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
27374
27375
  const isPinsSettings = (value)=>{
@@ -27405,7 +27406,15 @@ const applyTemplate = (value, context)=>{
27405
27406
  };
27406
27407
  const executePins = async (settingsOrigin, context = {})=>{
27407
27408
  var _settings_conditions, _settings_conditions1;
27408
- const settings = await preparePinsSettings(settingsOrigin, context);
27409
+ let settings = await preparePinsSettings(settingsOrigin, context);
27410
+ const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
27411
+ if (alias) {
27412
+ settings = await preparePinsSettings(_extends$1({}, settings, alias), {
27413
+ settings: _extends$1({}, settings, {
27414
+ library: settings.library.substring(alias.name.length + 1)
27415
+ })
27416
+ });
27417
+ }
27409
27418
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27410
27419
  const results = [];
27411
27420
  for(let index = 0; index < settings.conditions.each.length; index++){
@@ -0,0 +1,9 @@
1
+ export interface Alias {
2
+ name: string;
3
+ library: string;
4
+ element: string;
5
+ properties: {
6
+ library: string;
7
+ element: string;
8
+ };
9
+ }
@@ -1,5 +1,5 @@
1
1
  import { PinsSettings } from './pins-settings.interface';
2
- type CONFIG_KEY = 'BASE_URL' | 'LIBRARIES';
2
+ type CONFIG_KEY = 'BASE_URL' | 'LIBRARIES' | 'ALIAS';
3
3
  export declare const config: {
4
4
  set: (key: CONFIG_KEY, value: any) => void;
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-mongodb",
3
- "version": "0.32.7",
3
+ "version": "0.33.1",
4
4
  "dependencies": {
5
5
  "mongodb": "^6.8.0"
6
6
  },
package/schema.en.json DELETED
@@ -1,349 +0,0 @@
1
- {
2
- "openapi": "3.0.0",
3
- "info": {
4
- "title": "@digipair/skill-mongodb",
5
- "summary": "Access to a MongoDB database",
6
- "description": "This skill allows you to manage a MongoDB database.",
7
- "version": "0.1.0",
8
- "x-icon": "💻"
9
- },
10
- "paths": {
11
- "/database": {
12
- "post": {
13
- "tags": ["service"],
14
- "summary": "Connect to a MongoDB database",
15
- "parameters": [
16
- {
17
- "name": "url",
18
- "summary": "Server address",
19
- "required": true,
20
- "description": "MongoDB server address",
21
- "schema": {
22
- "type": "string"
23
- }
24
- },
25
- {
26
- "name": "database",
27
- "summary": "Database",
28
- "required": true,
29
- "description": "Name of the database",
30
- "schema": {
31
- "type": "string"
32
- }
33
- }
34
- ],
35
- "x-events": []
36
- }
37
- },
38
- "/find": {
39
- "post": {
40
- "tags": ["service"],
41
- "summary": "Search in a MongoDB database",
42
- "parameters": [
43
- {
44
- "name": "client",
45
- "summary": "Database connection",
46
- "required": false,
47
- "description": "Database connection client",
48
- "schema": {
49
- "type": "array",
50
- "items": {
51
- "$ref": "https://schemas.digipair.ai/pinsSettings"
52
- }
53
- }
54
- },
55
- {
56
- "name": "options",
57
- "summary": "Options",
58
- "required": false,
59
- "description": "Search options",
60
- "schema": {
61
- "type": "object"
62
- }
63
- },
64
- {
65
- "name": "collection",
66
- "summary": "Collection",
67
- "required": true,
68
- "description": "Name of the collection",
69
- "schema": {
70
- "type": "string"
71
- }
72
- },
73
- {
74
- "name": "filter",
75
- "summary": "Filter",
76
- "required": true,
77
- "description": "Search filter",
78
- "schema": {
79
- "type": "object"
80
- }
81
- }
82
- ],
83
- "x-events": []
84
- }
85
- },
86
- "/findOne": {
87
- "post": {
88
- "tags": ["service"],
89
- "summary": "Search for an item in a MongoDB database",
90
- "parameters": [
91
- {
92
- "name": "client",
93
- "summary": "Database connection",
94
- "required": false,
95
- "description": "Database connection client",
96
- "schema": {
97
- "type": "array",
98
- "items": {
99
- "$ref": "https://schemas.digipair.ai/pinsSettings"
100
- }
101
- }
102
- },
103
- {
104
- "name": "options",
105
- "summary": "Options",
106
- "required": false,
107
- "description": "Search options",
108
- "schema": {
109
- "type": "object"
110
- }
111
- },
112
- {
113
- "name": "collection",
114
- "summary": "Collection",
115
- "required": true,
116
- "description": "Name of the collection",
117
- "schema": {
118
- "type": "string"
119
- }
120
- },
121
- {
122
- "name": "filter",
123
- "summary": "Filter",
124
- "required": true,
125
- "description": "Search filter",
126
- "schema": {
127
- "type": "object"
128
- }
129
- }
130
- ],
131
- "x-events": []
132
- }
133
- },
134
- "/findById": {
135
- "post": {
136
- "tags": ["service"],
137
- "summary": "Search for an item by ID in a MongoDB database",
138
- "parameters": [
139
- {
140
- "name": "client",
141
- "summary": "Database connection",
142
- "required": false,
143
- "description": "Database connection client",
144
- "schema": {
145
- "type": "array",
146
- "items": {
147
- "$ref": "https://schemas.digipair.ai/pinsSettings"
148
- }
149
- }
150
- },
151
- {
152
- "name": "options",
153
- "summary": "Options",
154
- "required": false,
155
- "description": "Search options",
156
- "schema": {
157
- "type": "object"
158
- }
159
- },
160
- {
161
- "name": "collection",
162
- "summary": "Collection",
163
- "required": true,
164
- "description": "Name of the collection",
165
- "schema": {
166
- "type": "string"
167
- }
168
- },
169
- {
170
- "name": "id",
171
- "summary": "Identifier",
172
- "required": true,
173
- "description": "Identifier of the item",
174
- "schema": {
175
- "type": "object"
176
- }
177
- }
178
- ],
179
- "x-events": []
180
- }
181
- },
182
- "/insertOne": {
183
- "post": {
184
- "tags": ["service"],
185
- "summary": "Insert an item into a MongoDB database",
186
- "parameters": [
187
- {
188
- "name": "client",
189
- "summary": "Database connection",
190
- "required": false,
191
- "description": "Database connection client",
192
- "schema": {
193
- "type": "array",
194
- "items": {
195
- "$ref": "https://schemas.digipair.ai/pinsSettings"
196
- }
197
- }
198
- },
199
- {
200
- "name": "options",
201
- "summary": "Options",
202
- "required": false,
203
- "description": "Insert options",
204
- "schema": {
205
- "type": "object"
206
- }
207
- },
208
- {
209
- "name": "collection",
210
- "summary": "Collection",
211
- "required": true,
212
- "description": "Name of the collection",
213
- "schema": {
214
- "type": "string"
215
- }
216
- },
217
- {
218
- "name": "document",
219
- "summary": "Document",
220
- "required": true,
221
- "description": "Document to insert",
222
- "schema": {
223
- "type": "object"
224
- }
225
- }
226
- ],
227
- "x-events": []
228
- }
229
- },
230
- "/updateOne": {
231
- "post": {
232
- "tags": ["service"],
233
- "summary": "Update an item in a MongoDB database",
234
- "parameters": [
235
- {
236
- "name": "client",
237
- "summary": "Database connection",
238
- "required": false,
239
- "description": "Database connection client",
240
- "schema": {
241
- "type": "array",
242
- "items": {
243
- "$ref": "https://schemas.digipair.ai/pinsSettings"
244
- }
245
- }
246
- },
247
- {
248
- "name": "options",
249
- "summary": "Options",
250
- "required": false,
251
- "description": "Update options",
252
- "schema": {
253
- "type": "object"
254
- }
255
- },
256
- {
257
- "name": "collection",
258
- "summary": "Collection",
259
- "required": true,
260
- "description": "Name of the collection",
261
- "schema": {
262
- "type": "string"
263
- }
264
- },
265
- {
266
- "name": "filter",
267
- "summary": "Filter",
268
- "required": true,
269
- "description": "Search filter",
270
- "schema": {
271
- "type": "object"
272
- }
273
- },
274
- {
275
- "name": "update",
276
- "summary": "Update filter",
277
- "required": true,
278
- "description": "Update filter",
279
- "schema": {
280
- "type": "object"
281
- }
282
- }
283
- ],
284
- "x-events": []
285
- }
286
- },
287
- "/updateById": {
288
- "post": {
289
- "tags": ["service"],
290
- "summary": "Update an item by ID in a MongoDB database",
291
- "parameters": [
292
- {
293
- "name": "client",
294
- "summary": "Database connection",
295
- "required": false,
296
- "description": "Database connection client",
297
- "schema": {
298
- "type": "array",
299
- "items": {
300
- "$ref": "https://schemas.digipair.ai/pinsSettings"
301
- }
302
- }
303
- },
304
- {
305
- "name": "options",
306
- "summary": "Options",
307
- "required": false,
308
- "description": "Update options",
309
- "schema": {
310
- "type": "object"
311
- }
312
- },
313
- {
314
- "name": "id",
315
- "summary": "Identifier",
316
- "required": true,
317
- "description": "Identifier of the item",
318
- "schema": {
319
- "type": "string"
320
- }
321
- },
322
- {
323
- "name": "collection",
324
- "summary": "Collection",
325
- "required": true,
326
- "description": "Name of the collection",
327
- "schema": {
328
- "type": "string"
329
- }
330
- },
331
- {
332
- "name": "update",
333
- "summary": "Update filter",
334
- "required": true,
335
- "description": "Update filter",
336
- "schema": {
337
- "type": "object"
338
- }
339
- }
340
- ],
341
- "x-events": []
342
- }
343
- }
344
- },
345
- "components": {
346
- "schemas": {}
347
- },
348
- "x-scene-blocks": {}
349
- }