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.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 = Math.random().toString(36).slice(2, 8);
11251
+ this._instanceId = idGenerator(7);
11252
11252
  const validation = validateResourceConfig(config);
11253
11253
  if (!validation.isValid) {
11254
- throw new ResourceError(`Invalid Resource ${config.name} configuration`, { resourceName: config.name, validation: validation.errors, operation: "constructor", suggestion: "Check resource config and attributes." });
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");