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.cjs.js
CHANGED
|
@@ -9665,7 +9665,7 @@ class Client extends EventEmitter {
|
|
|
9665
9665
|
}) {
|
|
9666
9666
|
super();
|
|
9667
9667
|
this.verbose = verbose;
|
|
9668
|
-
this.id = id ?? idGenerator();
|
|
9668
|
+
this.id = id ?? idGenerator(77);
|
|
9669
9669
|
this.parallelism = parallelism;
|
|
9670
9670
|
this.config = new ConnectionString(connectionString);
|
|
9671
9671
|
this.httpClientOptions = {
|
|
@@ -11252,10 +11252,18 @@ class Resource extends EventEmitter {
|
|
|
11252
11252
|
*/
|
|
11253
11253
|
constructor(config = {}) {
|
|
11254
11254
|
super();
|
|
11255
|
-
this._instanceId =
|
|
11255
|
+
this._instanceId = idGenerator(7);
|
|
11256
11256
|
const validation = validateResourceConfig(config);
|
|
11257
11257
|
if (!validation.isValid) {
|
|
11258
|
-
|
|
11258
|
+
const errorDetails = validation.errors.map((err) => ` \u2022 ${err}`).join("\n");
|
|
11259
|
+
throw new ResourceError(
|
|
11260
|
+
`Invalid Resource ${config.name || "[unnamed]"} configuration:
|
|
11261
|
+
${errorDetails}`,
|
|
11262
|
+
{
|
|
11263
|
+
resourceName: config.name,
|
|
11264
|
+
validation: validation.errors
|
|
11265
|
+
}
|
|
11266
|
+
);
|
|
11259
11267
|
}
|
|
11260
11268
|
const {
|
|
11261
11269
|
name,
|
|
@@ -13426,6 +13434,7 @@ var resource_class_default = Resource;
|
|
|
13426
13434
|
class Database extends EventEmitter {
|
|
13427
13435
|
constructor(options) {
|
|
13428
13436
|
super();
|
|
13437
|
+
this.id = idGenerator(7);
|
|
13429
13438
|
this.version = "1";
|
|
13430
13439
|
this.s3dbVersion = (() => {
|
|
13431
13440
|
const [ok, err, version] = try_fn_default(() => true ? "8.0.2" : "latest");
|