s3db.js 8.0.2 → 8.0.3
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/dist/s3db.cjs.js +12 -3
- package/dist/s3db.cjs.min.js +1 -1
- package/dist/s3db.es.js +12 -3
- package/dist/s3db.es.min.js +1 -1
- package/dist/s3db.iife.js +12 -3
- package/dist/s3db.iife.min.js +1 -1
- package/package.json +1 -1
- package/src/client.class.js +1 -1
- package/src/database.class.js +3 -1
- package/src/resource.class.js +11 -5
package/dist/s3db.es.js
CHANGED
|
@@ -9661,7 +9661,7 @@ class Client extends EventEmitter {
|
|
|
9661
9661
|
}) {
|
|
9662
9662
|
super();
|
|
9663
9663
|
this.verbose = verbose;
|
|
9664
|
-
this.id = id ?? idGenerator();
|
|
9664
|
+
this.id = id ?? idGenerator(77);
|
|
9665
9665
|
this.parallelism = parallelism;
|
|
9666
9666
|
this.config = new ConnectionString(connectionString);
|
|
9667
9667
|
this.httpClientOptions = {
|
|
@@ -11248,10 +11248,18 @@ class Resource extends EventEmitter {
|
|
|
11248
11248
|
*/
|
|
11249
11249
|
constructor(config = {}) {
|
|
11250
11250
|
super();
|
|
11251
|
-
this._instanceId =
|
|
11251
|
+
this._instanceId = idGenerator(7);
|
|
11252
11252
|
const validation = validateResourceConfig(config);
|
|
11253
11253
|
if (!validation.isValid) {
|
|
11254
|
-
|
|
11254
|
+
const errorDetails = validation.errors.map((err) => ` \u2022 ${err}`).join("\n");
|
|
11255
|
+
throw new ResourceError(
|
|
11256
|
+
`Invalid Resource ${config.name || "[unnamed]"} configuration:
|
|
11257
|
+
${errorDetails}`,
|
|
11258
|
+
{
|
|
11259
|
+
resourceName: config.name,
|
|
11260
|
+
validation: validation.errors
|
|
11261
|
+
}
|
|
11262
|
+
);
|
|
11255
11263
|
}
|
|
11256
11264
|
const {
|
|
11257
11265
|
name,
|
|
@@ -13422,6 +13430,7 @@ var resource_class_default = Resource;
|
|
|
13422
13430
|
class Database extends EventEmitter {
|
|
13423
13431
|
constructor(options) {
|
|
13424
13432
|
super();
|
|
13433
|
+
this.id = idGenerator(7);
|
|
13425
13434
|
this.version = "1";
|
|
13426
13435
|
this.s3dbVersion = (() => {
|
|
13427
13436
|
const [ok, err, version] = try_fn_default(() => true ? "8.0.2" : "latest");
|