@ember-data/model 4.12.8 → 4.13.0-alpha.1
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/README.md +19 -0
- package/addon-main.cjs +5 -0
- package/blueprints/model/index.js +18 -5
- package/blueprints/model-test/index.js +16 -10
- package/blueprints/model-test/qunit-files/__root__/__path__/__test__.js +4 -5
- package/dist/-private.js +2 -0
- package/dist/-private.js.map +1 -0
- package/dist/has-many-CshPdrqR.js +842 -0
- package/dist/has-many-CshPdrqR.js.map +1 -0
- package/dist/hooks-DCYCaSEL.js +75 -0
- package/dist/hooks-DCYCaSEL.js.map +1 -0
- package/dist/hooks.js +2 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.js +4 -0
- package/{addon → dist}/index.js.map +1 -1
- package/{addon/has-many-d45aa09e.js → dist/legacy-relationships-support-D5m0xTYg.js} +5532 -5533
- package/dist/legacy-relationships-support-D5m0xTYg.js.map +1 -0
- package/dist/migration-support.js +210 -0
- package/dist/migration-support.js.map +1 -0
- package/dist/schema-provider-m94yB7iS.js +294 -0
- package/dist/schema-provider-m94yB7iS.js.map +1 -0
- package/ember-data-logo-dark.svg +12 -0
- package/ember-data-logo-light.svg +12 -0
- package/package.json +78 -44
- package/unstable-preview-types/-private/attr.d.ts +175 -0
- package/unstable-preview-types/-private/attr.d.ts.map +1 -0
- package/unstable-preview-types/-private/attr.type-test.d.ts +4 -0
- package/unstable-preview-types/-private/attr.type-test.d.ts.map +1 -0
- package/unstable-preview-types/-private/belongs-to.d.ts +180 -0
- package/unstable-preview-types/-private/belongs-to.d.ts.map +1 -0
- package/unstable-preview-types/-private/belongs-to.type-test.d.ts +4 -0
- package/unstable-preview-types/-private/belongs-to.type-test.d.ts.map +1 -0
- package/unstable-preview-types/-private/debug/assert-polymorphic-type.d.ts +8 -0
- package/unstable-preview-types/-private/debug/assert-polymorphic-type.d.ts.map +1 -0
- package/unstable-preview-types/-private/deprecated-promise-proxy.d.ts +5 -0
- package/unstable-preview-types/-private/deprecated-promise-proxy.d.ts.map +1 -0
- package/unstable-preview-types/-private/errors.d.ts +303 -0
- package/unstable-preview-types/-private/errors.d.ts.map +1 -0
- package/unstable-preview-types/-private/has-many.d.ts +169 -0
- package/unstable-preview-types/-private/has-many.d.ts.map +1 -0
- package/unstable-preview-types/-private/has-many.type-test.d.ts +4 -0
- package/unstable-preview-types/-private/has-many.type-test.d.ts.map +1 -0
- package/unstable-preview-types/-private/hooks.d.ts +13 -0
- package/unstable-preview-types/-private/hooks.d.ts.map +1 -0
- package/unstable-preview-types/-private/legacy-relationships-support.d.ts +60 -0
- package/unstable-preview-types/-private/legacy-relationships-support.d.ts.map +1 -0
- package/unstable-preview-types/-private/many-array.d.ts +196 -0
- package/unstable-preview-types/-private/many-array.d.ts.map +1 -0
- package/unstable-preview-types/-private/model-for-mixin.d.ts +6 -0
- package/unstable-preview-types/-private/model-for-mixin.d.ts.map +1 -0
- package/unstable-preview-types/-private/model-methods.d.ts +37 -0
- package/unstable-preview-types/-private/model-methods.d.ts.map +1 -0
- package/unstable-preview-types/-private/model.d.ts +1305 -0
- package/unstable-preview-types/-private/model.d.ts.map +1 -0
- package/unstable-preview-types/-private/model.type-test.d.ts +4 -0
- package/unstable-preview-types/-private/model.type-test.d.ts.map +1 -0
- package/unstable-preview-types/-private/notify-changes.d.ts +8 -0
- package/unstable-preview-types/-private/notify-changes.d.ts.map +1 -0
- package/unstable-preview-types/-private/promise-belongs-to.d.ts +46 -0
- package/unstable-preview-types/-private/promise-belongs-to.d.ts.map +1 -0
- package/unstable-preview-types/-private/promise-many-array.d.ts +130 -0
- package/unstable-preview-types/-private/promise-many-array.d.ts.map +1 -0
- package/unstable-preview-types/-private/record-state.d.ts +90 -0
- package/unstable-preview-types/-private/record-state.d.ts.map +1 -0
- package/unstable-preview-types/-private/references/belongs-to.d.ts +503 -0
- package/unstable-preview-types/-private/references/belongs-to.d.ts.map +1 -0
- package/unstable-preview-types/-private/references/has-many.d.ts +515 -0
- package/unstable-preview-types/-private/references/has-many.d.ts.map +1 -0
- package/unstable-preview-types/-private/relationship-meta.d.ts +35 -0
- package/unstable-preview-types/-private/relationship-meta.d.ts.map +1 -0
- package/unstable-preview-types/-private/schema-provider.d.ts +64 -0
- package/unstable-preview-types/-private/schema-provider.d.ts.map +1 -0
- package/unstable-preview-types/-private/type-utils.d.ts +64 -0
- package/unstable-preview-types/-private/type-utils.d.ts.map +1 -0
- package/unstable-preview-types/-private/util.d.ts +8 -0
- package/unstable-preview-types/-private/util.d.ts.map +1 -0
- package/unstable-preview-types/-private.d.ts +13 -0
- package/unstable-preview-types/-private.d.ts.map +1 -0
- package/unstable-preview-types/hooks.d.ts +5 -0
- package/unstable-preview-types/hooks.d.ts.map +1 -0
- package/unstable-preview-types/index.d.ts +78 -0
- package/unstable-preview-types/index.d.ts.map +1 -0
- package/unstable-preview-types/migration-support.d.ts +56 -0
- package/unstable-preview-types/migration-support.d.ts.map +1 -0
- package/addon/-private.js +0 -95
- package/addon/-private.js.map +0 -1
- package/addon/has-many-d45aa09e.js.map +0 -1
- package/addon/index.js +0 -1
- package/addon-main.js +0 -93
- package/blueprints/model-test/mocha-files/__root__/__path__/__test__.js +0 -18
- package/blueprints/model-test/mocha-rfc-232-files/__root__/__path__/__test__.js +0 -15
package/addon/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { a as attr, b as belongsTo, M as default, h as hasMany } from "./has-many-d45aa09e";
|
package/addon-main.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
const requireModule = require('@ember-data/private-build-infra/src/utilities/require-module');
|
|
2
|
-
const getEnv = require('@ember-data/private-build-infra/src/utilities/get-env');
|
|
3
|
-
const detectModule = require('@ember-data/private-build-infra/src/utilities/detect-module');
|
|
4
|
-
|
|
5
|
-
const pkg = require('./package.json');
|
|
6
|
-
|
|
7
|
-
module.exports = {
|
|
8
|
-
name: pkg.name,
|
|
9
|
-
|
|
10
|
-
options: {
|
|
11
|
-
'@embroider/macros': {
|
|
12
|
-
setOwnConfig: {},
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
_emberDataConfig: null,
|
|
17
|
-
configureEmberData() {
|
|
18
|
-
if (this._emberDataConfig) {
|
|
19
|
-
return this._emberDataConfig;
|
|
20
|
-
}
|
|
21
|
-
const app = this._findHost();
|
|
22
|
-
const isProd = /production/.test(process.env.EMBER_ENV);
|
|
23
|
-
const hostOptions = app.options?.emberData || {};
|
|
24
|
-
const debugOptions = Object.assign(
|
|
25
|
-
{
|
|
26
|
-
LOG_PAYLOADS: false,
|
|
27
|
-
LOG_OPERATIONS: false,
|
|
28
|
-
LOG_MUTATIONS: false,
|
|
29
|
-
LOG_NOTIFICATIONS: false,
|
|
30
|
-
LOG_REQUESTS: false,
|
|
31
|
-
LOG_REQUEST_STATUS: false,
|
|
32
|
-
LOG_IDENTIFIERS: false,
|
|
33
|
-
LOG_GRAPH: false,
|
|
34
|
-
LOG_INSTANCE_CACHE: false,
|
|
35
|
-
},
|
|
36
|
-
hostOptions.debug || {}
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
const HAS_DEBUG_PACKAGE = detectModule(require, '@ember-data/debug', __dirname, pkg);
|
|
40
|
-
const HAS_META_PACKAGE = detectModule(require, 'ember-data', __dirname, pkg);
|
|
41
|
-
|
|
42
|
-
const includeDataAdapterInProduction =
|
|
43
|
-
typeof hostOptions.includeDataAdapterInProduction === 'boolean'
|
|
44
|
-
? hostOptions.includeDataAdapterInProduction
|
|
45
|
-
: HAS_META_PACKAGE;
|
|
46
|
-
|
|
47
|
-
const includeDataAdapter = HAS_DEBUG_PACKAGE ? (isProd ? includeDataAdapterInProduction : true) : false;
|
|
48
|
-
const DEPRECATIONS = require('@ember-data/private-build-infra/src/deprecations')(hostOptions.compatWith || null);
|
|
49
|
-
const FEATURES = require('@ember-data/private-build-infra/src/features')(isProd);
|
|
50
|
-
|
|
51
|
-
const ALL_PACKAGES = requireModule('@ember-data/private-build-infra/virtual-packages/packages.js');
|
|
52
|
-
const MACRO_PACKAGE_FLAGS = Object.assign({}, ALL_PACKAGES.default);
|
|
53
|
-
delete MACRO_PACKAGE_FLAGS['HAS_DEBUG_PACKAGE'];
|
|
54
|
-
|
|
55
|
-
Object.keys(MACRO_PACKAGE_FLAGS).forEach((key) => {
|
|
56
|
-
MACRO_PACKAGE_FLAGS[key] = detectModule(require, MACRO_PACKAGE_FLAGS[key], __dirname, pkg);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
// copy configs forward
|
|
60
|
-
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
|
|
61
|
-
ownConfig.compatWith = hostOptions.compatWith || null;
|
|
62
|
-
ownConfig.debug = debugOptions;
|
|
63
|
-
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});
|
|
64
|
-
ownConfig.features = Object.assign({}, FEATURES);
|
|
65
|
-
ownConfig.includeDataAdapter = includeDataAdapter;
|
|
66
|
-
ownConfig.packages = MACRO_PACKAGE_FLAGS;
|
|
67
|
-
ownConfig.env = getEnv(ownConfig);
|
|
68
|
-
|
|
69
|
-
this._emberDataConfig = ownConfig;
|
|
70
|
-
return ownConfig;
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
included() {
|
|
74
|
-
this.configureEmberData();
|
|
75
|
-
return this._super.included.call(this, ...arguments);
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
treeForVendor() {
|
|
79
|
-
return;
|
|
80
|
-
},
|
|
81
|
-
treeForPublic() {
|
|
82
|
-
return;
|
|
83
|
-
},
|
|
84
|
-
treeForStyles() {
|
|
85
|
-
return;
|
|
86
|
-
},
|
|
87
|
-
treeForAddonStyles() {
|
|
88
|
-
return;
|
|
89
|
-
},
|
|
90
|
-
treeForApp() {
|
|
91
|
-
return;
|
|
92
|
-
},
|
|
93
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { expect } from 'chai';
|
|
2
|
-
import { describe, it } from 'mocha';
|
|
3
|
-
|
|
4
|
-
import { setupModelTest } from 'ember-mocha';
|
|
5
|
-
|
|
6
|
-
describe('<%= friendlyTestDescription %>', function () {
|
|
7
|
-
setupModelTest('<%= dasherizedModuleName %>', {
|
|
8
|
-
// Specify the other units that are required for this test.
|
|
9
|
-
<%= typeof needs !== 'undefined' ? needs : '' %>,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
// Replace this with your real tests.
|
|
13
|
-
it('exists', function () {
|
|
14
|
-
let model = this.subject();
|
|
15
|
-
// var store = this.store();
|
|
16
|
-
expect(model).to.be.ok;
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { expect } from 'chai';
|
|
2
|
-
import { describe, it } from 'mocha';
|
|
3
|
-
|
|
4
|
-
import { setupTest } from '<%= modulePrefix %>/tests/helpers';
|
|
5
|
-
|
|
6
|
-
describe('<%= friendlyTestDescription %>', function () {
|
|
7
|
-
setupTest();
|
|
8
|
-
|
|
9
|
-
// Replace this with your real tests.
|
|
10
|
-
it('exists', function () {
|
|
11
|
-
let store = this.owner.lookup('service:store');
|
|
12
|
-
let model = store.createRecord('<%= dasherizedModuleName %>', {});
|
|
13
|
-
expect(model).to.be.ok;
|
|
14
|
-
});
|
|
15
|
-
});
|