@warp-drive/legacy 5.7.0-alpha.13 → 5.7.0-alpha.14
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/declarations/compat/legacy-network-handler/minimum-adapter-interface.d.ts +3 -3
- package/declarations/compat/legacy-network-handler/snapshot-record-array.d.ts +2 -2
- package/declarations/model/-private/legacy-relationships-support.d.ts +9 -10
- package/declarations/model/-private.d.ts +1 -1
- package/dist/{-private-CsshwIY7.js → -private-DGArz5W5.js} +3 -2
- package/dist/adapter/-private.js +1 -1
- package/dist/adapter/json-api.js +1 -1
- package/dist/adapter/rest.js +1 -1
- package/dist/compat/-private.js +1 -1
- package/dist/compat.js +2 -1
- package/dist/{errors-DOPr_dMc.js → errors-CI53ie90.js} +18 -21
- package/dist/model/-private.js +1 -2
- package/dist/model/migration-support.js +5 -4
- package/dist/model.js +3 -3
- package/dist/{schema-provider-0vfXIZzR.js → schema-provider-keKLiu7p.js} +11 -8
- package/dist/{serialize-into-hash-DVW6-WBv.js → serialize-into-hash-BJjGi7jB.js} +2 -2
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Store } from "@warp-drive/core";
|
|
2
|
-
import type {
|
|
2
|
+
import type { LegacyQueryArray } from "@warp-drive/core/store/-private";
|
|
3
3
|
import type { ModelSchema } from "@warp-drive/core/types";
|
|
4
4
|
import type { LegacyRelationshipField as RelationshipSchema } from "@warp-drive/core/types/schema/fields";
|
|
5
5
|
import type { Snapshot } from "./snapshot.js";
|
|
@@ -113,11 +113,11 @@ export interface MinimumAdapterInterface {
|
|
|
113
113
|
* @param {ModelSchema} schema An object with methods for accessing information about
|
|
114
114
|
* the type, attributes and relationships of the primary type associated with the request.
|
|
115
115
|
* @param {Object} query
|
|
116
|
-
* @param {
|
|
116
|
+
* @param {LegacyQueryArray} recordArray
|
|
117
117
|
* @param {Object} options
|
|
118
118
|
* @return {Promise} a promise resolving with resource data to feed to the associated serializer
|
|
119
119
|
*/
|
|
120
|
-
query(store: Store, schema: ModelSchema, query: Record<string, unknown>, recordArray:
|
|
120
|
+
query(store: Store, schema: ModelSchema, query: Record<string, unknown>, recordArray: LegacyQueryArray, options: {
|
|
121
121
|
adapterOptions?: unknown;
|
|
122
122
|
}): Promise<AdapterPayload>;
|
|
123
123
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Store } from "@warp-drive/core";
|
|
2
|
-
import type {
|
|
2
|
+
import type { LegacyLiveArray } from "@warp-drive/core/store/-private";
|
|
3
3
|
import type { FindAllOptions, ModelSchema } from "@warp-drive/core/types";
|
|
4
4
|
import type { Snapshot } from "./snapshot.js";
|
|
5
5
|
/**
|
|
@@ -36,7 +36,7 @@ export declare class SnapshotRecordArray {
|
|
|
36
36
|
@private
|
|
37
37
|
@type {Array}
|
|
38
38
|
*/
|
|
39
|
-
get _recordArray():
|
|
39
|
+
get _recordArray(): LegacyLiveArray;
|
|
40
40
|
/**
|
|
41
41
|
Number of records in the array
|
|
42
42
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Store } from "@warp-drive/core";
|
|
2
2
|
import type { CollectionEdge, Graph, ResourceEdge, UpgradedMeta } from "@warp-drive/core/graph/-private";
|
|
3
|
-
import type {
|
|
4
|
-
import { RelatedCollection as ManyArray } from "@warp-drive/core/store/-private";
|
|
3
|
+
import type { LegacyManyArray } from "@warp-drive/core/store/-private";
|
|
5
4
|
import type { BaseFinderOptions, StableRecordIdentifier } from "@warp-drive/core/types";
|
|
6
5
|
import type { Cache } from "@warp-drive/core/types/cache";
|
|
7
6
|
import type { CollectionRelationship } from "@warp-drive/core/types/cache/relationship";
|
|
@@ -24,24 +23,24 @@ export declare class LegacySupport {
|
|
|
24
23
|
cache: Cache;
|
|
25
24
|
references: Record<string, BelongsToReference | HasManyReference>;
|
|
26
25
|
identifier: StableRecordIdentifier;
|
|
27
|
-
_manyArrayCache: Record<string,
|
|
28
|
-
_relationshipPromisesCache: Record<string, Promise<
|
|
26
|
+
_manyArrayCache: Record<string, LegacyManyArray>;
|
|
27
|
+
_relationshipPromisesCache: Record<string, Promise<LegacyManyArray | OpaqueRecordInstance>>;
|
|
29
28
|
_relationshipProxyCache: Record<string, PromiseManyArray | PromiseBelongsTo | undefined>;
|
|
30
29
|
_pending: Record<string, Promise<StableRecordIdentifier | null> | undefined>;
|
|
31
30
|
isDestroying: boolean;
|
|
32
31
|
isDestroyed: boolean;
|
|
33
|
-
constructor(record: MinimalLegacyRecord);
|
|
34
|
-
_syncArray(array:
|
|
32
|
+
constructor(record: MinimalLegacyRecord, identifier: StableRecordIdentifier);
|
|
33
|
+
_syncArray(array: LegacyManyArray): void;
|
|
35
34
|
mutate(mutation: LocalRelationshipOperation): void;
|
|
36
35
|
_findBelongsTo(key: string, resource: SingleResourceRelationship, relationship: ResourceEdge, options?: BaseFinderOptions): Promise<OpaqueRecordInstance | null>;
|
|
37
36
|
reloadBelongsTo(key: string, options?: BaseFinderOptions): Promise<OpaqueRecordInstance | null>;
|
|
38
37
|
getBelongsTo(key: string, options?: BaseFinderOptions): PromiseBelongsTo | OpaqueRecordInstance | null;
|
|
39
38
|
setDirtyBelongsTo(key: string, value: OpaqueRecordInstance | null): void;
|
|
40
39
|
_getCurrentState<T>(identifier: StableRecordIdentifier, field: string): [StableRecordIdentifier<TypeFromInstanceOrString<T>>[], CollectionRelationship];
|
|
41
|
-
getManyArray<T>(key: string, definition?: UpgradedMeta):
|
|
42
|
-
fetchAsyncHasMany(key: string, relationship: CollectionEdge, manyArray:
|
|
43
|
-
reloadHasMany<T>(key: string, options?: BaseFinderOptions): Promise<
|
|
44
|
-
getHasMany(key: string, options?: BaseFinderOptions): PromiseManyArray |
|
|
40
|
+
getManyArray<T>(key: string, definition?: UpgradedMeta): LegacyManyArray<T>;
|
|
41
|
+
fetchAsyncHasMany(key: string, relationship: CollectionEdge, manyArray: LegacyManyArray, options?: BaseFinderOptions): Promise<LegacyManyArray>;
|
|
42
|
+
reloadHasMany<T>(key: string, options?: BaseFinderOptions): Promise<LegacyManyArray<T>> | PromiseManyArray<T>;
|
|
43
|
+
getHasMany(key: string, options?: BaseFinderOptions): PromiseManyArray | LegacyManyArray;
|
|
45
44
|
_updatePromiseProxyFor(kind: "hasMany", key: string, args: HasManyProxyCreateArgs): PromiseManyArray;
|
|
46
45
|
_updatePromiseProxyFor(kind: "belongsTo", key: string, args: BelongsToProxyCreateArgs): PromiseBelongsTo;
|
|
47
46
|
_updatePromiseProxyFor(kind: "belongsTo", key: string, args: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { type MinimalLegacyRecord } from "./-private/model-methods.js";
|
|
2
2
|
export type { ModelStore } from "./-private/model.js";
|
|
3
3
|
export { Errors } from "./-private/errors.js";
|
|
4
|
-
export {
|
|
4
|
+
export type { LegacyManyArray as ManyArray } from "@warp-drive/core/store/-private";
|
|
5
5
|
export { PromiseBelongsTo } from "./-private/promise-belongs-to.js";
|
|
6
6
|
export { PromiseManyArray } from "./-private/promise-many-array.js";
|
|
7
7
|
// // Used by tests, migration support
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Context } from '@warp-drive/core/reactive/-private';
|
|
2
2
|
import { warn } from '@ember/debug';
|
|
3
3
|
import { createDeferred } from '@warp-drive/core/request';
|
|
4
|
+
import { waitFor, coerceId } from '@warp-drive/core/store/-private';
|
|
4
5
|
import { getOrSetGlobal } from '@warp-drive/core/types/-private';
|
|
5
6
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
6
7
|
|
|
@@ -139,7 +140,7 @@ class SnapshotRecordArray {
|
|
|
139
140
|
const {
|
|
140
141
|
_fetchManager
|
|
141
142
|
} = this.__store;
|
|
142
|
-
this._snapshots = this._recordArray[
|
|
143
|
+
this._snapshots = this._recordArray[Context].source.map(identifier => _fetchManager.createSnapshot(identifier));
|
|
143
144
|
return this._snapshots;
|
|
144
145
|
}
|
|
145
146
|
}
|
package/dist/adapter/-private.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { d as determineBodyPromise, g as fetch, p as parseResponseHeaders, b as serializeIntoHash, s as serializeQueryParams, a as setupFastboot } from "../serialize-into-hash-
|
|
1
|
+
export { d as determineBodyPromise, g as fetch, p as parseResponseHeaders, b as serializeIntoHash, s as serializeQueryParams, a as setupFastboot } from "../serialize-into-hash-BJjGi7jB.js";
|
package/dist/adapter/json-api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { dasherize, pluralize } from '@warp-drive/utilities/string';
|
|
2
2
|
import '@ember/debug';
|
|
3
3
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
4
|
-
import { b as serializeIntoHash } from "../serialize-into-hash-
|
|
4
|
+
import { b as serializeIntoHash } from "../serialize-into-hash-BJjGi7jB.js";
|
|
5
5
|
import { RESTAdapter } from './rest.js';
|
|
6
6
|
class JSONAPIAdapter extends RESTAdapter {
|
|
7
7
|
_defaultContentType = 'application/vnd.api+json';
|
package/dist/adapter/rest.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getOwner } from '@ember/application';
|
|
|
2
2
|
import { warn } from '@ember/debug';
|
|
3
3
|
import { computed } from '@ember/object';
|
|
4
4
|
import { Adapter, BuildURLMixin } from '../adapter.js';
|
|
5
|
-
import { b as serializeIntoHash, d as determineBodyPromise, g as getFetchFunction, s as serializeQueryParams, p as parseResponseHeaders } from "../serialize-into-hash-
|
|
5
|
+
import { b as serializeIntoHash, d as determineBodyPromise, g as getFetchFunction, s as serializeQueryParams, p as parseResponseHeaders } from "../serialize-into-hash-BJjGi7jB.js";
|
|
6
6
|
import { InvalidError, ServerError, ConflictError, NotFoundError, ForbiddenError, UnauthorizedError, AdapterError, TimeoutError, AbortError } from './error.js';
|
|
7
7
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
8
8
|
import { d as decorateMethodV2 } from "../runtime-BPCpkOf1-BKOwiRJp.js";
|
package/dist/compat/-private.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { F as FetchManager, S as SaveOp, c as Snapshot, b as SnapshotRecordArray, u as upgradeStore } from "../-private-
|
|
1
|
+
export { F as FetchManager, S as SaveOp, c as Snapshot, b as SnapshotRecordArray, u as upgradeStore } from "../-private-DGArz5W5.js";
|
package/dist/compat.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { getOwner } from '@ember/application';
|
|
2
2
|
import { recordIdentifierFor } from '@warp-drive/core';
|
|
3
3
|
import { waitFor, _deprecatingNormalize } from '@warp-drive/core/store/-private';
|
|
4
|
-
import
|
|
4
|
+
import '@warp-drive/core/reactive/-private';
|
|
5
|
+
import { p as payloadIsNotBlank, n as normalizeResponseHelper, i as iterateData, F as FetchManager, S as SaveOp, a as assertIdentifierHasId, b as SnapshotRecordArray } from "./-private-DGArz5W5.js";
|
|
5
6
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
6
7
|
function _findHasMany(adapter, store, identifier, link, relationship, options) {
|
|
7
8
|
const promise = Promise.resolve().then(() => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Context } from '@warp-drive/core/reactive/-private';
|
|
2
|
+
import { memoized, defineSignal, defineNonEnumerableSignal, isStableIdentifier, recordIdentifierFor, storeFor, fastPush, createLegacyManyArray, notifyInternalSignal } from '@warp-drive/core/store/-private';
|
|
2
3
|
import { getOrSetGlobal } from '@warp-drive/core/types/-private';
|
|
3
4
|
import { EnableHydration } from '@warp-drive/core/types/request';
|
|
4
|
-
import { u as upgradeStore } from "./-private-
|
|
5
|
+
import { u as upgradeStore } from "./-private-DGArz5W5.js";
|
|
5
6
|
import { computed, get } from '@ember/object';
|
|
6
7
|
import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
|
|
7
8
|
import ObjectProxy from '@ember/object/proxy';
|
|
@@ -1508,17 +1509,16 @@ function lookupLegacySupport(record) {
|
|
|
1508
1509
|
throw new Error(`Memory Leak Detected`);
|
|
1509
1510
|
}
|
|
1510
1511
|
})(!record.isDestroyed && !record.isDestroying) : {};
|
|
1511
|
-
support = new LegacySupport(record);
|
|
1512
|
+
support = new LegacySupport(record, identifier);
|
|
1512
1513
|
LEGACY_SUPPORT.set(identifier, support);
|
|
1513
|
-
LEGACY_SUPPORT.set(record, support);
|
|
1514
1514
|
}
|
|
1515
1515
|
return support;
|
|
1516
1516
|
}
|
|
1517
1517
|
class LegacySupport {
|
|
1518
|
-
constructor(record) {
|
|
1518
|
+
constructor(record, identifier) {
|
|
1519
1519
|
this.record = record;
|
|
1520
1520
|
this.store = storeFor(record, false);
|
|
1521
|
-
this.identifier =
|
|
1521
|
+
this.identifier = identifier;
|
|
1522
1522
|
this.cache = this.store.cache;
|
|
1523
1523
|
if (this.store._graph) {
|
|
1524
1524
|
this.graph = this.store._graph;
|
|
@@ -1534,7 +1534,7 @@ class LegacySupport {
|
|
|
1534
1534
|
if (this.isDestroyed || this.isDestroying) {
|
|
1535
1535
|
return;
|
|
1536
1536
|
}
|
|
1537
|
-
const currentState = array[
|
|
1537
|
+
const currentState = array[Context].source;
|
|
1538
1538
|
const identifier = this.identifier;
|
|
1539
1539
|
const [identifiers, jsonApi] = this._getCurrentState(identifier, array.key);
|
|
1540
1540
|
if (jsonApi.meta) {
|
|
@@ -1664,23 +1664,20 @@ class LegacySupport {
|
|
|
1664
1664
|
}
|
|
1665
1665
|
if (!manyArray) {
|
|
1666
1666
|
const [identifiers, doc] = this._getCurrentState(this.identifier, key);
|
|
1667
|
-
manyArray =
|
|
1667
|
+
manyArray = createLegacyManyArray({
|
|
1668
1668
|
store: this.store,
|
|
1669
|
-
type: definition.type,
|
|
1670
|
-
identifier: this.identifier,
|
|
1671
|
-
cache: this.cache,
|
|
1672
|
-
field: this.store.schema.fields(this.identifier).get(key),
|
|
1673
|
-
identifiers,
|
|
1674
|
-
key,
|
|
1675
|
-
meta: doc.meta || null,
|
|
1676
|
-
links: doc.links || null,
|
|
1677
|
-
isPolymorphic: definition.isPolymorphic,
|
|
1678
|
-
isAsync: definition.isAsync,
|
|
1679
|
-
_inverseIsAsync: definition.inverseIsAsync,
|
|
1680
1669
|
// @ts-expect-error Typescript doesn't have a way for us to thread the generic backwards so it infers unknown instead of T
|
|
1681
1670
|
manager: this,
|
|
1671
|
+
source: identifiers,
|
|
1672
|
+
type: definition.type,
|
|
1682
1673
|
isLoaded: !definition.isAsync,
|
|
1683
|
-
|
|
1674
|
+
editable: true,
|
|
1675
|
+
isAsync: definition.isAsync,
|
|
1676
|
+
isPolymorphic: definition.isPolymorphic,
|
|
1677
|
+
field: this.store.schema.fields(this.identifier).get(key),
|
|
1678
|
+
identifier: this.identifier,
|
|
1679
|
+
links: doc.links || null,
|
|
1680
|
+
meta: doc.meta || null
|
|
1684
1681
|
});
|
|
1685
1682
|
this._manyArrayCache[key] = manyArray;
|
|
1686
1683
|
}
|
|
@@ -2104,7 +2101,7 @@ function handleCompletedRelationshipRequest(recordExt, key, relationship, value,
|
|
|
2104
2101
|
if (isHasMany) {
|
|
2105
2102
|
// we don't notify the record property here to avoid refetch
|
|
2106
2103
|
// only the many array
|
|
2107
|
-
notifyInternalSignal(value[
|
|
2104
|
+
notifyInternalSignal(value[Context].signal);
|
|
2108
2105
|
}
|
|
2109
2106
|
if (error) {
|
|
2110
2107
|
relationship.state.hasFailedLoadAttempt = true;
|
package/dist/model/-private.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { E as Errors, L as LEGACY_SUPPORT, P as PromiseBelongsTo, a as PromiseManyArray, l as lookupLegacySupport } from "../errors-
|
|
2
|
-
export { RelatedCollection as ManyArray } from '@warp-drive/core/store/-private';
|
|
1
|
+
export { E as Errors, L as LEGACY_SUPPORT, P as PromiseBelongsTo, a as PromiseManyArray, l as lookupLegacySupport } from "../errors-CI53ie90.js";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { deprecate } from '@ember/debug';
|
|
2
2
|
import { recordIdentifierFor } from '@warp-drive/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Context } from '@warp-drive/core/reactive/-private';
|
|
4
|
+
import { notifyInternalSignal } from '@warp-drive/core/store/-private';
|
|
4
5
|
import { getOrSetGlobal } from '@warp-drive/core/types/-private';
|
|
5
6
|
import { Type } from '@warp-drive/core/types/symbols';
|
|
6
|
-
import { l as lookupLegacySupport, E as Errors } from "../errors-
|
|
7
|
-
import { b as buildSchema, u as unloadRecord, s as serialize, _ as _save, a as save, r as rollbackAttributes, c as _reload, d as reload, h as hasMany, e as _destroyRecord, f as destroyRecord, g as deleteRecord, R as RecordState, i as changedAttributes, j as belongsTo, k as createSnapshot } from "../schema-provider-
|
|
7
|
+
import { l as lookupLegacySupport, E as Errors } from "../errors-CI53ie90.js";
|
|
8
|
+
import { b as buildSchema, u as unloadRecord, s as serialize, _ as _save, a as save, r as rollbackAttributes, c as _reload, d as reload, h as hasMany, e as _destroyRecord, f as destroyRecord, g as deleteRecord, R as RecordState, i as changedAttributes, j as belongsTo, k as createSnapshot } from "../schema-provider-keKLiu7p.js";
|
|
8
9
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -344,7 +345,7 @@ function registerDerivations(schema) {
|
|
|
344
345
|
return false;
|
|
345
346
|
}
|
|
346
347
|
if (manyArray) {
|
|
347
|
-
notifyInternalSignal(manyArray[
|
|
348
|
+
notifyInternalSignal(manyArray[Context].signal);
|
|
348
349
|
return true;
|
|
349
350
|
}
|
|
350
351
|
return false;
|
package/dist/model.js
CHANGED
|
@@ -4,10 +4,10 @@ import { RecordStore } from '@warp-drive/core/types/symbols';
|
|
|
4
4
|
import { i as isElementDescriptor, n as normalizeModelName } from "./util-Dul6TZts.js";
|
|
5
5
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
6
6
|
import { warn, deprecate } from '@ember/debug';
|
|
7
|
-
import { l as lookupLegacySupport } from "./errors-
|
|
7
|
+
import { l as lookupLegacySupport } from "./errors-CI53ie90.js";
|
|
8
8
|
import { singularize, dasherize } from '@warp-drive/utilities/string';
|
|
9
|
-
import { l as getModelFactory } from "./schema-provider-
|
|
10
|
-
export { M as Model, b as buildSchema, M as default, m as restoreDeprecatedModelRequestBehaviors } from "./schema-provider-
|
|
9
|
+
import { l as getModelFactory } from "./schema-provider-keKLiu7p.js";
|
|
10
|
+
export { M as Model, b as buildSchema, M as default, m as restoreDeprecatedModelRequestBehaviors } from "./schema-provider-keKLiu7p.js";
|
|
11
11
|
import { setOwner, getOwner } from '@ember/application';
|
|
12
12
|
import { setRecordIdentifier, StoreMap } from '@warp-drive/core/store/-private';
|
|
13
13
|
function _attr(type, options) {
|
|
@@ -2,12 +2,13 @@ import { getOwner } from '@ember/application';
|
|
|
2
2
|
import { deprecate } from '@ember/debug';
|
|
3
3
|
import EmberObject from '@ember/object';
|
|
4
4
|
import { recordIdentifierFor, storeFor } from '@warp-drive/core';
|
|
5
|
-
import { notifyInternalSignal, peekInternalSignal, withSignalStore,
|
|
5
|
+
import { notifyInternalSignal, peekInternalSignal, withSignalStore, recordIdentifierFor as recordIdentifierFor$1, gate, memoized, defineSignal, coerceId, entangleSignal, defineGate } from '@warp-drive/core/store/-private';
|
|
6
6
|
import { RecordStore } from '@warp-drive/core/types/symbols';
|
|
7
|
-
import { l as lookupLegacySupport, L as LEGACY_SUPPORT, E as Errors } from "./errors-
|
|
8
|
-
import { u as upgradeStore, F as FetchManager } from "./-private-
|
|
7
|
+
import { l as lookupLegacySupport, L as LEGACY_SUPPORT, E as Errors } from "./errors-CI53ie90.js";
|
|
8
|
+
import { u as upgradeStore, F as FetchManager } from "./-private-DGArz5W5.js";
|
|
9
9
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
10
10
|
import { cacheFor } from '@ember/object/internals';
|
|
11
|
+
import { Context } from '@warp-drive/core/reactive/-private';
|
|
11
12
|
import { d as decorateMethodV2 } from "./runtime-BPCpkOf1-BKOwiRJp.js";
|
|
12
13
|
import { n as normalizeModelName } from "./util-Dul6TZts.js";
|
|
13
14
|
function rollbackAttributes() {
|
|
@@ -216,7 +217,7 @@ function notifyRelationship(identifier, key, record, meta) {
|
|
|
216
217
|
return;
|
|
217
218
|
}
|
|
218
219
|
if (manyArray) {
|
|
219
|
-
notifyInternalSignal(manyArray[
|
|
220
|
+
notifyInternalSignal(manyArray[Context].signal);
|
|
220
221
|
|
|
221
222
|
//We need to notifyPropertyChange in the adding case because we need to make sure
|
|
222
223
|
//we fetch the newly added record in case it is unloaded
|
|
@@ -736,9 +737,11 @@ class Model extends EmberObject {
|
|
|
736
737
|
this.___recordState?.destroy();
|
|
737
738
|
const store = storeFor(this, false);
|
|
738
739
|
store.notifications.unsubscribe(this.___private_notifications);
|
|
739
|
-
LEGACY_SUPPORT.get(
|
|
740
|
-
|
|
741
|
-
|
|
740
|
+
const support = LEGACY_SUPPORT.get(identifier);
|
|
741
|
+
if (support) {
|
|
742
|
+
support.destroy();
|
|
743
|
+
LEGACY_SUPPORT.delete(identifier);
|
|
744
|
+
}
|
|
742
745
|
super.destroy();
|
|
743
746
|
}
|
|
744
747
|
|
|
@@ -1035,7 +1038,7 @@ class Model extends EmberObject {
|
|
|
1035
1038
|
})(!didChange || identifier.id === null) : {};
|
|
1036
1039
|
if (normalizedId !== null && didChange) {
|
|
1037
1040
|
this.store._instanceCache.setRecordId(identifier, normalizedId);
|
|
1038
|
-
this.store.notifications.notify(identifier, 'identity');
|
|
1041
|
+
this.store.notifications.notify(identifier, 'identity', null);
|
|
1039
1042
|
}
|
|
1040
1043
|
}
|
|
1041
1044
|
toString() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { warn } from '@ember/debug';
|
|
2
2
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
3
|
-
import '@warp-drive/core/
|
|
4
|
-
import "./-private-
|
|
3
|
+
import '@warp-drive/core/reactive/-private';
|
|
4
|
+
import "./-private-DGArz5W5.js";
|
|
5
5
|
const newline = /\r?\n/;
|
|
6
6
|
function parseResponseHeaders(headersString) {
|
|
7
7
|
const headers = Object.create(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warp-drive/legacy",
|
|
3
|
-
"version": "5.7.0-alpha.
|
|
3
|
+
"version": "5.7.0-alpha.14",
|
|
4
4
|
"description": "Decommissioned Packages for WarpDrive | Things your app might still want to maintain use of for a little longer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@warp-drive/core": "5.7.0-alpha.
|
|
36
|
-
"@warp-drive/utilities": "5.7.0-alpha.
|
|
35
|
+
"@warp-drive/core": "5.7.0-alpha.14",
|
|
36
|
+
"@warp-drive/utilities": "5.7.0-alpha.14"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@embroider/macros": "^1.16.12"
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"@babel/plugin-transform-typescript": "^7.27.0",
|
|
44
44
|
"@babel/preset-typescript": "^7.27.0",
|
|
45
45
|
"@types/jquery": "^3.5.32",
|
|
46
|
-
"@warp-drive/internal-config": "5.7.0-alpha.
|
|
47
|
-
"@warp-drive/core": "5.7.0-alpha.
|
|
48
|
-
"@warp-drive/utilities": "5.7.0-alpha.
|
|
46
|
+
"@warp-drive/internal-config": "5.7.0-alpha.14",
|
|
47
|
+
"@warp-drive/core": "5.7.0-alpha.14",
|
|
48
|
+
"@warp-drive/utilities": "5.7.0-alpha.14",
|
|
49
49
|
"ember-source": "~6.3.0",
|
|
50
50
|
"decorator-transforms": "^2.3.0",
|
|
51
51
|
"expect-type": "^1.2.1",
|