presidium 4.5.0 → 4.5.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.
Files changed (2) hide show
  1. package/README.md +201 -111
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -37,113 +37,113 @@ npm i presidium
37
37
  require Presidium in [CommonJS](https://nodejs.org/docs/latest/api/modules.html#modules-commonjs-modules):
38
38
  ```javascript
39
39
  // import Presidium globally
40
- require('presidium/global')
40
+ require("presidium/global")
41
41
 
42
42
  // import Presidium
43
- const presidium = require('presidium')
43
+ const presidium = require("presidium")
44
44
 
45
45
  // import Presidium clients
46
- const DynamoDBTable = require('presidium/DynamoDBTable')
47
- const S3Bucket = require('presidium/S3Bucket')
48
- const WebSocket = require('presidium/WebSocket')
49
- const Readable = require('presidium/Readable')
46
+ const DynamoDBTable = require("presidium/DynamoDBTable")
47
+ const S3Bucket = require("presidium/S3Bucket")
48
+ const WebSocket = require("presidium/WebSocket")
49
+ const Readable = require("presidium/Readable")
50
50
  ```
51
51
 
52
52
  ## [Handle HTTP](https://presidium.services/docs/HTTP)
53
53
  ```javascript
54
- const HTTP = require('presidium/HTTP')
54
+ const HTTP = require("presidium/HTTP")
55
55
 
56
56
  const server = HTTP.Server((request, response) => {
57
- response.writeHead(200, { 'Content-Type': 'application/json' })
58
- response.write(JSON.stringify({ greeting: 'Hello World' }))
57
+ response.writeHead(200, { "Content-Type": "application/json" })
58
+ response.write(JSON.stringify({ greeting: "Hello World" }))
59
59
  response.end()
60
60
  })
61
61
 
62
62
  server.listen(3000)
63
63
 
64
- const http = new HTTP('http://localhost:3000/')
64
+ const http = new HTTP("http://localhost:3000/")
65
65
 
66
- http.get('/')
66
+ http.get("/")
67
67
  .then(response => response.json())
68
- .then(console.log) // { greeting: 'Hello World' }
68
+ .then(console.log) // { greeting: "Hello World" }
69
69
  ```
70
70
 
71
71
  ## [Send messages with WebSocket](https://presidium.services/docs/WebSocket)
72
72
  ```javascript
73
- const WebSocket = require('presidium/WebSocket')
73
+ const WebSocket = require("presidium/WebSocket")
74
74
 
75
75
  const server = new WebSocket.Server(websocket => {
76
- websocket.on('message', message => {
77
- console.log('Message from client:', message)
78
- websocket.send('Hello Client!')
76
+ websocket.on("message", message => {
77
+ console.log("Message from client:", message)
78
+ websocket.send("Hello Client!")
79
79
  })
80
- websocket.on('close', () => {
81
- console.log('websocket closed')
80
+ websocket.on("close", () => {
81
+ console.log("websocket closed")
82
82
  })
83
83
  })
84
84
  server.listen(1337)
85
85
 
86
- const websocket = new WebSocket('ws://localhost:1337/')
87
- websocket.on('open', () => {
88
- websocket.send('Hello Server!')
86
+ const websocket = new WebSocket("ws://localhost:1337/")
87
+ websocket.on("open", () => {
88
+ websocket.send("Hello Server!")
89
89
  })
90
- websocket.on('message', message => {
91
- console.log('Message from server:', message)
90
+ websocket.on("message", message => {
91
+ console.log("Message from server:", message)
92
92
  })
93
93
  ```
94
94
 
95
95
  ## [Create, read, update, delete, and query with AWS DynamoDB](https://presidium.services/docs/DynamoDBTable)
96
96
  ```javascript
97
- const DynamoDBTable = require('presidium/DynamoDBTable')
98
- const DynamoDBGlobalSecondaryIndex = require('presidium/DynamoDBGlobalSecondaryIndex')
99
- const AwsCredentials = require('presidium/AwsCredentials')
97
+ const DynamoDBTable = require("presidium/DynamoDBTable")
98
+ const DynamoDBGlobalSecondaryIndex = require("presidium/DynamoDBGlobalSecondaryIndex")
99
+ const AwsCredentials = require("presidium/AwsCredentials")
100
100
 
101
- const awsCreds = await AwsCredentials('default')
102
- awsCreds.region = 'us-east-1'
101
+ const awsCreds = await AwsCredentials("default")
102
+ awsCreds.region = "us-east-1"
103
103
 
104
104
  const myTable = new DynamoDBTable({
105
- name: 'my-table',
106
- key: [{ id: 'string' }],
105
+ name: "my-table",
106
+ key: [{ id: "string" }],
107
107
  ...awsCreds,
108
108
  })
109
109
  await myTable.ready
110
110
 
111
111
  const myTypeAgeIndex = new DynamoDBGlobalSecondaryIndex({
112
- table: 'my-table',
113
- key: [{ type: 'string' }, { age: 'number' }],
112
+ table: "my-table",
113
+ key: [{ type: "string" }, { age: "number" }],
114
114
  ...awsCreds,
115
115
  })
116
116
  await myTypeAgeIndex.ready
117
117
 
118
- await myTable.putItem({ id: { S: '1' }, name: { S: 'John' }, type: { S: 'person' } })
119
- await myTable.updateItem({ id: { S: '1' } }, { age: { N: '32' } })
118
+ await myTable.putItem({ id: { S: "1" }, name: { S: "John" }, type: { S: "person" } })
119
+ await myTable.updateItem({ id: { S: "1" } }, { age: { N: "32" } })
120
120
 
121
- await myTable.putItemJSON({ id: '2', name: 'Joe', age: 19, type: 'person' })
122
- await myTable.putItemJSON({ id: '3', name: 'Jane', age: 33, type: 'person' })
121
+ await myTable.putItemJSON({ id: "2", name: "Joe", age: 19, type: "person" })
122
+ await myTable.putItemJSON({ id: "3", name: "Jane", age: 33, type: "person" })
123
123
 
124
124
  {
125
- const data = await myTable.getItem({ id: { S: '1' } }),
125
+ const data = await myTable.getItem({ id: { S: "1" } }),
126
126
  console.log(data)
127
- // { Item: { id: { S: '1' }, name: { S: 'John' }, age: { N: '32' } } }
127
+ // { Item: { id: { S: "1" }, name: { S: "John" }, age: { N: "32" } } }
128
128
  }
129
129
 
130
130
  {
131
- const data = await myTable.getItemJSON({ id: '1' })
131
+ const data = await myTable.getItemJSON({ id: "1" })
132
132
  console.log(data)
133
- // { item: { id: '1', name: 'John', age: 32 } }
133
+ // { item: { id: "1", name: "John", age: 32 } }
134
134
  }
135
135
 
136
136
  {
137
137
  const data = await myTypeAgeIndex.query(
138
- 'type = :type AND age < :age',
139
- { type: { S: 'person' }, age: { N: '100' } },
138
+ "type = :type AND age < :age",
139
+ { type: { S: "person" }, age: { N: "100" } },
140
140
  { Limit: 2, ScanIndexForward: true },
141
141
  )
142
142
  console.log(data)
143
143
  // {
144
144
  // Items: [
145
- // { id: { S: '1' }, name: { S: 'John' }, age: { N: '32' }, type: { S: 'person' } },
146
- // { id: { S: '2' }, name: { S: 'Joe' }, age: { N: '19' }, type: { S: 'person' } },
145
+ // { id: { S: "1" }, name: { S: "John" }, age: { N: "32" }, type: { S: "person" } },
146
+ // { id: { S: "2" }, name: { S: "Joe" }, age: { N: "19" }, type: { S: "person" } },
147
147
  // ],
148
148
  // Count: 2,
149
149
  // ScannedCount: 2,
@@ -152,15 +152,15 @@ await myTable.putItemJSON({ id: '3', name: 'Jane', age: 33, type: 'person' })
152
152
 
153
153
  {
154
154
  const data = await myTypeAgeIndex.queryJSON(
155
- 'type = :type AND age < :age',
156
- { type: 'person', age: 100 },
155
+ "type = :type AND age < :age",
156
+ { type: "person", age: 100 },
157
157
  { Limit: 2, ScanIndexForward: true },
158
158
  )
159
159
  console.log(data)
160
160
  // {
161
161
  // ItemsJSON: [
162
- // { id: '1', name: 'John', age: 32, type: 'person' },
163
- // { id: '2', name: 'Joe', age: 19, type: 'person' },
162
+ // { id: "1", name: "John", age: 32, type: "person" },
163
+ // { id: "2", name: "Joe", age: 19, type: "person" },
164
164
  // ],
165
165
  // Count: 2,
166
166
  // ScannedCount: 2,
@@ -169,51 +169,51 @@ await myTable.putItemJSON({ id: '3', name: 'Jane', age: 33, type: 'person' })
169
169
 
170
170
  {
171
171
  const ItemIterator = myTypeAgeIndex.queryItemsIterator(
172
- 'type = :type AND age < :age',
173
- { type: { S: 'person' }, age: { N: '100' } },
172
+ "type = :type AND age < :age",
173
+ { type: { S: "person" }, age: { N: "100" } },
174
174
  { ScanIndexForward: true },
175
175
  )
176
176
  for await (const Item of ItemIterator) {
177
177
  console.log(Item)
178
- // { id: { S: '2' }, name: { S: 'Joe' }, age: { N: '19' }, type: { S: 'person' } },
179
- // { id: { S: '1' }, name: { S: 'John' }, age: { N: '32' }, type: { S: 'person' } },
180
- // { id: { S: '3' }, name: { S: 'Jane' }, age: { N: '33' }, type: { S: 'person' } },
178
+ // { id: { S: "2" }, name: { S: "Joe" }, age: { N: "19" }, type: { S: "person" } },
179
+ // { id: { S: "1" }, name: { S: "John" }, age: { N: "32" }, type: { S: "person" } },
180
+ // { id: { S: "3" }, name: { S: "Jane" }, age: { N: "33" }, type: { S: "person" } },
181
181
  }
182
182
  }
183
183
 
184
184
  {
185
185
  const itemsIterator = myTypeAgeIndex.queryItemsIteratorJSON(
186
- 'type = :type AND age < :age',
187
- { type: 'person', age: 100 },
186
+ "type = :type AND age < :age",
187
+ { type: "person", age: 100 },
188
188
  { ScanIndexForward: true },
189
189
  )
190
190
  for await (const item of itemsIterator) {
191
191
  console.log(item)
192
- // { id: '2', name: 'Joe', age: 19, type: 'person' }
193
- // { id: '1', name: 'John', age: 32, type: 'person' }
194
- // { id: '3', name: 'Jane', age: 33, type: 'person' }
192
+ // { id: "2", name: "Joe", age: 19, type: "person" }
193
+ // { id: "1", name: "John", age: 32, type: "person" }
194
+ // { id: "3", name: "Jane", age: 33, type: "person" }
195
195
  }
196
196
  }
197
197
  ```
198
198
 
199
199
  ## [Consume AWS DynamoDB Streams](https://presidium.services/docs/DynamoDBStream)
200
200
  ```javascript
201
- const DynamoDBTable = require('presidium/DynamoDBTable')
202
- const DynamoDBStream = require('presidium/DynamoDBStream')
203
- const AwsCredentials = require('presidium/AwsCredentials')
201
+ const DynamoDBTable = require("presidium/DynamoDBTable")
202
+ const DynamoDBStream = require("presidium/DynamoDBStream")
203
+ const AwsCredentials = require("presidium/AwsCredentials")
204
204
 
205
- const awsCreds = await AwsCredentials('default')
206
- awsCreds.region = 'us-east-1'
205
+ const awsCreds = await AwsCredentials("default")
206
+ awsCreds.region = "us-east-1"
207
207
 
208
208
  const myTable = new DynamoDBTable({
209
- name: 'my-table',
210
- key: [{ id: 'string' }],
209
+ name: "my-table",
210
+ key: [{ id: "string" }],
211
211
  ...awsCreds,
212
212
  })
213
213
  await myTable.ready
214
214
 
215
215
  const myStream = new DynamoDBStream({
216
- table: 'my-table',
216
+ table: "my-table",
217
217
  ...awsCreds,
218
218
  })
219
219
  await myStream.ready
@@ -226,7 +226,7 @@ for await (const record of myStream) {
226
226
  }
227
227
 
228
228
  const myStreamJSON = new DynamoDBStream({
229
- table: 'my-table',
229
+ table: "my-table",
230
230
  ...awsCreds,
231
231
  JSON: true,
232
232
  })
@@ -242,25 +242,25 @@ for await (const record of myStreamJSON) {
242
242
 
243
243
  ## [Download and upload with AWS S3](https://presidium.services/docs/S3Bucket)
244
244
  ```javascript
245
- const S3Bucket = require('presidium/S3Bucket')
246
- const AwsCredentials = require('presidium/AwsCredentials')
245
+ const S3Bucket = require("presidium/S3Bucket")
246
+ const AwsCredentials = require("presidium/AwsCredentials")
247
247
 
248
- const awsCreds = await AwsCredentials('default')
249
- awsCreds.region = 'us-east-1'
248
+ const awsCreds = await AwsCredentials("default")
249
+ awsCreds.region = "us-east-1"
250
250
 
251
251
  const myBucket = new S3Bucket({
252
- name: 'my-bucket',
252
+ name: "my-bucket",
253
253
  ...awsCreds,
254
254
  })
255
255
  await myBucket.ready
256
256
 
257
- await myBucket.putObject('some-key', '{"hello":"world"}', {
258
- ContentType: 'application/json',
257
+ await myBucket.putObject("some-key", "{"hello":"world"}", {
258
+ ContentType: "application/json",
259
259
  })
260
260
 
261
- const data = await myBucket.getObject('some-key')
261
+ const data = await myBucket.getObject("some-key")
262
262
  console.log(data)
263
- // { Etag: '...', Body: <Buffer 7b 22 68 ...>, ContentType: 'application/json' }
263
+ // { Etag: "...", Body: <Buffer 7b 22 68 ...>, ContentType: "application/json" }
264
264
 
265
265
  await myBucket.deleteAllObjects()
266
266
  await myBucket.delete()
@@ -268,19 +268,19 @@ await myBucket.delete()
268
268
 
269
269
  ## [Build and push Docker images](https://presidium.services/docs/Docker)
270
270
  ```javascript
271
- const Docker = require('presidium/Docker')
272
- const NpmToken = require('presidium/NpmToken')
273
- const fs = require('fs')
271
+ const Docker = require("presidium/Docker")
272
+ const NpmToken = require("presidium/NpmToken")
273
+ const fs = require("fs")
274
274
 
275
- const myImage = 'my-app:1.0.0'
275
+ const myImage = "my-app:1.0.0"
276
276
 
277
- const npmrc = fs.createWriteStream('.npmrc')
277
+ const npmrc = fs.createWriteStream(".npmrc")
278
278
  npmrc.write(`//registry.npmjs.org/:_authToken=${await NpmToken()}`)
279
279
  npmrc.end()
280
280
 
281
281
  const buildStream = await docker.buildImage(__dirname, {
282
282
  image: myImage,
283
- ignore: ['.github', 'node_modules'],
283
+ ignore: [".github", "node_modules"],
284
284
  archive: {
285
285
  Dockerfile: `
286
286
  FROM node:15-alpine
@@ -297,10 +297,10 @@ CMD ["npm", "start"]
297
297
 
298
298
  buildStream.pipe(process.stdout)
299
299
 
300
- buildStream.on('end', () => {
300
+ buildStream.on("end", () => {
301
301
  const pushStream = await docker.pushImage({
302
302
  image: myImage,
303
- repository: 'my-registry.io',
303
+ repository: "my-registry.io",
304
304
  })
305
305
  pushStream.pipe(process.stdout)
306
306
  })
@@ -309,14 +309,14 @@ buildStream.on('end', () => {
309
309
 
310
310
  ## [Run Docker containers](https://presidium.services/docs/Docker)
311
311
  ```javascript
312
- const Docker = require('presidium/Docker')
312
+ const Docker = require("presidium/Docker")
313
313
 
314
314
  const docker = new Docker()
315
315
 
316
316
  const runStream = await docker.runContainer({
317
- image: 'node:15-alpine',
318
- env: { FOO: 'Example' },
319
- cmd: ['node', '-e', 'console.log(process.env.FOO)'],
317
+ image: "node:15-alpine",
318
+ env: { FOO: "Example" },
319
+ cmd: ["node", "-e", "console.log(process.env.FOO)"],
320
320
  rm: true,
321
321
  })
322
322
 
@@ -325,18 +325,18 @@ runStream.pipe(process.stdout) // Example
325
325
 
326
326
  ## [Deploy Docker Swarm services](https://presidium.services/docs/Docker)
327
327
  ```javascript
328
- const Docker = require('presidium/Docker')
328
+ const Docker = require("presidium/Docker")
329
329
 
330
330
  const docker = new Docker()
331
331
 
332
332
  // initialize docker swarm
333
- await docker.initSwarm('eth0:2377')
333
+ await docker.initSwarm("eth0:2377")
334
334
 
335
335
  await docker.createService({
336
- name: 'my-service',
337
- image: 'nginx:1.19',
336
+ name: "my-service",
337
+ image: "nginx:1.19",
338
338
  publish: { 80: 80 },
339
- healthCheck: ['curl', '[::1]'],
339
+ healthCheck: ["curl", "[::1]"],
340
340
  replicas: 5,
341
341
  })
342
342
  // new nginx service is deploying to the docker swarm
@@ -344,8 +344,8 @@ await docker.createService({
344
344
 
345
345
  ## [Automate tests with Google Chrome for Testing](https://presidium.services/docs/GoogleChromeDevTools)
346
346
  ```javascript
347
- const GoogleChromeForTesting = require('presidium/GoogleChromeForTesting')
348
- const GoogleChromeDevTools = require('presidium/GoogleChromeDevTools')
347
+ const GoogleChromeForTesting = require("presidium/GoogleChromeForTesting")
348
+ const GoogleChromeDevTools = require("presidium/GoogleChromeDevTools")
349
349
 
350
350
  const googleChromeForTesting = new GoogleChromeForTesting()
351
351
  await googleChromeForTesting.init() // downloads Google Chrome for Testing
@@ -355,7 +355,7 @@ await googleChromeDevTools.init() // connects to the DevTools server
355
355
 
356
356
  // get targets
357
357
  const targetsData = await googleChromeDevTools.Target.getTargets()
358
- const pageTarget = targetsData.result.targetInfos.find(info => info.type == 'page')
358
+ const pageTarget = targetsData.result.targetInfos.find(info => info.type == "page")
359
359
 
360
360
  // attach to target
361
361
  const attachToTargetData = await googleChromeDevTools.Target.attachToTarget({
@@ -371,39 +371,39 @@ const data = await googleChromeDevTools.Page.navigate({
371
371
  })
372
372
  ```
373
373
 
374
- ## [Store data on disk as a hash table](https://presidium.services/docs/DiskHashTable)
374
+ ## [Store data on disk in a hash table](https://presidium.services/docs/DiskHashTable)
375
375
  ```javascript
376
- const DiskHashTable = require('presidium-db/DiskHashTable')
376
+ const DiskHashTable = require("presidium/DiskHashTable")
377
377
 
378
378
  const ht = new DiskHashTable({
379
- storageFilepath: '/path/to/ht-storage-file',
380
- headerFilepath: '/path/to/ht-header-file',
379
+ storageFilepath: "/path/to/ht-storage-file",
380
+ headerFilepath: "/path/to/ht-header-file",
381
381
  initialLength: 1024,
382
382
  })
383
383
  await ht.init()
384
384
 
385
- await ht.set('my-key', 'my-value')
385
+ await ht.set("my-key", "my-value")
386
386
 
387
- const myValue = await ht.get('my-key')
388
- console.log(myValue) // 'my-value'
387
+ const myValue = await ht.get("my-key")
388
+ console.log(myValue) // my-value
389
389
 
390
- await ht.delete('my-key')
390
+ await ht.delete("my-key")
391
391
  ```
392
392
 
393
- ## [Store data on disk as a sorted hash table](https://presidium.services/docs/DiskSortedHashTable)
393
+ ## [Store data on disk in a sorted hash table](https://presidium.services/docs/DiskSortedHashTable)
394
394
  ```javascript
395
- const DiskSortedHashTable = require('presidium-db/DiskSortedHashTable')
395
+ const DiskSortedHashTable = require("presidium/DiskSortedHashTable")
396
396
 
397
397
  const sortedHt = new DiskSortedHashTable({
398
- storageFilepath: '/path/to/sortedHt-storage-file',
399
- headerFilepath: '/path/to/sortedHt-header-file',
398
+ storageFilepath: "/path/to/sortedHt-storage-file",
399
+ headerFilepath: "/path/to/sortedHt-header-file",
400
400
  initialLength: 1024,
401
401
  })
402
402
  await sortedHt.init()
403
403
 
404
- await sortedHt.set('first-key', 'first-value', 1)
405
- await sortedHt.set('second-key', 'second-value', 2)
406
- await sortedHt.set('third-key', 'third-value', 3)
404
+ await sortedHt.set("first-key", "first-value", 1)
405
+ await sortedHt.set("second-key", "second-value", 2)
406
+ await sortedHt.set("third-key", "third-value", 3)
407
407
 
408
408
  for await (const value of sortedHt.forwardIterator()) {
409
409
  console.log(value) // first-value
@@ -428,6 +428,96 @@ for await (const value of sortedHt.reverseIterator({ startingSortValue: 2, endin
428
428
  }
429
429
  ```
430
430
 
431
+ ## [Host your own distributed database](https://presidium.services/docs/DatabaseServer)
432
+ ```javascript
433
+ const DatabaseServer = require("presidium/DatabaseServer")
434
+
435
+ const server = new DatabaseServer({
436
+ databasePath: `${__dirname}/database`,
437
+ })
438
+ await server.init()
439
+
440
+ await server.registerDiskHashTable("Session", {
441
+ storagePath: `${this.databasePath}/Session/storage`,
442
+ headerPath: `${this.databasePath}/Session/header`,
443
+ initialLength: 536870912,
444
+ itemSize: 512,
445
+ })
446
+
447
+ await server.registerDiskSortedHashTable("Post", {
448
+ storagePath: `${this.databasePath}/Post/storage`,
449
+ headerPath: `${this.databasePath}/Post/header`,
450
+ initialLength: 1048576,
451
+ itemSize: 8192,
452
+ sortValueType: "number",
453
+ degree: 2,
454
+ })
455
+
456
+ server.listen(5000, () => {
457
+ console.log("Database server listening on port 5000")
458
+ })
459
+ ```
460
+
461
+ ## [Call a database table from anywhere](https://presidium.services/docs/DiskHashTableClient)
462
+ ```javascript
463
+ const DiskHashTableClient = require("presidium/DiskHashTableClient")
464
+
465
+ const sessionHt = new DiskHashTableClient({
466
+ serverUrl: "http://localhost:5000",
467
+ tableName: "Session",
468
+ })
469
+
470
+ const accessToken = "token"
471
+ const session = { accessToken }
472
+
473
+ await sessionHt.set(accessToken, JSON.stringify(session))
474
+
475
+ const sessionJson = await sessionHt.get(accessToken)
476
+
477
+ await sessionHt.delete(accessToken)
478
+ ```
479
+
480
+ ## [Query a database table from anywhere](https://presidium.services/docs/DiskSortedHashTableClient)
481
+ ```javascript
482
+ const DiskSortedHashTableClient = require("presidium-db-client-server/DiskSortedHashTableClient")
483
+
484
+ const postHt = new DiskSortedHashTableClient({
485
+ serverUrl: "http://localhost:5000",
486
+ tableName: "Post",
487
+ sortValueType: "number",
488
+ })
489
+
490
+ const post1 = {
491
+ id: "post-1",
492
+ images: ["/assets/post-1/image-1.jpg"],
493
+ content: "First post",
494
+ time: Date.now(),
495
+ }
496
+
497
+ const post2 = {
498
+ id: "post-2",
499
+ images: ["/assets/post-2/image-2.jpg"],
500
+ content: "Second post",
501
+ time: Date.now(),
502
+ }
503
+
504
+ const post3 = {
505
+ id: "post-3",
506
+ images: ["/assets/post-3/image-3.jpg"],
507
+ content: "Third post",
508
+ time: Date.now(),
509
+ }
510
+
511
+ await postHt.set(post1.id, JSON.stringify(post1), post1.time)
512
+ await postHt.set(post2.id, JSON.stringify(post2), post2.time)
513
+ await postHt.set(post3.id, JSON.stringify(post3), post3.time)
514
+
515
+ const myPosts = []
516
+ for await (const postJson of postHt.reverseIterator()) {
517
+ myPosts.push(JSON.parse(postJson))
518
+ }
519
+ ```
520
+
431
521
  ## License
432
522
  Presidium is distributed under the [CFOSS License](https://cloutsworld.com/en-us/legal/license/cfoss).
433
523
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presidium",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "description": "The Presidium library.",
5
5
  "author": "Richard Tong",
6
6
  "license": "CFOSS",