@warp-drive/legacy 5.7.0-alpha.30 → 5.7.0-alpha.32
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/snapshot.d.ts +0 -7
- package/declarations/model/-private/legacy-relationships-support.d.ts +4 -7
- package/declarations/model/-private/schema-provider.d.ts +0 -4
- package/dist/{-private-HaYCdCCm.js → -private-8UmnAf9J.js} +14 -0
- 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 +1 -1
- package/dist/{errors-BMZPmFxm.js → errors-8kD2mSe_.js} +21 -1
- package/dist/model/-private.js +1 -1
- package/dist/model/migration-support.js +2 -2
- package/dist/model.js +3 -3
- package/dist/{schema-provider-Dhk-879f.js → schema-provider-DQu4Rjco.js} +9 -2
- package/dist/{serialize-into-hash-Ceon-MrI.js → serialize-into-hash-CS0MIv4F.js} +1 -1
- package/package.json +6 -6
|
@@ -21,13 +21,6 @@ the cache or off the record directly.
|
|
|
21
21
|
@public
|
|
22
22
|
*/
|
|
23
23
|
export declare class Snapshot<R = unknown> {
|
|
24
|
-
private __attributes;
|
|
25
|
-
private _belongsToRelationships;
|
|
26
|
-
private _belongsToIds;
|
|
27
|
-
private _hasManyRelationships;
|
|
28
|
-
private _hasManyIds;
|
|
29
|
-
private _changedAttributes;
|
|
30
|
-
private _store;
|
|
31
24
|
/**
|
|
32
25
|
The unique ResourceKey associated with this Snapshot.
|
|
33
26
|
|
|
@@ -15,16 +15,13 @@ import BelongsToReference from "./references/belongs-to.js";
|
|
|
15
15
|
import HasManyReference from "./references/has-many.js";
|
|
16
16
|
export declare const LEGACY_SUPPORT: Map<ResourceKey | MinimalLegacyRecord, LegacySupport>;
|
|
17
17
|
export declare function lookupLegacySupport(record: MinimalLegacyRecord): LegacySupport;
|
|
18
|
+
/**
|
|
19
|
+
* @hideconstructor
|
|
20
|
+
*/
|
|
18
21
|
export declare class LegacySupport {
|
|
19
|
-
private record;
|
|
20
|
-
private graph;
|
|
21
|
-
private cache;
|
|
22
|
-
private references;
|
|
23
22
|
identifier: ResourceKey;
|
|
24
|
-
private _pending;
|
|
25
|
-
private isDestroying;
|
|
26
|
-
private isDestroyed;
|
|
27
23
|
constructor(record: MinimalLegacyRecord, identifier: ResourceKey);
|
|
24
|
+
/** @private */
|
|
28
25
|
_syncArray(array: LegacyManyArray): void;
|
|
29
26
|
mutate(mutation: LocalRelationshipOperation): void;
|
|
30
27
|
_findBelongsTo(key: string, resource: SingleResourceRelationship, relationship: ResourceEdge, options?: BaseFinderOptions): Promise<OpaqueRecordInstance | null>;
|
|
@@ -17,9 +17,6 @@ export interface ModelSchemaProvider {
|
|
|
17
17
|
doesTypeExist(type: string): boolean;
|
|
18
18
|
}
|
|
19
19
|
export declare class ModelSchemaProvider implements SchemaService {
|
|
20
|
-
private store;
|
|
21
|
-
private _schemas;
|
|
22
|
-
private _typeMisses;
|
|
23
20
|
constructor(store: ModelStore);
|
|
24
21
|
resourceTypes(): Readonly<string[]>;
|
|
25
22
|
hasTrait(type: string): boolean;
|
|
@@ -47,7 +44,6 @@ export declare class ModelSchemaProvider implements SchemaService {
|
|
|
47
44
|
FM extends ObjectValue | null
|
|
48
45
|
>(derivation: Derivation<R, T, FM>): void;
|
|
49
46
|
registerHashFn(hashFn: HashFn): void;
|
|
50
|
-
private _loadModelSchema;
|
|
51
47
|
fields(resource: ResourceKey | {
|
|
52
48
|
type: string;
|
|
53
49
|
}): Map<string, LegacyField>;
|
|
@@ -237,6 +237,20 @@ function normalizeResponseHelper(serializer, store, modelClass, payload, id, req
|
|
|
237
237
|
@public
|
|
238
238
|
*/
|
|
239
239
|
class Snapshot {
|
|
240
|
+
/** @internal */
|
|
241
|
+
|
|
242
|
+
/** @internal */
|
|
243
|
+
|
|
244
|
+
/** @internal */
|
|
245
|
+
|
|
246
|
+
/** @internal */
|
|
247
|
+
|
|
248
|
+
/** @internal */
|
|
249
|
+
|
|
250
|
+
/** @internal */
|
|
251
|
+
|
|
252
|
+
/** @internal */
|
|
253
|
+
|
|
240
254
|
/**
|
|
241
255
|
The unique ResourceKey associated with this Snapshot.
|
|
242
256
|
@public
|
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-CS0MIv4F.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-CS0MIv4F.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-CS0MIv4F.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-8UmnAf9J.js";
|
package/dist/compat.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getOwner } from '@ember/application';
|
|
|
2
2
|
import { recordIdentifierFor } from '@warp-drive/core';
|
|
3
3
|
import { assertPrivateStore, waitFor, _deprecatingNormalize } from '@warp-drive/core/store/-private';
|
|
4
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-
|
|
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-8UmnAf9J.js";
|
|
6
6
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
7
7
|
function _findHasMany(adapter, store, identifier, link, relationship, options) {
|
|
8
8
|
const promise = Promise.resolve().then(() => {
|
|
@@ -2,7 +2,7 @@ import { Context } from '@warp-drive/core/reactive/-private';
|
|
|
2
2
|
import { memoized, defineSignal, assertPrivateStore, defineNonEnumerableSignal, isResourceKey, recordIdentifierFor, isPrivateStore, storeFor, fastPush, createLegacyManyArray, notifyInternalSignal } from '@warp-drive/core/store/-private';
|
|
3
3
|
import { getOrSetGlobal } from '@warp-drive/core/types/-private';
|
|
4
4
|
import { EnableHydration } from '@warp-drive/core/types/request';
|
|
5
|
-
import { u as upgradeStore } from "./-private-
|
|
5
|
+
import { u as upgradeStore } from "./-private-8UmnAf9J.js";
|
|
6
6
|
import { computed, get } from '@ember/object';
|
|
7
7
|
import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
|
|
8
8
|
import ObjectProxy from '@ember/object/proxy';
|
|
@@ -1517,6 +1517,10 @@ function lookupLegacySupport(record) {
|
|
|
1517
1517
|
}
|
|
1518
1518
|
return support;
|
|
1519
1519
|
}
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* @hideconstructor
|
|
1523
|
+
*/
|
|
1520
1524
|
class LegacySupport {
|
|
1521
1525
|
/** @internal */
|
|
1522
1526
|
|
|
@@ -1526,6 +1530,20 @@ class LegacySupport {
|
|
|
1526
1530
|
|
|
1527
1531
|
/** @internal */
|
|
1528
1532
|
|
|
1533
|
+
/** @internal */
|
|
1534
|
+
|
|
1535
|
+
/** @internal */
|
|
1536
|
+
|
|
1537
|
+
/** @internal */
|
|
1538
|
+
|
|
1539
|
+
/** @internal */
|
|
1540
|
+
|
|
1541
|
+
/** @internal */
|
|
1542
|
+
|
|
1543
|
+
/** @internal */
|
|
1544
|
+
|
|
1545
|
+
/** @internal */
|
|
1546
|
+
|
|
1529
1547
|
constructor(record, identifier) {
|
|
1530
1548
|
this.record = record;
|
|
1531
1549
|
this.store = isPrivateStore(storeFor(record, false));
|
|
@@ -1540,6 +1558,8 @@ class LegacySupport {
|
|
|
1540
1558
|
this._pending = Object.create(null);
|
|
1541
1559
|
this.references = Object.create(null);
|
|
1542
1560
|
}
|
|
1561
|
+
|
|
1562
|
+
/** @private */
|
|
1543
1563
|
_syncArray(array) {
|
|
1544
1564
|
// It’s possible the parent side of the relationship may have been destroyed by this point
|
|
1545
1565
|
if (this.isDestroyed || this.isDestroying) {
|
package/dist/model/-private.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { E as Errors, L as LEGACY_SUPPORT, P as PromiseBelongsTo, a as PromiseManyArray, l as lookupLegacySupport } from "../errors-
|
|
1
|
+
export { E as Errors, L as LEGACY_SUPPORT, P as PromiseBelongsTo, a as PromiseManyArray, l as lookupLegacySupport } from "../errors-8kD2mSe_.js";
|
|
@@ -4,8 +4,8 @@ import { Context } from '@warp-drive/core/reactive/-private';
|
|
|
4
4
|
import { notifyInternalSignal, assertPrivateStore } from '@warp-drive/core/store/-private';
|
|
5
5
|
import { getOrSetGlobal } from '@warp-drive/core/types/-private';
|
|
6
6
|
import { Type } from '@warp-drive/core/types/symbols';
|
|
7
|
-
import { l as lookupLegacySupport, E as Errors } from "../errors-
|
|
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-
|
|
7
|
+
import { l as lookupLegacySupport, E as Errors } from "../errors-8kD2mSe_.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-DQu4Rjco.js";
|
|
9
9
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/model.js
CHANGED
|
@@ -5,10 +5,10 @@ import { i as isElementDescriptor, n as normalizeModelName } from "./util-Dul6TZ
|
|
|
5
5
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
6
6
|
import { warn, deprecate } from '@ember/debug';
|
|
7
7
|
import { assertPrivateStore, setRecordIdentifier, StoreMap } from '@warp-drive/core/store/-private';
|
|
8
|
-
import { l as lookupLegacySupport } from "./errors-
|
|
8
|
+
import { l as lookupLegacySupport } from "./errors-8kD2mSe_.js";
|
|
9
9
|
import { singularize, dasherize } from '@warp-drive/utilities/string';
|
|
10
|
-
import { l as getModelFactory } from "./schema-provider-
|
|
11
|
-
export { M as Model, b as buildSchema, M as default, m as restoreDeprecatedModelRequestBehaviors } from "./schema-provider-
|
|
10
|
+
import { l as getModelFactory } from "./schema-provider-DQu4Rjco.js";
|
|
11
|
+
export { M as Model, b as buildSchema, M as default, m as restoreDeprecatedModelRequestBehaviors } from "./schema-provider-DQu4Rjco.js";
|
|
12
12
|
import { setOwner, getOwner } from '@ember/application';
|
|
13
13
|
function _attr(type, options) {
|
|
14
14
|
if (typeof type === 'object') {
|
|
@@ -4,8 +4,8 @@ import EmberObject from '@ember/object';
|
|
|
4
4
|
import { recordIdentifierFor, storeFor } from '@warp-drive/core';
|
|
5
5
|
import { assertPrivateStore, 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-8kD2mSe_.js";
|
|
8
|
+
import { u as upgradeStore, F as FetchManager } from "./-private-8UmnAf9J.js";
|
|
9
9
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
10
10
|
import { cacheFor } from '@ember/object/internals';
|
|
11
11
|
import { Context } from '@warp-drive/core/reactive/-private';
|
|
@@ -2097,6 +2097,12 @@ function modelForMixin(store, normalizedModelName) {
|
|
|
2097
2097
|
return owner.factoryFor(`model:${normalizedModelName}`);
|
|
2098
2098
|
}
|
|
2099
2099
|
class ModelSchemaProvider {
|
|
2100
|
+
/** @internal */
|
|
2101
|
+
|
|
2102
|
+
/** @internal */
|
|
2103
|
+
|
|
2104
|
+
/** @internal */
|
|
2105
|
+
|
|
2100
2106
|
constructor(store) {
|
|
2101
2107
|
this.store = store;
|
|
2102
2108
|
this._schemas = new Map();
|
|
@@ -2184,6 +2190,7 @@ class ModelSchemaProvider {
|
|
|
2184
2190
|
}
|
|
2185
2191
|
})() : {};
|
|
2186
2192
|
}
|
|
2193
|
+
/** @internal */
|
|
2187
2194
|
_loadModelSchema(type) {
|
|
2188
2195
|
const modelClass = this.store.modelFor(type);
|
|
2189
2196
|
const attributeMap = modelClass.attributes;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { warn } from '@ember/debug';
|
|
2
2
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
3
3
|
import '@warp-drive/core/reactive/-private';
|
|
4
|
-
import "./-private-
|
|
4
|
+
import "./-private-8UmnAf9J.js";
|
|
5
5
|
import '@warp-drive/core/store/-private';
|
|
6
6
|
const newline = /\r?\n/;
|
|
7
7
|
function parseResponseHeaders(headersString) {
|
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.32",
|
|
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.32",
|
|
36
|
+
"@warp-drive/utilities": "5.7.0-alpha.32"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@embroider/macros": "^1.18.1"
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"@babel/plugin-transform-typescript": "^7.28.0",
|
|
44
44
|
"@babel/preset-typescript": "^7.27.1",
|
|
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.32",
|
|
47
|
+
"@warp-drive/core": "5.7.0-alpha.32",
|
|
48
|
+
"@warp-drive/utilities": "5.7.0-alpha.32",
|
|
49
49
|
"ember-source": "~6.6.0",
|
|
50
50
|
"decorator-transforms": "^2.3.0",
|
|
51
51
|
"expect-type": "^1.2.1",
|