New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@itwin/core-backend

Package Overview
Dependencies
Maintainers
0
Versions
1028
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@itwin/core-backend - npm Package Compare versions

Comparing version

to
5.0.0-dev.67

lib/cjs/ImageSourceConversion.d.ts

35

lib/cjs/BackendHubAccess.d.ts

@@ -38,3 +38,3 @@ /** @packageDocumentation

* The properties to access a V2 checkpoint through a daemon.
* @internal
* @public
*/

@@ -53,7 +53,10 @@ export interface V2CheckpointAccessProps {

}
/** @internal */
/**
* Maps element Ids to their corresponding [LockState]($common)s.
* @public
*/
export type LockMap = Map<Id64String, CommonLockState>;
/**
* The properties of a lock that may be obtained from a lock server.
* @beta
* @public
*/

@@ -68,3 +71,3 @@ export interface LockProps {

* Argument for cancelling and tracking download progress.
* @beta
* @public
*/

@@ -122,3 +125,3 @@ export interface DownloadProgressArg {

/** Argument for downloading a changeset.
* @beta
* @public
*/

@@ -141,3 +144,3 @@ export interface DownloadChangesetArg extends ChangesetArg, DownloadProgressArg {

/** Argument for downloading a changeset range.
* @beta
* @public
*/

@@ -165,5 +168,3 @@ export interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {

* Generally direct access to these methods should not be required, since higher-level apis are provided.
* @note This interface is implemented in another repository. Any changes made to this interface must be validated against
* the implementation found here: https://github.com/iTwin/imodels-clients/blob/main/itwin-platform-access/imodels-access-backend/src/BackendIModelsAccess.ts
* @internal
* @public
*/

@@ -207,22 +208,12 @@ export interface BackendHubAccess {

downloadV1Checkpoint: (arg: CheckpointArg) => Promise<ChangesetIndexAndId>;
/**
* Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists.
* @internal
*/
/** Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists. */
queryV2Checkpoint: (arg: CheckpointProps) => Promise<V2CheckpointAccessProps | undefined>;
/**
* acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired
* @internal
* @throws ConflictingLocksError if one or more requested locks are held by other briefcases.
*/
acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;
/**
* Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests.
* @internal
*/
/** Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests. */
queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;
/**
* Release all currently held locks
* @internal
*/
/** Release all currently held locks */
releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;

@@ -229,0 +220,0 @@ /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */

@@ -118,3 +118,3 @@ "use strict";

static async acquireNewBriefcaseId(arg) {
return IModelHost_1.IModelHost.hubAccess.acquireNewBriefcaseId(arg);
return IModelHost_1.IModelHost[Symbols_1._hubAccess].acquireNewBriefcaseId(arg);
}

@@ -147,3 +147,3 @@ /**

const asOf = arg.asOf ?? core_common_1.IModelVersion.latest().toJSON();
const changeset = await IModelHost_1.IModelHost.hubAccess.getChangesetFromVersion({ ...arg, version: core_common_1.IModelVersion.fromJSON(asOf) });
const changeset = await IModelHost_1.IModelHost[Symbols_1._hubAccess].getChangesetFromVersion({ ...arg, version: core_common_1.IModelVersion.fromJSON(asOf) });
const checkpoint = { ...arg, changeset };

@@ -216,3 +216,3 @@ try {

if (this.isValidBriefcaseId(briefcase.briefcaseId))
return IModelHost_1.IModelHost.hubAccess.releaseBriefcase({ accessToken, iModelId: briefcase.iModelId, briefcaseId: briefcase.briefcaseId });
return IModelHost_1.IModelHost[Symbols_1._hubAccess].releaseBriefcase({ accessToken, iModelId: briefcase.iModelId, briefcaseId: briefcase.briefcaseId });
}

@@ -311,11 +311,11 @@ /**

static async queryChangeset(arg) {
return IModelHost_1.IModelHost.hubAccess.queryChangeset({ ...arg, accessToken: await IModelHost_1.IModelHost.getAccessToken() });
return IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangeset({ ...arg, accessToken: await IModelHost_1.IModelHost.getAccessToken() });
}
/** Query the hub for an array of changeset properties given a ChangesetRange */
static async queryChangesets(arg) {
return IModelHost_1.IModelHost.hubAccess.queryChangesets({ ...arg, accessToken: await IModelHost_1.IModelHost.getAccessToken() });
return IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangesets({ ...arg, accessToken: await IModelHost_1.IModelHost.getAccessToken() });
}
/** Query the hub for the ChangesetProps of the most recent changeset */
static async getLatestChangeset(arg) {
return IModelHost_1.IModelHost.hubAccess.getLatestChangeset({ ...arg, accessToken: await IModelHost_1.IModelHost.getAccessToken() });
return IModelHost_1.IModelHost[Symbols_1._hubAccess].getLatestChangeset({ ...arg, accessToken: await IModelHost_1.IModelHost.getAccessToken() });
}

@@ -327,3 +327,3 @@ /** Query the Id of an iModel by name.

static async queryIModelByName(arg) {
return IModelHost_1.IModelHost.hubAccess.queryIModelByName(arg);
return IModelHost_1.IModelHost[Symbols_1._hubAccess].queryIModelByName(arg);
}

@@ -358,3 +358,3 @@ /** Deletes a folder and all it's contents.

if (currentIndex === undefined)
currentIndex = (await IModelHost_1.IModelHost.hubAccess.queryChangeset({ accessToken: arg.accessToken, iModelId: db.iModelId, changeset: { id: db.changeset.id } })).index;
currentIndex = (await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangeset({ accessToken: arg.accessToken, iModelId: db.iModelId, changeset: { id: db.changeset.id } })).index;
if (!arg.toIndex) {

@@ -370,3 +370,3 @@ throw new core_common_1.IModelError(core_bentley_1.ChangeSetStatus.ApplyError, "toIndex must be specified to revert changesets");

// Download change sets
const changesets = await IModelHost_1.IModelHost.hubAccess.downloadChangesets({
const changesets = await IModelHost_1.IModelHost[Symbols_1._hubAccess].downloadChangesets({
accessToken: arg.accessToken,

@@ -404,3 +404,3 @@ iModelId: db.iModelId,

if (currentIndex === undefined)
currentIndex = (await IModelHost_1.IModelHost.hubAccess.queryChangeset({ accessToken: arg.accessToken, iModelId: db.iModelId, changeset: { id: db.changeset.id } })).index;
currentIndex = (await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangeset({ accessToken: arg.accessToken, iModelId: db.iModelId, changeset: { id: db.changeset.id } })).index;
const reverse = (arg.toIndex && arg.toIndex < currentIndex) ? true : false;

@@ -411,3 +411,3 @@ if (db[Symbols_1._nativeDb].hasPendingTxns() && reverse) {

// Download change sets
const changesets = await IModelHost_1.IModelHost.hubAccess.downloadChangesets({
const changesets = await IModelHost_1.IModelHost[Symbols_1._hubAccess].downloadChangesets({
accessToken: arg.accessToken,

@@ -483,3 +483,3 @@ iModelId: db.iModelId,

const accessToken = await IModelHost_1.IModelHost.getAccessToken();
const index = await IModelHost_1.IModelHost.hubAccess.pushChangeset({ accessToken, iModelId: db.iModelId, changesetProps });
const index = await IModelHost_1.IModelHost[Symbols_1._hubAccess].pushChangeset({ accessToken, iModelId: db.iModelId, changesetProps });
db[Symbols_1._nativeDb].completeCreateChangeset({ index });

@@ -486,0 +486,0 @@ db.changeset = db[Symbols_1._nativeDb].getCurrentChangeset();

@@ -80,5 +80,5 @@ "use strict";

const iModelId = briefcase.iModelId;
const first = (await IModelHost_1.IModelHost.hubAccess.queryChangeset({ iModelId, changeset: { id: options.startChangesetId }, accessToken })).index;
const end = (await IModelHost_1.IModelHost.hubAccess.queryChangeset({ iModelId, changeset: { id: options.endChangesetId }, accessToken })).index;
const changesets = await IModelHost_1.IModelHost.hubAccess.downloadChangesets({ accessToken, iModelId, range: { first, end }, targetDir: BriefcaseManager_1.BriefcaseManager.getChangeSetsPath(iModelId) });
const first = (await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangeset({ iModelId, changeset: { id: options.startChangesetId }, accessToken })).index;
const end = (await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangeset({ iModelId, changeset: { id: options.endChangesetId }, accessToken })).index;
const changesets = await IModelHost_1.IModelHost[Symbols_1._hubAccess].downloadChangesets({ accessToken, iModelId, range: { first, end }, targetDir: BriefcaseManager_1.BriefcaseManager.getChangeSetsPath(iModelId) });
// ChangeSets need to be processed from newest to oldest

@@ -98,5 +98,5 @@ changesets.reverse();

const iModelId = briefcase.iModelId;
const first = (await IModelHost_1.IModelHost.hubAccess.queryChangeset({ iModelId, changeset: { id: options.startChangesetId }, accessToken })).index;
const end = (await IModelHost_1.IModelHost.hubAccess.queryChangeset({ iModelId, changeset: { id: options.endChangesetId }, accessToken })).index;
const changesets = await IModelHost_1.IModelHost.hubAccess.downloadChangesets({ accessToken, iModelId, range: { first, end }, targetDir: BriefcaseManager_1.BriefcaseManager.getChangeSetsPath(iModelId) });
const first = (await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangeset({ iModelId, changeset: { id: options.startChangesetId }, accessToken })).index;
const end = (await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangeset({ iModelId, changeset: { id: options.endChangesetId }, accessToken })).index;
const changesets = await IModelHost_1.IModelHost[Symbols_1._hubAccess].downloadChangesets({ accessToken, iModelId, range: { first, end }, targetDir: BriefcaseManager_1.BriefcaseManager.getChangeSetsPath(iModelId) });
// ChangeSets need to be processed from newest to oldest

@@ -103,0 +103,0 @@ changesets.reverse();

@@ -340,3 +340,3 @@ "use strict";

const changesetsFolder = BriefcaseManager_1.BriefcaseManager.getChangeSetsPath(iModelId);
const changeset = await IModelHost_1.IModelHost.hubAccess.downloadChangeset({ accessToken: IModelHost_1.IModelHost.authorizationClient ? undefined : accessToken, iModelId, changeset: { id: iModel.changeset.id }, targetDir: changesetsFolder });
const changeset = await IModelHost_1.IModelHost[Symbols_1._hubAccess].downloadChangeset({ accessToken: IModelHost_1.IModelHost.authorizationClient ? undefined : accessToken, iModelId, changeset: { id: iModel.changeset.id }, targetDir: changesetsFolder });
if (!IModelJsFs_1.IModelJsFs.existsSync(changeset.pathname))

@@ -384,3 +384,3 @@ throw new core_common_1.IModelError(core_bentley_1.IModelStatus.FileNotFound, `Failed to download change set: ${changeset.pathname}`);

const { iModelId, iTwinId, range } = args;
range.end = range.end ?? (await IModelHost_1.IModelHost.hubAccess.getChangesetFromVersion({ accessToken, iModelId, version: core_common_1.IModelVersion.latest() })).index;
range.end = range.end ?? (await IModelHost_1.IModelHost[Symbols_1._hubAccess].getChangesetFromVersion({ accessToken, iModelId, version: core_common_1.IModelVersion.latest() })).index;
if (range.first > range.end)

@@ -390,3 +390,3 @@ throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadArg, "Invalid range of changesets");

return []; // no changesets exist, so the inclusive range is empty
const changesets = await IModelHost_1.IModelHost.hubAccess.queryChangesets({ accessToken, iModelId, range });
const changesets = await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangesets({ accessToken, iModelId, range });
// Setup a temporary briefcase to help with extracting change summaries

@@ -393,0 +393,0 @@ const briefcasePath = BriefcaseManager_1.BriefcaseManager.getBriefcaseBasePath(iModelId);

@@ -110,3 +110,3 @@ "use strict";

if (undefined === checkpoint.accessToken) {
tokenFn = async () => (await IModelHost_1.IModelHost.hubAccess.queryV2Checkpoint(checkpoint))?.sasToken ?? "";
tokenFn = async () => (await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryV2Checkpoint(checkpoint))?.sasToken ?? "";
tokenRefreshSeconds = undefined;

@@ -122,3 +122,3 @@ }

try {
v2props = await IModelHost_1.IModelHost.hubAccess.queryV2Checkpoint(checkpoint);
v2props = await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryV2Checkpoint(checkpoint);
if (!v2props)

@@ -170,3 +170,3 @@ throw new Error("no checkpoint");

const request = job.request;
const v2props = await IModelHost_1.IModelHost.hubAccess.queryV2Checkpoint({ ...request.checkpoint, allowPreceding: true });
const v2props = await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryV2Checkpoint({ ...request.checkpoint, allowPreceding: true });
if (!v2props)

@@ -223,3 +223,3 @@ throw new core_common_1.IModelError(core_bentley_1.IModelStatus.NotFound, "V2 checkpoint not found");

// eslint-disable-next-line @typescript-eslint/no-deprecated
return (await IModelHost_1.IModelHost.hubAccess.downloadV1Checkpoint(job.request)).id;
return (await IModelHost_1.IModelHost[Symbols_1._hubAccess].downloadV1Checkpoint(job.request)).id;
}

@@ -278,3 +278,3 @@ }

const toIndex = checkpoint.changeset.index ??
(await IModelHost_1.IModelHost.hubAccess.getChangesetFromVersion({ accessToken, iModelId: checkpoint.iModelId, version: core_common_1.IModelVersion.asOfChangeSet(checkpoint.changeset.id) })).index;
(await IModelHost_1.IModelHost[Symbols_1._hubAccess].getChangesetFromVersion({ accessToken, iModelId: checkpoint.iModelId, version: core_common_1.IModelVersion.asOfChangeSet(checkpoint.changeset.id) })).index;
await BriefcaseManager_1.BriefcaseManager.pullAndApplyChangesets(db, { accessToken, toIndex });

@@ -375,3 +375,3 @@ }

static async toCheckpointProps(args) {
const changeset = args.changeset ?? await IModelHost_1.IModelHost.hubAccess.getLatestChangeset({ ...args, accessToken: await IModelHost_1.IModelHost.getAccessToken() });
const changeset = args.changeset ?? await IModelHost_1.IModelHost[Symbols_1._hubAccess].getLatestChangeset({ ...args, accessToken: await IModelHost_1.IModelHost.getAccessToken() });
return {

@@ -382,3 +382,3 @@ iModelId: args.iModelId,

index: changeset.index,
id: changeset.id ?? (await IModelHost_1.IModelHost.hubAccess.queryChangeset({ ...args, changeset, accessToken: await IModelHost_1.IModelHost.getAccessToken() })).id,
id: changeset.id ?? (await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangeset({ ...args, changeset, accessToken: await IModelHost_1.IModelHost.getAccessToken() })).id,
},

@@ -385,0 +385,0 @@ };

@@ -36,2 +36,3 @@ export * from "./BackendHubAccess";

export * from "./HubMock";
export * from "./ImageSourceConversion";
export * from "./IModelCloneContext";

@@ -122,2 +123,6 @@ export * from "./IModelDb";

/**
* @docs-group-description Images
* APIs for encoding and decoding images
*/
/**
* @docs-group-description IModelHost

@@ -124,0 +129,0 @@ * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).

@@ -57,2 +57,3 @@ "use strict";

__exportStar(require("./HubMock"), exports);
__exportStar(require("./ImageSourceConversion"), exports);
__exportStar(require("./IModelCloneContext"), exports);

@@ -145,2 +146,6 @@ __exportStar(require("./IModelDb"), exports);

/**
* @docs-group-description Images
* APIs for encoding and decoding images
*/
/**
* @docs-group-description IModelHost

@@ -147,0 +152,0 @@ * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).

@@ -29,3 +29,3 @@ import { GuidString } from "@itwin/core-bentley";

*
* Mocked tests must always start by creating a new iModel via [[IModelHost.hubAccess.createNewIModel]] with a `version0` iModel.
* Mocked tests must always start by creating a new iModel via [[IModelHost[_hubAccess].createNewIModel]] with a `version0` iModel.
* They use mock (aka "bogus") credentials for `AccessTokens`, which is fine since [[HubMock]] never accesses resources outside the current

@@ -32,0 +32,0 @@ * computer.

@@ -14,2 +14,3 @@ "use strict";

const LocalHub_1 = require("./LocalHub");
const Symbols_1 = require("./internal/Symbols");
function wasStarted(val) {

@@ -42,3 +43,3 @@ if (undefined === val)

*
* Mocked tests must always start by creating a new iModel via [[IModelHost.hubAccess.createNewIModel]] with a `version0` iModel.
* Mocked tests must always start by creating a new iModel via [[IModelHost[_hubAccess].createNewIModel]] with a `version0` iModel.
* They use mock (aka "bogus") credentials for `AccessTokens`, which is fine since [[HubMock]] never accesses resources outside the current

@@ -75,4 +76,4 @@ * computer.

IModelJsFs_1.IModelJsFs.purgeDirSync(this.mockRoot);
this._saveHubAccess = IModelHost_1.IModelHost.getHubAccess();
IModelHost_1.IModelHost.setHubAccess(this);
this._saveHubAccess = IModelHost_1.IModelHost[Symbols_1._getHubAccess]();
IModelHost_1.IModelHost[Symbols_1._setHubAccess](this);
HubMock._iTwinId = core_bentley_1.Guid.createValue(); // all iModels for this test get the same "iTwinId"

@@ -92,3 +93,3 @@ }

IModelJsFs_1.IModelJsFs.removeSync(this.mockRoot);
IModelHost_1.IModelHost.setHubAccess(this._saveHubAccess);
IModelHost_1.IModelHost[Symbols_1._setHubAccess](this._saveHubAccess);
this.mockRoot = undefined;

@@ -95,0 +96,0 @@ }

@@ -9,6 +9,7 @@ /** @packageDocumentation

import { ServerStorage } from "@itwin/object-storage-core";
import { BackendHubAccess } from "./BackendHubAccess";
import { BackendHubAccess, CreateNewIModelProps } from "./BackendHubAccess";
import { TileStorage } from "./TileStorage";
import { SettingsSchemas } from "./workspace/SettingsSchemas";
import { Workspace, WorkspaceOpts } from "./workspace/Workspace";
import { _getHubAccess, _hubAccess, _setHubAccess } from "./internal/Symbols";
/** @internal */

@@ -82,3 +83,2 @@ export interface CrashReportingConfigNameValuePair {

* The kind of iModel hub server to use.
* @internal
*/

@@ -191,3 +191,3 @@ hubAccess?: BackendHubAccess;

private static _appWorkspace?;
static configuration?: IModelHostOptions;
static configuration?: Omit<IModelHostOptions, "hubAccess">;
/**

@@ -260,13 +260,13 @@ * The name of the *Profile* directory (a subdirectory of "[[cacheDir]]/profiles/") for this process.

/** @internal */
static setHubAccess(hubAccess: BackendHubAccess | undefined): void;
static [_setHubAccess](hubAccess: BackendHubAccess | undefined): void;
/** get the current hubAccess, if present.
* @internal
*/
static getHubAccess(): BackendHubAccess | undefined;
static [_getHubAccess](): BackendHubAccess | undefined;
/** Provides access to the IModelHub for this IModelHost
* @internal
* @note If [[IModelHostOptions.hubAccess]] was undefined when initializing this class, accessing this property will throw an error.
* To determine whether one is present, use [[getHubAccess]].
* To determine whether one is present, use [[_getHubAccess]].
*/
static get hubAccess(): BackendHubAccess;
static get [_hubAccess](): BackendHubAccess;
private static initializeWorkspace;

@@ -285,2 +285,9 @@ private static _isValid;

static shutdown(this: void): Promise<void>;
/**
* Create a new iModel.
* @returns the Guid of the newly created iModel.
* @throws [IModelError]($common) in case of errors.
* @note If [[IModelHostOptions.hubAccess]] was undefined in the call to [[startup]], this function will throw an error.
*/
static createNewIModel(arg: CreateNewIModelProps): Promise<GuidString>;
private static doShutdown;

@@ -287,0 +294,0 @@ /**

@@ -42,2 +42,3 @@ "use strict";

const SettingsSchemasImpl_1 = require("./internal/workspace/SettingsSchemasImpl");
const Symbols_1 = require("./internal/Symbols");
const loggerCategory = BackendLoggerCategory_1.BackendLoggerCategory.IModelHost;

@@ -126,2 +127,3 @@ /** Configuration of core-backend.

static _appWorkspace;
// Omit the hubAccess field from configuration so it stays internal.
static configuration;

@@ -228,13 +230,13 @@ /**

/** @internal */
static setHubAccess(hubAccess) { this._hubAccess = hubAccess; }
static [Symbols_1._setHubAccess](hubAccess) { this._hubAccess = hubAccess; }
/** get the current hubAccess, if present.
* @internal
*/
static getHubAccess() { return this._hubAccess; }
static [Symbols_1._getHubAccess]() { return this._hubAccess; }
/** Provides access to the IModelHub for this IModelHost
* @internal
* @note If [[IModelHostOptions.hubAccess]] was undefined when initializing this class, accessing this property will throw an error.
* To determine whether one is present, use [[getHubAccess]].
* To determine whether one is present, use [[_getHubAccess]].
*/
static get hubAccess() {
static get [Symbols_1._hubAccess]() {
if (IModelHost._hubAccess === undefined)

@@ -296,5 +298,6 @@ throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadRequest, "No BackendHubAccess supplied in IModelHostOptions");

].forEach((schema) => schema.registerSchema()); // register all of the schemas
if (undefined !== options.hubAccess)
this._hubAccess = options.hubAccess;
this.configuration = options;
const { hubAccess, ...otherOptions } = options;
if (undefined !== hubAccess)
this._hubAccess = hubAccess;
this.configuration = otherOptions;
this.setupTileCache();

@@ -316,2 +319,11 @@ process.once("beforeExit", IModelHost.shutdown);

}
/**
* Create a new iModel.
* @returns the Guid of the newly created iModel.
* @throws [IModelError]($common) in case of errors.
* @note If [[IModelHostOptions.hubAccess]] was undefined in the call to [[startup]], this function will throw an error.
*/
static async createNewIModel(arg) {
return this[Symbols_1._hubAccess].createNewIModel(arg);
}
static async doShutdown() {

@@ -318,0 +330,0 @@ if (!this._isValid)

@@ -69,3 +69,3 @@ "use strict";

async [Symbols_1._releaseAllLocks]() {
await IModelHost_1.IModelHost.hubAccess.releaseAllLocks(this.briefcase); // throws if unsuccessful
await IModelHost_1.IModelHost[Symbols_1._hubAccess].releaseAllLocks(this.briefcase); // throws if unsuccessful
this.clearAllLocks();

@@ -138,3 +138,3 @@ }

}
await IModelHost_1.IModelHost.hubAccess.acquireLocks(this.briefcase, locks); // throws if unsuccessful
await IModelHost_1.IModelHost[Symbols_1._hubAccess].acquireLocks(this.briefcase, locks); // throws if unsuccessful
for (const lock of locks)

@@ -141,0 +141,0 @@ this.insertLock(lock[0], lock[1], 0 /* LockOrigin.Acquired */);

@@ -14,2 +14,6 @@ /** @packageDocumentation

export declare const _verifyChannel: unique symbol;
/** @internal */
export declare const _hubAccess: unique symbol;
export declare const _setHubAccess: unique symbol;
export declare const _getHubAccess: unique symbol;
//# sourceMappingURL=Symbols.d.ts.map

@@ -10,3 +10,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports._verifyChannel = exports._releaseAllLocks = exports._nativeDb = exports._key = exports._getData = exports._faceProps = exports._elementWasCreated = exports._close = exports._implementationProhibited = void 0;
exports._getHubAccess = exports._setHubAccess = exports._hubAccess = exports._verifyChannel = exports._releaseAllLocks = exports._nativeDb = exports._key = exports._getData = exports._faceProps = exports._elementWasCreated = exports._close = exports._implementationProhibited = void 0;
exports._implementationProhibited = Symbol.for("Implementations of this interface can only be obtained from the containing package");

@@ -25,2 +25,6 @@ function sym(name) {

exports._verifyChannel = Symbol.for(sym("verifyChannel"));
/** @internal */
exports._hubAccess = Symbol.for(sym("hubAccess"));
exports._setHubAccess = Symbol.for(sym("setHubAccess"));
exports._getHubAccess = Symbol.for(sym("getHubAccess"));
//# sourceMappingURL=Symbols.js.map

@@ -19,2 +19,3 @@ "use strict";

const IModelJsFs_1 = require("../IModelJsFs");
const Symbols_1 = require("../internal/Symbols");
const loggerCategory = BackendLoggerCategory_1.BackendLoggerCategory.IModelDb;

@@ -37,3 +38,3 @@ /**

// check with iModelHub and see if we already have acquired any briefcaseIds
myBriefcaseIds = await IModelHost_1.IModelHost.hubAccess.getMyBriefcaseIds({ accessToken, iModelId });
myBriefcaseIds = await IModelHost_1.IModelHost[Symbols_1._hubAccess].getMyBriefcaseIds({ accessToken, iModelId });
}

@@ -57,3 +58,3 @@ const resolvers = args.fileNameResolvers ?? [(arg) => BriefcaseManager_1.BriefcaseManager.getFileName(arg)];

const toIndex = tokenProps.changeset?.index ??
(await IModelHost_1.IModelHost.hubAccess.getChangesetFromVersion({ accessToken, iModelId, version: core_common_1.IModelVersion.asOfChangeSet(tokenProps.changeset.id) })).index;
(await IModelHost_1.IModelHost[Symbols_1._hubAccess].getChangesetFromVersion({ accessToken, iModelId, version: core_common_1.IModelVersion.asOfChangeSet(tokenProps.changeset.id) })).index;
await BriefcaseManager_1.BriefcaseManager.pullAndApplyChangesets(db, { accessToken, toIndex });

@@ -60,0 +61,0 @@ }

@@ -272,2 +272,8 @@ /** @packageDocumentation

get hasLocalChanges(): boolean;
/** Destroy the record of all local changes that have yet to be saved and/or pushed.
* This permanently eradicates your changes - use with caution!
* Typically, callers will want to subsequently use [[LockControl.releaseAllLocks]].
* After calling this function, [[hasLocalChanges]], [[hasPendingTxns]], and [[hasUnsavedChanges]] will all be `false`.
*/
deleteAllTxns(): void;
/** Obtain a list of the EC instances that have been changed locally by the [[BriefcaseDb]] associated with this `TxnManager` and have not yet been pushed to the iModel.

@@ -274,0 +280,0 @@ * @beta

@@ -587,2 +587,10 @@ "use strict";

get hasLocalChanges() { return this.hasUnsavedChanges || this.hasPendingTxns; }
/** Destroy the record of all local changes that have yet to be saved and/or pushed.
* This permanently eradicates your changes - use with caution!
* Typically, callers will want to subsequently use [[LockControl.releaseAllLocks]].
* After calling this function, [[hasLocalChanges]], [[hasPendingTxns]], and [[hasUnsavedChanges]] will all be `false`.
*/
deleteAllTxns() {
this._nativeDb.deleteAllTxns();
}
/** Obtain a list of the EC instances that have been changed locally by the [[BriefcaseDb]] associated with this `TxnManager` and have not yet been pushed to the iModel.

@@ -589,0 +597,0 @@ * @beta

{
"name": "@itwin/core-backend",
"version": "5.0.0-dev.66",
"version": "5.0.0-dev.67",
"description": "iTwin.js backend components",

@@ -29,6 +29,6 @@ "main": "lib/cjs/core-backend.js",

"@opentelemetry/api": "^1.0.4",
"@itwin/core-bentley": "5.0.0-dev.66",
"@itwin/ecschema-metadata": "5.0.0-dev.66",
"@itwin/core-common": "5.0.0-dev.66",
"@itwin/core-geometry": "5.0.0-dev.66"
"@itwin/core-bentley": "5.0.0-dev.67",
"@itwin/core-common": "5.0.0-dev.67",
"@itwin/core-geometry": "5.0.0-dev.67",
"@itwin/ecschema-metadata": "5.0.0-dev.67"
},

@@ -75,12 +75,12 @@ "peerDependenciesMeta": {

"webpack": "^5.97.1",
"@itwin/core-bentley": "5.0.0-dev.66",
"@itwin/build-tools": "5.0.0-dev.66",
"@itwin/ecschema-metadata": "5.0.0-dev.66",
"@itwin/ecsql-common": "5.0.0-dev.66",
"internal-tools": "3.0.0-dev.69",
"@itwin/core-common": "5.0.0-dev.66",
"@itwin/core-geometry": "5.0.0-dev.66"
"@itwin/build-tools": "5.0.0-dev.67",
"@itwin/core-bentley": "5.0.0-dev.67",
"@itwin/core-common": "5.0.0-dev.67",
"@itwin/ecsql-common": "5.0.0-dev.67",
"@itwin/core-geometry": "5.0.0-dev.67",
"@itwin/ecschema-metadata": "5.0.0-dev.67",
"internal-tools": "3.0.0-dev.69"
},
"dependencies": {
"@bentley/imodeljs-native": "5.0.59",
"@bentley/imodeljs-native": "5.0.61",
"@itwin/cloud-agnostic-core": "^2.2.4",

@@ -87,0 +87,0 @@ "@itwin/object-storage-azure": "^2.2.5",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet