presidium 3.3.0 → 3.3.2

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/DynamoDBStream.js CHANGED
@@ -467,15 +467,18 @@ class DynamoDBStream {
467
467
  let exists = false
468
468
  while (!exists) {
469
469
  await sleep(100)
470
- const streamData = await this.describe().catch(error => {
470
+
471
+ try {
472
+ const streamData = await this.describe()
473
+ if (streamData.TableStatus == 'ACTIVE') {
474
+ exists = true
475
+ }
476
+ } catch (error) {
471
477
  if (error.message == `DynamoDB Stream for ${this.table} not found.`) {
472
- // return
478
+ // continue
473
479
  } else {
474
480
  throw error
475
481
  }
476
- })
477
- if (streamData.TableStatus == 'ACTIVE') {
478
- exists = true
479
482
  }
480
483
  }
481
484
  }
@@ -34,7 +34,7 @@ async function sendRequestJSON(payload) {
34
34
  const data = await promise
35
35
  this.websocket.removeListener('message', handler)
36
36
 
37
- return data.result
37
+ return data
38
38
  }
39
39
 
40
40
  /**
@@ -66,7 +66,7 @@ async function _Method(method, { sessionId, ...params }) {
66
66
  throw error
67
67
  }
68
68
 
69
- return data
69
+ return data.result
70
70
  }
71
71
 
72
72
  class GoogleChromeDevToolsTarget {
@@ -178,38 +178,6 @@ class GoogleChromeDevToolsPage {
178
178
  }
179
179
  }
180
180
 
181
- /**
182
- * @name Event: DOM.attributeModified
183
- */
184
-
185
- /**
186
- * @name Event: DOM.attributeRemoved
187
- */
188
-
189
- /**
190
- * @name Event: DOM.characterDataModified
191
- */
192
-
193
- /**
194
- * @name Event: DOM.childNodeCountUpdated
195
- */
196
-
197
- /**
198
- * @name Event: DOM.childNodeInserted
199
- */
200
-
201
- /**
202
- * @name Event: DOM.childNodeRemoved
203
- */
204
-
205
- /**
206
- * @name Event: DOM.documentUpdated
207
- */
208
-
209
- /**
210
- * @name Event: DOM.setChildNodes
211
- */
212
-
213
181
  class GoogleChromeDevToolsDOM {
214
182
  constructor(websocket) {
215
183
  this.websocket = websocket
@@ -497,8 +465,179 @@ class GoogleChromeDevToolsDOM {
497
465
  return _Method.call(this, 'DOM.focus', options)
498
466
  }
499
467
 
468
+ /**
469
+ * @name Event: DOM.attributeModified
470
+ *
471
+ * @docs
472
+ * ```coffeescript [specscript]
473
+ * emit('DOM.attributeModified', data {
474
+ * nodeId: string,
475
+ * name: string,
476
+ * value: string,
477
+ * })
478
+ * ```
479
+ *
480
+ * The `DOM.attributeModified` event. Emitted when an attribute of an element is modified.
481
+ *
482
+ * Event Data:
483
+ * `data`
484
+ * * `nodeId` - the ID of the element or node.
485
+ * * `name` - the name of the modified attribute.
486
+ * * `value` - the value of the modified attribute.
487
+ *
488
+ * ```javascript
489
+ * googleChromeDevTools.on('DOM.attributeModified', data => {
490
+ * console.log('attribute modified:', data)
491
+ * })
492
+ * ```
493
+ */
494
+
495
+ /**
496
+ * @name Event: DOM.attributeRemoved
497
+ *
498
+ * @docs
499
+ * ```coffeescript [specscript]
500
+ * emit('DOM.attributeRemoved', data {
501
+ * nodeId: string,
502
+ * name: string,
503
+ * })
504
+ * ```
505
+ *
506
+ * The `DOM.attributeRemoved` event. Emitted when an attribute of an element is removed.
507
+ *
508
+ * Event Data:
509
+ * * `data`
510
+ * * `nodeId` - the ID of the element or node.
511
+ * * `name` - the name of the removed attribute.
512
+ *
513
+ * ```javascript
514
+ * googleChromeDevTools.on('DOM.attributeModified', data => {
515
+ * console.log('attribute removed:', data)
516
+ * })
517
+ * ```
518
+ */
519
+
520
+ /**
521
+ * @name Event: DOM.characterDataModified
522
+ *
523
+ * @docs
524
+ * ```coffeescript [specscript]
525
+ * emit('DOM.characterDataModified', data {
526
+ * nodeId: string,
527
+ * childNodeCount: number,
528
+ * })
529
+ * ```
530
+ *
531
+ * The `DOM.characterDataModified` event. Emitted when a text node is modified.
532
+ *
533
+ * Event Data:
534
+ * * `data`
535
+ * * `nodeId` - the ID of the element or node.
536
+ * * `characterData` - the new text value.
537
+ *
538
+ * ```javascript
539
+ * googleChromeDevTools.on('DOM.characterDataModified', data => {
540
+ * console.log('text modified:', data)
541
+ * })
542
+ * ```
543
+ */
544
+
545
+ /**
546
+ * @name Event: DOM.childNodeCountUpdated
547
+ *
548
+ * @docs
549
+ * ```coffeescript [specscript]
550
+ * emit('DOM.childNodeCountUpdated', data {
551
+ * nodeId: string,
552
+ * childNodeCount: number,
553
+ * })
554
+ * ```
555
+ *
556
+ * The `DOM.childNodeCountUpdated` event. Emitted when the child node count of a node is updated.
557
+ *
558
+ * Event Data:
559
+ * * `data`
560
+ * * `nodeId` - the ID of the element or node.
561
+ * * `childNodeCount` - the updated count of child nodes.
562
+ *
563
+ * ```javascript
564
+ * googleChromeDevTools.on('DOM.childNodeCountUpdated', data => {
565
+ * console.log('child node count updated:', data)
566
+ * })
567
+ * ```
568
+ */
569
+
570
+ /**
571
+ * @name Event: DOM.childNodeInserted
572
+ *
573
+ * @docs
574
+ * ```javascript
575
+ * module CDPDOM 'https://chromedevtools.github.io/devtools-protocol/tot/DOM/'
576
+ *
577
+ * emit('DOM.childNodeInserted', data {
578
+ * parentNodeId: string,
579
+ * previousNodeId: string,
580
+ * node: CDPDOM.Node,
581
+ * })
582
+ * ```
583
+ *
584
+ * The `DOM.childNodeInserted` event. Emitted when a node is inserted into the DOM as a child of another node.
585
+ *
586
+ * Event Data:
587
+ * * `data`
588
+ * * `parentNodeId` - the id of the parent node.
589
+ * * `previousNodeId` - the id of the node immediately preceding the inserted node.
590
+ * * `node` - [`CDPDOM.Node`](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#type-Node) - data about the inserted node.
591
+ */
592
+
593
+ /**
594
+ * @name Event: DOM.childNodeRemoved
595
+ *
596
+ * @docs
597
+ * ```javascript
598
+ * emit('DOM.childNodeRemoved', data {
599
+ * parentNodeId: string,
600
+ * nodeId: string,
601
+ * })
602
+ * ```
603
+ *
604
+ * The `DOM.childNodeRemoved` event. Emitted when a node is removed from the DOM as a child of another node.
605
+ *
606
+ * Event Data:
607
+ * * `data`
608
+ * * `parentNodeId` - the id of the parent node.
609
+ * * `nodeId` - the id of the removed node.
610
+ *
611
+ * ```javascript
612
+ * googleChromeDevTools.on('DOM.childNodeRemoved', data => {
613
+ * console.log('child node removed:', data.nodeId)
614
+ * })
615
+ * ```
616
+ */
617
+
618
+ /**
619
+ * @name Event: DOM.documentUpdated
620
+ *
621
+ * @docs
622
+ * ```coffeescript [specscript]
623
+ * emit('DOM.documentUpdated')
624
+ * ```
625
+ *
626
+ * The `DOM.documentUpdated` event. Emitted when the `Document` object has been totally updated and node IDs are no longer valid.
627
+ *
628
+ * Event Data:
629
+ * * (none)
630
+ *
631
+ * ```javascript
632
+ * googleChromeDevTools.on('DOM.documentUpdated', () => {
633
+ * console.log('Document updated')
634
+ * })
635
+ * ```
636
+ */
637
+
500
638
  }
501
639
 
640
+
502
641
  class GoogleChromeDevToolsInput {
503
642
  constructor(websocket) {
504
643
  this.websocket = websocket
@@ -131,6 +131,11 @@ async function getChromeFilepath() {
131
131
  const parentDir = `${filepath.split('/').slice(0, -1).join('/')}`
132
132
 
133
133
  try {
134
+ const dirents = await fs.promises.readdir(parentDir)
135
+ if (dirents.length <= 1) {
136
+ await installChrome.call(this)
137
+ }
138
+
134
139
  for await (const filepath of walk(parentDir)) {
135
140
  if (platform.startsWith('mac') && filepath.endsWith('Google Chrome for Testing')) {
136
141
  return filepath
package/LICENSE CHANGED
@@ -1,21 +1,9 @@
1
- The MIT License (MIT)
1
+ The CLOUT Free and Open Source Software License (CFOSS)
2
2
 
3
- Copyright (c) 2026 Richard Tong
3
+ © Richard Yufei Tong, King of Software
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11
6
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
7
+ 1. This permission notice is included in all copies or substantial portions of the Software.
14
8
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
9
+ THE SOFTWARE IS PROVIDED AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE, OR IN THE USE OF OR OTHER DEALINGS OF THE SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presidium",
3
- "version": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "description": "A library for creating web services",
5
5
  "author": "Richard Tong",
6
6
  "license": "MIT",