@medplum/agent 3.0.12 → 3.0.13

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/dist/cjs/index.cjs +3 -14
  2. package/package.json +5 -5
@@ -40984,20 +40984,9 @@ var bt = class extends Ve {
40984
40984
  this.initComplete = true;
40985
40985
  if (t?.baseUrl && !t.baseUrl.startsWith("http"))
40986
40986
  throw new Error("Base URL must start with http or https");
40987
- if (this.options = t ?? {}, this.fetch = t?.fetch ?? Ts(), this.storage = t?.storage ?? new De(), this.createPdfImpl = t?.createPdf, this.baseUrl = zn(t?.baseUrl ?? ps), this.fhirBaseUrl = zn(Rt(this.baseUrl, t?.fhirUrlPath ?? "fhir/R4/")), this.authorizeUrl = Rt(this.baseUrl, t?.authorizeUrl ?? "oauth2/authorize"), this.tokenUrl = Rt(this.baseUrl, t?.tokenUrl ?? "oauth2/token"), this.logoutUrl = Rt(this.baseUrl, t?.logoutUrl ?? "oauth2/logout"), this.clientId = t?.clientId ?? "", this.clientSecret = t?.clientSecret ?? "", this.onUnauthenticated = t?.onUnauthenticated, this.cacheTime = t?.cacheTime ?? (typeof window > "u" ? ms : fs), this.cacheTime > 0 ? this.requestCache = new gt(t?.resourceCacheSize ?? ds) : this.requestCache = void 0, t?.autoBatchTime ? (this.autoBatchTime = t.autoBatchTime, this.autoBatchQueue = []) : (this.autoBatchTime = 0, this.autoBatchQueue = void 0), t?.accessToken)
40988
- this.setAccessToken(t.accessToken), this.initPromise = Promise.resolve();
40989
- else if (this.storage.getInitPromise !== void 0) {
40990
- let n = this.storage.getInitPromise(), i2 = new Promise((o, s) => {
40991
- n.then(() => {
40992
- this.attemptResumeActiveLogin().then(o).catch((a) => {
40993
- console.error(a), o();
40994
- }), this.initComplete = true;
40995
- }).catch(s);
40996
- });
40997
- this.initPromise = i2, this.initComplete = false;
40998
- } else
40999
- this.initPromise = this.attemptResumeActiveLogin().catch(console.error);
41000
- this.setupStorageListener();
40987
+ this.options = t ?? {}, this.fetch = t?.fetch ?? Ts(), this.storage = t?.storage ?? new De(), this.createPdfImpl = t?.createPdf, this.baseUrl = zn(t?.baseUrl ?? ps), this.fhirBaseUrl = zn(Rt(this.baseUrl, t?.fhirUrlPath ?? "fhir/R4/")), this.authorizeUrl = Rt(this.baseUrl, t?.authorizeUrl ?? "oauth2/authorize"), this.tokenUrl = Rt(this.baseUrl, t?.tokenUrl ?? "oauth2/token"), this.logoutUrl = Rt(this.baseUrl, t?.logoutUrl ?? "oauth2/logout"), this.clientId = t?.clientId ?? "", this.clientSecret = t?.clientSecret ?? "", this.onUnauthenticated = t?.onUnauthenticated, this.cacheTime = t?.cacheTime ?? (typeof window > "u" ? ms : fs), this.cacheTime > 0 ? this.requestCache = new gt(t?.resourceCacheSize ?? ds) : this.requestCache = void 0, t?.autoBatchTime ? (this.autoBatchTime = t.autoBatchTime, this.autoBatchQueue = []) : (this.autoBatchTime = 0, this.autoBatchQueue = void 0), t?.accessToken && this.setAccessToken(t.accessToken), this.storage.getInitPromise === void 0 ? (t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initPromise = Promise.resolve()) : (this.initComplete = false, this.initPromise = this.storage.getInitPromise(), this.initPromise.then(() => {
40988
+ t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initComplete = true;
40989
+ }).catch(console.error)), this.setupStorageListener();
41001
40990
  }
41002
40991
  get isInitialized() {
41003
40992
  return this.initComplete;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/agent",
3
- "version": "3.0.12",
3
+ "version": "3.0.13",
4
4
  "description": "Medplum Agent",
5
5
  "homepage": "https://www.medplum.com/",
6
6
  "bugs": {
@@ -23,15 +23,15 @@
23
23
  "test": "jest"
24
24
  },
25
25
  "dependencies": {
26
- "@medplum/core": "3.0.12",
27
- "@medplum/hl7": "3.0.12",
26
+ "@medplum/core": "3.0.13",
27
+ "@medplum/hl7": "3.0.13",
28
28
  "dcmjs-dimse": "0.1.27",
29
29
  "node-windows": "1.0.0-beta.8",
30
30
  "ws": "8.16.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@medplum/fhirtypes": "3.0.12",
34
- "@medplum/mock": "3.0.12",
33
+ "@medplum/fhirtypes": "3.0.13",
34
+ "@medplum/mock": "3.0.13",
35
35
  "@types/async-eventemitter": "0.2.4",
36
36
  "@types/node-windows": "0.1.6",
37
37
  "@types/ws": "8.5.10",