@warp-drive/schema-record 0.0.0-alpha.49 → 0.0.0-alpha.56

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/dist/schema.js ADDED
@@ -0,0 +1,242 @@
1
+ import { deprecate } from '@ember/debug';
2
+ import { recordIdentifierFor } from '@ember-data/store';
3
+ import { createCache, getValue } from '@ember-data/tracking';
4
+ import { Signals } from '@ember-data/tracking/-private';
5
+ import { getOrSetGlobal } from '@warp-drive/core-types/-private';
6
+ import { Type } from '@warp-drive/core-types/symbols';
7
+ import { I as Identifier } from "./symbols-CAUfvZjq";
8
+ import { macroCondition, getGlobalConfig } from '@embroider/macros';
9
+ const Support = getOrSetGlobal('Support', new WeakMap());
10
+ const SchemaRecordFields = [{
11
+ type: '@constructor',
12
+ name: 'constructor',
13
+ kind: 'derived'
14
+ }, {
15
+ type: '@identity',
16
+ name: '$type',
17
+ kind: 'derived',
18
+ options: {
19
+ key: 'type'
20
+ }
21
+ }];
22
+ function _constructor(record) {
23
+ let state = Support.get(record);
24
+ if (!state) {
25
+ state = {};
26
+ Support.set(record, state);
27
+ }
28
+ return state._constructor = state._constructor || {
29
+ name: `SchemaRecord<${recordIdentifierFor(record).type}>`,
30
+ get modelName() {
31
+ throw new Error('Cannot access record.constructor.modelName on non-Legacy Schema Records.');
32
+ }
33
+ };
34
+ }
35
+ _constructor[Type] = '@constructor';
36
+ function withDefaults(schema) {
37
+ schema.identity = schema.identity || {
38
+ name: 'id',
39
+ kind: '@id'
40
+ };
41
+ schema.fields.push(...SchemaRecordFields);
42
+ return schema;
43
+ }
44
+ function fromIdentity(record, options, key) {
45
+ const identifier = record[Identifier];
46
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
47
+ if (!test) {
48
+ throw new Error(`Cannot compute @identity for a record without an identifier`);
49
+ }
50
+ })(identifier) : {};
51
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
52
+ if (!test) {
53
+ throw new Error(`Expected to receive a key to compute @identity, but got ${String(options)}`);
54
+ }
55
+ })(options?.key && ['lid', 'id', 'type', '^'].includes(options.key)) : {};
56
+ return options.key === '^' ? identifier : identifier[options.key];
57
+ }
58
+ fromIdentity[Type] = '@identity';
59
+ function registerDerivations(schema) {
60
+ schema.registerDerivation(fromIdentity);
61
+ schema.registerDerivation(_constructor);
62
+ }
63
+ /**
64
+ * Wraps a derivation in a new function with Derivation signature but that looks
65
+ * up the value in the cache before recomputing.
66
+ *
67
+ * @param record
68
+ * @param options
69
+ * @param prop
70
+ */
71
+ function makeCachedDerivation(derivation) {
72
+ const memoizedDerivation = (record, options, prop) => {
73
+ const signals = record[Signals];
74
+ let signal = signals.get(prop);
75
+ if (!signal) {
76
+ signal = createCache(() => {
77
+ return derivation(record, options, prop);
78
+ }); // a total lie, for convenience of reusing the storage
79
+ signals.set(prop, signal);
80
+ }
81
+ return getValue(signal);
82
+ };
83
+ memoizedDerivation[Type] = derivation[Type];
84
+ return memoizedDerivation;
85
+ }
86
+ class SchemaService {
87
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
88
+
89
+ constructor() {
90
+ this._schemas = new Map();
91
+ this._transforms = new Map();
92
+ this._hashFns = new Map();
93
+ this._derivations = new Map();
94
+ }
95
+ hasTrait(type) {
96
+ return this._traits.has(type);
97
+ }
98
+ resourceHasTrait(resource, trait) {
99
+ return this._schemas.get(resource.type).traits.has(trait);
100
+ }
101
+ transformation(name) {
102
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
103
+ if (!test) {
104
+ throw new Error(`No transformation registered with name '${name}'`);
105
+ }
106
+ })(this._transforms.has(name)) : {};
107
+ return this._transforms.get(name);
108
+ }
109
+ derivation(name) {
110
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
111
+ if (!test) {
112
+ throw new Error(`No derivation registered with name '${name}'`);
113
+ }
114
+ })(this._derivations.has(name)) : {};
115
+ return this._derivations.get(name);
116
+ }
117
+ resource(resource) {
118
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
119
+ if (!test) {
120
+ throw new Error(`No resource registered with name '${resource.type}'`);
121
+ }
122
+ })(this._schemas.has(resource.type)) : {};
123
+ return this._schemas.get(resource.type).original;
124
+ }
125
+ hashFn(name) {
126
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
127
+ if (!test) {
128
+ throw new Error(`No hash function registered with name '${name}'`);
129
+ }
130
+ })(this._hashFns.has(name)) : {};
131
+ return this._hashFns.get(name);
132
+ }
133
+ registerResources(schemas) {
134
+ schemas.forEach(schema => {
135
+ this.registerResource(schema);
136
+ });
137
+ }
138
+ registerResource(schema) {
139
+ const fields = new Map();
140
+ const relationships = {};
141
+ const attributes = {};
142
+ schema.fields.forEach(field => {
143
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
144
+ if (!test) {
145
+ throw new Error(`${field.kind} is not valid inside a ResourceSchema's fields.`);
146
+ }
147
+ })(
148
+ // @ts-expect-error we are checking for mistakes at runtime
149
+ field.kind !== '@id' && field.kind !== '@hash') : {};
150
+ fields.set(field.name, field);
151
+ if (field.kind === 'attribute') {
152
+ attributes[field.name] = field;
153
+ } else if (field.kind === 'belongsTo' || field.kind === 'hasMany') {
154
+ relationships[field.name] = field;
155
+ }
156
+ });
157
+ const traits = new Set(schema.traits);
158
+ traits.forEach(trait => {
159
+ this._traits.add(trait);
160
+ });
161
+ const internalSchema = {
162
+ original: schema,
163
+ fields,
164
+ relationships,
165
+ attributes,
166
+ traits
167
+ };
168
+ this._schemas.set(schema.type, internalSchema);
169
+ }
170
+ registerTransformation(transformation) {
171
+ this._transforms.set(transformation[Type], transformation);
172
+ }
173
+ registerDerivation(derivation) {
174
+ this._derivations.set(derivation[Type], makeCachedDerivation(derivation));
175
+ }
176
+ registerHashFn(hashFn) {
177
+ this._hashFns.set(hashFn[Type], hashFn);
178
+ }
179
+ fields({
180
+ type
181
+ }) {
182
+ const schema = this._schemas.get(type);
183
+ if (!schema) {
184
+ throw new Error(`No schema defined for ${type}`);
185
+ }
186
+ return schema.fields;
187
+ }
188
+ hasResource(resource) {
189
+ return this._schemas.has(resource.type);
190
+ }
191
+ }
192
+ if (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA_SERVICE)) {
193
+ SchemaService.prototype.attributesDefinitionFor = function ({
194
+ type
195
+ }) {
196
+ deprecate(`Use \`schema.fields({ type })\` instead of \`schema.attributesDefinitionFor({ type })\``, false, {
197
+ id: 'ember-data:schema-service-updates',
198
+ until: '5.0',
199
+ for: 'ember-data',
200
+ since: {
201
+ available: '5.4',
202
+ enabled: '5.4'
203
+ }
204
+ });
205
+ const schema = this._schemas.get(type);
206
+ if (!schema) {
207
+ throw new Error(`No schema defined for ${type}`);
208
+ }
209
+ return schema.attributes;
210
+ };
211
+ SchemaService.prototype.relationshipsDefinitionFor = function ({
212
+ type
213
+ }) {
214
+ deprecate(`Use \`schema.fields({ type })\` instead of \`schema.relationshipsDefinitionFor({ type })\``, false, {
215
+ id: 'ember-data:schema-service-updates',
216
+ until: '5.0',
217
+ for: 'ember-data',
218
+ since: {
219
+ available: '5.4',
220
+ enabled: '5.4'
221
+ }
222
+ });
223
+ const schema = this._schemas.get(type);
224
+ if (!schema) {
225
+ throw new Error(`No schema defined for ${type}`);
226
+ }
227
+ return schema.relationships;
228
+ };
229
+ SchemaService.prototype.doesTypeExist = function (type) {
230
+ deprecate(`Use \`schema.hasResource({ type })\` instead of \`schema.doesTypeExist(type)\``, false, {
231
+ id: 'ember-data:schema-service-updates',
232
+ until: '5.0',
233
+ for: 'ember-data',
234
+ since: {
235
+ available: '5.4',
236
+ enabled: '5.4'
237
+ }
238
+ });
239
+ return this._schemas.has(type);
240
+ };
241
+ }
242
+ export { SchemaRecordFields, SchemaService, fromIdentity, registerDerivations, withDefaults };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sources":["../src/schema.ts"],"sourcesContent":["import { deprecate } from '@ember/debug';\n\nimport { recordIdentifierFor } from '@ember-data/store';\nimport type { SchemaService as SchemaServiceInterface } from '@ember-data/store/types';\nimport { createCache, getValue } from '@ember-data/tracking';\nimport type { Signal } from '@ember-data/tracking/-private';\nimport { Signals } from '@ember-data/tracking/-private';\nimport { ENABLE_LEGACY_SCHEMA_SERVICE } from '@warp-drive/build-config/deprecations';\nimport { assert } from '@warp-drive/build-config/macros';\nimport type { StableRecordIdentifier } from '@warp-drive/core-types';\nimport { getOrSetGlobal } from '@warp-drive/core-types/-private';\nimport type { ObjectValue, Value } from '@warp-drive/core-types/json/raw';\nimport type { Derivation, HashFn } from '@warp-drive/core-types/schema/concepts';\nimport type {\n FieldSchema,\n LegacyAttributeField,\n LegacyRelationshipSchema,\n ResourceSchema,\n} from '@warp-drive/core-types/schema/fields';\nimport { Type } from '@warp-drive/core-types/symbols';\nimport type { WithPartial } from '@warp-drive/core-types/utils';\n\nimport type { SchemaRecord } from './record';\nimport { Identifier } from './symbols';\n\nconst Support = getOrSetGlobal('Support', new WeakMap<WeakKey, Record<string, unknown>>());\n\nexport const SchemaRecordFields: FieldSchema[] = [\n {\n type: '@constructor',\n name: 'constructor',\n kind: 'derived',\n },\n {\n type: '@identity',\n name: '$type',\n kind: 'derived',\n options: { key: 'type' },\n },\n];\n\nfunction _constructor(record: SchemaRecord) {\n let state = Support.get(record as WeakKey);\n if (!state) {\n state = {};\n Support.set(record as WeakKey, state);\n }\n\n return (state._constructor = state._constructor || {\n name: `SchemaRecord<${recordIdentifierFor(record).type}>`,\n get modelName() {\n throw new Error('Cannot access record.constructor.modelName on non-Legacy Schema Records.');\n },\n });\n}\n_constructor[Type] = '@constructor';\n\nexport function withDefaults(schema: WithPartial<ResourceSchema, 'identity'>): ResourceSchema {\n schema.identity = schema.identity || { name: 'id', kind: '@id' };\n schema.fields.push(...SchemaRecordFields);\n return schema as ResourceSchema;\n}\n\nexport function fromIdentity(record: SchemaRecord, options: { key: 'lid' } | { key: 'type' }, key: string): string;\nexport function fromIdentity(record: SchemaRecord, options: { key: 'id' }, key: string): string | null;\nexport function fromIdentity(record: SchemaRecord, options: { key: '^' }, key: string): StableRecordIdentifier;\nexport function fromIdentity(record: SchemaRecord, options: null, key: string): asserts options;\nexport function fromIdentity(\n record: SchemaRecord,\n options: { key: 'id' | 'lid' | 'type' | '^' } | null,\n key: string\n): StableRecordIdentifier | string | null {\n const identifier = record[Identifier];\n assert(`Cannot compute @identity for a record without an identifier`, identifier);\n assert(\n `Expected to receive a key to compute @identity, but got ${String(options)}`,\n options?.key && ['lid', 'id', 'type', '^'].includes(options.key)\n );\n\n return options.key === '^' ? identifier : identifier[options.key];\n}\nfromIdentity[Type] = '@identity';\n\nexport function registerDerivations(schema: SchemaServiceInterface) {\n schema.registerDerivation(fromIdentity);\n schema.registerDerivation(_constructor);\n}\n\ntype InternalSchema = {\n original: ResourceSchema;\n traits: Set<string>;\n fields: Map<string, FieldSchema>;\n attributes: Record<string, LegacyAttributeField>;\n relationships: Record<string, LegacyRelationshipSchema>;\n};\n\nexport type Transformation<T extends Value = Value, PT = unknown> = {\n serialize(value: PT, options: Record<string, unknown> | null, record: SchemaRecord): T;\n hydrate(value: T | undefined, options: Record<string, unknown> | null, record: SchemaRecord): PT;\n defaultValue?(options: Record<string, unknown> | null, identifier: StableRecordIdentifier): T;\n [Type]: string;\n};\n\n/**\n * Wraps a derivation in a new function with Derivation signature but that looks\n * up the value in the cache before recomputing.\n *\n * @param record\n * @param options\n * @param prop\n */\nfunction makeCachedDerivation<R, T, FM extends ObjectValue | null>(\n derivation: Derivation<R, T, FM>\n): Derivation<R, T, FM> {\n const memoizedDerivation = (record: R, options: FM, prop: string): T => {\n const signals = (record as { [Signals]: Map<string, Signal> })[Signals];\n let signal = signals.get(prop);\n if (!signal) {\n signal = createCache(() => {\n return derivation(record, options, prop);\n }) as unknown as Signal; // a total lie, for convenience of reusing the storage\n signals.set(prop, signal);\n }\n\n return getValue(signal as unknown as ReturnType<typeof createCache>) as T;\n };\n memoizedDerivation[Type] = derivation[Type];\n return memoizedDerivation;\n}\n\nexport interface SchemaService {\n doesTypeExist(type: string): boolean;\n attributesDefinitionFor(identifier: { type: string }): InternalSchema['attributes'];\n relationshipsDefinitionFor(identifier: { type: string }): InternalSchema['relationships'];\n}\nexport class SchemaService implements SchemaServiceInterface {\n declare _schemas: Map<string, InternalSchema>;\n declare _transforms: Map<string, Transformation>;\n declare _hashFns: Map<string, HashFn>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n declare _derivations: Map<string, Derivation<any, any, any>>;\n declare _traits: Set<string>;\n\n constructor() {\n this._schemas = new Map();\n this._transforms = new Map();\n this._hashFns = new Map();\n this._derivations = new Map();\n }\n hasTrait(type: string): boolean {\n return this._traits.has(type);\n }\n resourceHasTrait(resource: StableRecordIdentifier | { type: string }, trait: string): boolean {\n return this._schemas.get(resource.type)!.traits.has(trait);\n }\n transformation(name: string): Transformation {\n assert(`No transformation registered with name '${name}'`, this._transforms.has(name));\n return this._transforms.get(name)!;\n }\n derivation(name: string): Derivation {\n assert(`No derivation registered with name '${name}'`, this._derivations.has(name));\n return this._derivations.get(name)!;\n }\n resource(resource: StableRecordIdentifier | { type: string }): ResourceSchema {\n assert(`No resource registered with name '${resource.type}'`, this._schemas.has(resource.type));\n return this._schemas.get(resource.type)!.original;\n }\n hashFn(name: string): HashFn {\n assert(`No hash function registered with name '${name}'`, this._hashFns.has(name));\n return this._hashFns.get(name)!;\n }\n registerResources(schemas: ResourceSchema[]): void {\n schemas.forEach((schema) => {\n this.registerResource(schema);\n });\n }\n registerResource(schema: ResourceSchema): void {\n const fields = new Map<string, FieldSchema>();\n const relationships: Record<string, LegacyRelationshipSchema> = {};\n const attributes: Record<string, LegacyAttributeField> = {};\n\n schema.fields.forEach((field) => {\n assert(\n `${field.kind} is not valid inside a ResourceSchema's fields.`,\n // @ts-expect-error we are checking for mistakes at runtime\n field.kind !== '@id' && field.kind !== '@hash'\n );\n fields.set(field.name, field);\n if (field.kind === 'attribute') {\n attributes[field.name] = field;\n } else if (field.kind === 'belongsTo' || field.kind === 'hasMany') {\n relationships[field.name] = field;\n }\n });\n\n const traits = new Set<string>(schema.traits);\n traits.forEach((trait) => {\n this._traits.add(trait);\n });\n\n const internalSchema: InternalSchema = { original: schema, fields, relationships, attributes, traits };\n this._schemas.set(schema.type, internalSchema);\n }\n\n registerTransformation<T extends Value = string, PT = unknown>(transformation: Transformation<T, PT>): void {\n this._transforms.set(transformation[Type], transformation as Transformation);\n }\n\n registerDerivation<R, T, FM extends ObjectValue | null>(derivation: Derivation<R, T, FM>): void {\n this._derivations.set(derivation[Type], makeCachedDerivation(derivation));\n }\n\n registerHashFn<T extends object>(hashFn: HashFn<T>): void {\n this._hashFns.set(hashFn[Type], hashFn as HashFn);\n }\n\n fields({ type }: { type: string }): InternalSchema['fields'] {\n const schema = this._schemas.get(type);\n\n if (!schema) {\n throw new Error(`No schema defined for ${type}`);\n }\n\n return schema.fields;\n }\n\n hasResource(resource: { type: string }): boolean {\n return this._schemas.has(resource.type);\n }\n}\n\nif (ENABLE_LEGACY_SCHEMA_SERVICE) {\n SchemaService.prototype.attributesDefinitionFor = function ({\n type,\n }: {\n type: string;\n }): InternalSchema['attributes'] {\n deprecate(`Use \\`schema.fields({ type })\\` instead of \\`schema.attributesDefinitionFor({ type })\\``, false, {\n id: 'ember-data:schema-service-updates',\n until: '5.0',\n for: 'ember-data',\n since: {\n available: '5.4',\n enabled: '5.4',\n },\n });\n const schema = this._schemas.get(type);\n\n if (!schema) {\n throw new Error(`No schema defined for ${type}`);\n }\n\n return schema.attributes;\n };\n\n SchemaService.prototype.relationshipsDefinitionFor = function ({\n type,\n }: {\n type: string;\n }): InternalSchema['relationships'] {\n deprecate(`Use \\`schema.fields({ type })\\` instead of \\`schema.relationshipsDefinitionFor({ type })\\``, false, {\n id: 'ember-data:schema-service-updates',\n until: '5.0',\n for: 'ember-data',\n since: {\n available: '5.4',\n enabled: '5.4',\n },\n });\n const schema = this._schemas.get(type);\n\n if (!schema) {\n throw new Error(`No schema defined for ${type}`);\n }\n\n return schema.relationships;\n };\n\n SchemaService.prototype.doesTypeExist = function (type: string): boolean {\n deprecate(`Use \\`schema.hasResource({ type })\\` instead of \\`schema.doesTypeExist(type)\\``, false, {\n id: 'ember-data:schema-service-updates',\n until: '5.0',\n for: 'ember-data',\n since: {\n available: '5.4',\n enabled: '5.4',\n },\n });\n return this._schemas.has(type);\n };\n}\n"],"names":["Support","getOrSetGlobal","WeakMap","SchemaRecordFields","type","name","kind","options","key","_constructor","record","state","get","set","recordIdentifierFor","modelName","Error","Type","withDefaults","schema","identity","fields","push","fromIdentity","identifier","Identifier","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","test","String","includes","registerDerivations","registerDerivation","makeCachedDerivation","derivation","memoizedDerivation","prop","signals","Signals","signal","createCache","getValue","SchemaService","constructor","_schemas","Map","_transforms","_hashFns","_derivations","hasTrait","_traits","has","resourceHasTrait","resource","trait","traits","transformation","original","hashFn","registerResources","schemas","forEach","registerResource","relationships","attributes","field","Set","add","internalSchema","registerTransformation","registerHashFn","hasResource","deprecations","ENABLE_LEGACY_SCHEMA_SERVICE","prototype","attributesDefinitionFor","deprecate","id","until","for","since","available","enabled","relationshipsDefinitionFor","doesTypeExist"],"mappings":";;;;;;;;;AAyBA,MAAMA,OAAO,GAAGC,cAAc,CAAC,SAAS,EAAE,IAAIC,OAAO,EAAoC,CAAC,CAAA;AAEnF,MAAMC,kBAAiC,GAAG,CAC/C;AACEC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,IAAI,EAAE,aAAa;AACnBC,EAAAA,IAAI,EAAE,SAAA;AACR,CAAC,EACD;AACEF,EAAAA,IAAI,EAAE,WAAW;AACjBC,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,IAAI,EAAE,SAAS;AACfC,EAAAA,OAAO,EAAE;AAAEC,IAAAA,GAAG,EAAE,MAAA;AAAO,GAAA;AACzB,CAAC,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AACF,KAAC,CAAC,CAAA;AACF,IAAA,OAAO,IAAI,CAACtC,QAAQ,CAACO,GAAG,CAAClD,IAAI,CAAC,CAAA;GAC/B,CAAA;AACH;;;;"}
@@ -0,0 +1,45 @@
1
+ import { getOrSetGlobal } from '@warp-drive/core-types/-private';
2
+
3
+ ///////////////////
4
+ ///// WARNING /////
5
+ ///////////////////
6
+
7
+ // Great, got your attention with that warning didn't we?
8
+ // Good. Here's the deal: typescript treats symbols as unique types.
9
+ // If by accident a module creating a symbol is processed more than
10
+ // once, the symbol will be different in each processing. This will
11
+ // cause a type error.
12
+ // It could also cause a runtime error if the symbol is used innapropriately.
13
+ // However, this case is extremely hard to hit and would require other things
14
+ // to go wrong first.
15
+ //
16
+ // So, why do the warning? And why do we lie about the types of the symbols?
17
+ //
18
+ // Because we intentionally create multiple copies of them within the types
19
+ // at build time. This is because we rollup our d.ts files in order to give
20
+ // our consumers a better experience.
21
+ //
22
+ // However, no tool today supports rolling up d.ts files with multiple entry
23
+ // points correctly. The tool we use currently (vite-plugin-dts) uses @microsoft/api-extractor
24
+ // which creates a fully unique stand-alone types file per-entry-point. Thus
25
+ // every entry point that uses one of these symbols somewhere will have accidentally
26
+ // created a new symbol type.
27
+ //
28
+ // This cast allows us to rollup these types using this tool while not encountering
29
+ // the unique symbol type issue.
30
+ //
31
+ // Note that none of these symbols are part of the public API, these are used for
32
+ // debugging DX and as a safe way to provide an intimate contract on public objects.
33
+
34
+ const SOURCE = getOrSetGlobal('SOURCE', Symbol('#source'));
35
+ getOrSetGlobal('MUTATE', Symbol('#update'));
36
+ const ARRAY_SIGNAL = getOrSetGlobal('ARRAY_SIGNAL', Symbol('#array-signal'));
37
+ const OBJECT_SIGNAL = getOrSetGlobal('OBJECT_SIGNAL', Symbol('#object-signal'));
38
+ getOrSetGlobal('NOTIFY', Symbol('#notify'));
39
+ const Destroy = getOrSetGlobal('Destroy', Symbol('Destroy'));
40
+ const Identifier = getOrSetGlobal('Identifier', Symbol('Identifier'));
41
+ const Editable = getOrSetGlobal('Editable', Symbol('Editable'));
42
+ const Parent = getOrSetGlobal('Parent', Symbol('Parent'));
43
+ const Checkout = getOrSetGlobal('Checkout', Symbol('Checkout'));
44
+ const Legacy = getOrSetGlobal('Legacy', Symbol('Legacy'));
45
+ export { ARRAY_SIGNAL as A, Checkout as C, Destroy as D, Editable as E, Identifier as I, Legacy as L, OBJECT_SIGNAL as O, Parent as P, SOURCE as S };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbols-CAUfvZjq.js","sources":["../src/symbols.ts"],"sourcesContent":["///////////////////\n///// WARNING /////\n///////////////////\n\nimport { getOrSetGlobal } from '@warp-drive/core-types/-private';\n\n// Great, got your attention with that warning didn't we?\n// Good. Here's the deal: typescript treats symbols as unique types.\n// If by accident a module creating a symbol is processed more than\n// once, the symbol will be different in each processing. This will\n// cause a type error.\n// It could also cause a runtime error if the symbol is used innapropriately.\n// However, this case is extremely hard to hit and would require other things\n// to go wrong first.\n//\n// So, why do the warning? And why do we lie about the types of the symbols?\n//\n// Because we intentionally create multiple copies of them within the types\n// at build time. This is because we rollup our d.ts files in order to give\n// our consumers a better experience.\n//\n// However, no tool today supports rolling up d.ts files with multiple entry\n// points correctly. The tool we use currently (vite-plugin-dts) uses @microsoft/api-extractor\n// which creates a fully unique stand-alone types file per-entry-point. Thus\n// every entry point that uses one of these symbols somewhere will have accidentally\n// created a new symbol type.\n//\n// This cast allows us to rollup these types using this tool while not encountering\n// the unique symbol type issue.\n//\n// Note that none of these symbols are part of the public API, these are used for\n// debugging DX and as a safe way to provide an intimate contract on public objects.\n\nexport const SOURCE = getOrSetGlobal('SOURCE', Symbol('#source'));\nexport const MUTATE = getOrSetGlobal('MUTATE', Symbol('#update'));\nexport const ARRAY_SIGNAL = getOrSetGlobal('ARRAY_SIGNAL', Symbol('#array-signal'));\nexport const OBJECT_SIGNAL = getOrSetGlobal('OBJECT_SIGNAL', Symbol('#object-signal'));\nexport const NOTIFY = getOrSetGlobal('NOTIFY', Symbol('#notify'));\n\nexport const Destroy = getOrSetGlobal('Destroy', Symbol('Destroy'));\nexport const Identifier = getOrSetGlobal('Identifier', Symbol('Identifier'));\nexport const Editable = getOrSetGlobal('Editable', Symbol('Editable'));\nexport const Parent = getOrSetGlobal('Parent', Symbol('Parent'));\nexport const Checkout = getOrSetGlobal('Checkout', Symbol('Checkout'));\nexport const Legacy = getOrSetGlobal('Legacy', Symbol('Legacy'));\n"],"names":["SOURCE","getOrSetGlobal","Symbol","ARRAY_SIGNAL","OBJECT_SIGNAL","Destroy","Identifier","Editable","Parent","Checkout","Legacy"],"mappings":";;AAAA;AACA;AACA;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,MAAMA,MAAM,GAAGC,cAAc,CAAC,QAAQ,EAAEC,MAAM,CAAC,SAAS,CAAC,EAAC;AAC3CD,cAAc,CAAC,QAAQ,EAAEC,MAAM,CAAC,SAAS,CAAC,EAAC;AAC1D,MAAMC,YAAY,GAAGF,cAAc,CAAC,cAAc,EAAEC,MAAM,CAAC,eAAe,CAAC,EAAC;AAC5E,MAAME,aAAa,GAAGH,cAAc,CAAC,eAAe,EAAEC,MAAM,CAAC,gBAAgB,CAAC,EAAC;AAChED,cAAc,CAAC,QAAQ,EAAEC,MAAM,CAAC,SAAS,CAAC,EAAC;AAE1D,MAAMG,OAAO,GAAGJ,cAAc,CAAC,SAAS,EAAEC,MAAM,CAAC,SAAS,CAAC,EAAC;AAC5D,MAAMI,UAAU,GAAGL,cAAc,CAAC,YAAY,EAAEC,MAAM,CAAC,YAAY,CAAC,EAAC;AACrE,MAAMK,QAAQ,GAAGN,cAAc,CAAC,UAAU,EAAEC,MAAM,CAAC,UAAU,CAAC,EAAC;AAC/D,MAAMM,MAAM,GAAGP,cAAc,CAAC,QAAQ,EAAEC,MAAM,CAAC,QAAQ,CAAC,EAAC;AACzD,MAAMO,QAAQ,GAAGR,cAAc,CAAC,UAAU,EAAEC,MAAM,CAAC,UAAU,CAAC,EAAC;AAC/D,MAAMQ,MAAM,GAAGT,cAAc,CAAC,QAAQ,EAAEC,MAAM,CAAC,QAAQ,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warp-drive/schema-record",
3
- "version": "0.0.0-alpha.49",
3
+ "version": "0.0.0-alpha.56",
4
4
  "description": "Schema Driven Resource Presentation for WarpDrive and EmberData",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -13,20 +13,18 @@
13
13
  "license": "MIT",
14
14
  "author": "",
15
15
  "scripts": {
16
- "lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs --report-unused-disable-directives",
17
- "build:runtime": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
18
- "build:types": "tsc --build",
19
- "_build": "bun run build:runtime && bun run build:types",
20
- "_syncPnpm": "bun run sync-dependencies-meta-injected"
16
+ "lint": "eslint . --quiet --cache --cache-strategy=content --report-unused-disable-directives",
17
+ "build:pkg": "vite build;",
18
+ "sync-hardlinks": "bun run sync-dependencies-meta-injected"
21
19
  },
22
20
  "ember-addon": {
23
- "main": "addon-main.js",
21
+ "main": "addon-main.cjs",
24
22
  "type": "addon",
25
23
  "version": 1
26
24
  },
27
25
  "files": [
28
- "addon-main.js",
29
- "addon",
26
+ "addon-main.cjs",
27
+ "dist",
30
28
  "README.md",
31
29
  "LICENSE.md",
32
30
  "NCC-1701-a.svg",
@@ -34,14 +32,12 @@
34
32
  "unstable-preview-types"
35
33
  ],
36
34
  "peerDependencies": {
37
- "@ember-data/store": "5.4.0-alpha.63",
38
- "@warp-drive/core-types": "0.0.0-alpha.49",
39
- "@ember-data/tracking": "5.4.0-alpha.63"
35
+ "@ember-data/request": "5.4.0-alpha.70",
36
+ "@ember-data/store": "5.4.0-alpha.70",
37
+ "@ember-data/tracking": "5.4.0-alpha.70",
38
+ "@warp-drive/core-types": "0.0.0-alpha.56"
40
39
  },
41
40
  "dependenciesMeta": {
42
- "@ember-data/private-build-infra": {
43
- "injected": true
44
- },
45
41
  "@ember-data/request": {
46
42
  "injected": true
47
43
  },
@@ -56,50 +52,42 @@
56
52
  },
57
53
  "@ember/string": {
58
54
  "injected": true
55
+ },
56
+ "@warp-drive/build-config": {
57
+ "injected": true
59
58
  }
60
59
  },
61
60
  "dependencies": {
62
- "@ember-data/private-build-infra": "5.4.0-alpha.63",
63
61
  "@ember/edition-utils": "^1.2.0",
64
- "@embroider/macros": "^1.15.1",
62
+ "@embroider/macros": "^1.16.1",
63
+ "@warp-drive/build-config": "0.0.0-alpha.7",
65
64
  "ember-cli-babel": "^8.2.0"
66
65
  },
67
66
  "devDependencies": {
68
- "@babel/cli": "^7.24.1",
69
- "@babel/core": "^7.24.4",
70
- "@babel/plugin-proposal-decorators": "^7.24.1",
71
- "@babel/plugin-transform-class-properties": "^7.24.1",
72
- "@babel/plugin-transform-private-methods": "^7.24.1",
73
- "@babel/plugin-transform-runtime": "^7.24.3",
74
- "@babel/plugin-transform-typescript": "^7.24.4",
75
- "@babel/preset-env": "^7.24.4",
67
+ "@babel/core": "^7.24.5",
68
+ "@babel/plugin-transform-typescript": "^7.24.5",
69
+ "@babel/preset-env": "^7.24.5",
76
70
  "@babel/preset-typescript": "^7.24.1",
77
- "@babel/runtime": "^7.24.4",
78
- "@ember-data/request": "5.4.0-alpha.63",
79
- "@ember-data/store": "5.4.0-alpha.63",
80
- "@ember-data/tracking": "5.4.0-alpha.63",
81
- "@embroider/addon-dev": "^4.3.1",
71
+ "@ember-data/request": "5.4.0-alpha.70",
72
+ "@ember-data/store": "5.4.0-alpha.70",
73
+ "@ember-data/tracking": "5.4.0-alpha.70",
74
+ "@ember/string": "^3.1.1",
82
75
  "@glimmer/component": "^1.1.2",
83
- "@rollup/plugin-babel": "^6.0.4",
84
- "@rollup/plugin-node-resolve": "^15.2.3",
85
- "@warp-drive/core-types": "0.0.0-alpha.49",
86
- "@warp-drive/internal-config": "5.4.0-alpha.63",
87
- "ember-source": "~5.7.0",
88
- "pnpm-sync-dependencies-meta-injected": "0.0.10",
89
- "rollup": "^4.14.3",
76
+ "@warp-drive/core-types": "0.0.0-alpha.56",
77
+ "@warp-drive/internal-config": "5.4.0-alpha.70",
78
+ "ember-source": "~5.8.0",
79
+ "pnpm-sync-dependencies-meta-injected": "0.0.14",
90
80
  "typescript": "^5.4.5",
91
- "walk-sync": "^3.0.0",
92
- "webpack": "^5.91.0",
93
- "@ember/string": "^3.1.1"
81
+ "vite": "^5.2.11"
94
82
  },
95
83
  "ember": {
96
84
  "edition": "octane"
97
85
  },
98
86
  "engines": {
99
- "node": ">= 18.20.2"
87
+ "node": ">= 22.1.0"
100
88
  },
101
89
  "volta": {
102
90
  "extends": "../../package.json"
103
91
  },
104
- "packageManager": "pnpm@8.15.6"
92
+ "packageManager": "pnpm@8.15.8"
105
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAA6B,YAAY,EAAE,MAAM,UAAU,CAAC;AAGnE,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,sBAAsB,EAClC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,YAAY,CAcd;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAEzD"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,sBAAsB,EAClC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,YAAY,CAcd;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAEzD"}
@@ -1,6 +1,6 @@
1
- /// <reference path="./-base-fields.d.ts" />
1
+ /// <reference path="./symbols.d.ts" />
2
+ /// <reference path="./record.d.ts" />
3
+ /// <reference path="./managed-array.d.ts" />
2
4
  /// <reference path="./hooks.d.ts" />
3
5
  /// <reference path="./managed-object.d.ts" />
4
- /// <reference path="./schema.d.ts" />
5
- /// <reference path="./managed-array.d.ts" />
6
- /// <reference path="./record.d.ts" />
6
+ /// <reference path="./schema.d.ts" />
@@ -1,15 +1,12 @@
1
1
  declare module '@warp-drive/schema-record/managed-array' {
2
2
  import type Store from '@ember-data/store';
3
- import type { FieldSchema } from '@ember-data/store/-types/q/schema-service';
4
3
  import type { Signal } from '@ember-data/tracking/-private';
5
4
  import type { StableRecordIdentifier } from '@warp-drive/core-types';
6
5
  import type { Cache } from '@warp-drive/core-types/cache';
6
+ import type { ArrayField } from '@warp-drive/core-types/schema/fields';
7
7
  import type { SchemaRecord } from '@warp-drive/schema-record/record';
8
8
  import type { SchemaService } from '@warp-drive/schema-record/schema';
9
- export const SOURCE: unique symbol;
10
- export const MUTATE: unique symbol;
11
- export const ARRAY_SIGNAL: unique symbol;
12
- export const NOTIFY: unique symbol;
9
+ import { ARRAY_SIGNAL, MUTATE, SOURCE } from '@warp-drive/schema-record/symbols';
13
10
  export function notifyArray(arr: ManagedArray): void;
14
11
  export interface ManagedArray extends Omit<Array<unknown>, '[]'> {
15
12
  [MUTATE]?(target: unknown[], receiver: typeof Proxy<unknown[]>, prop: string, args: unknown[], _SIGNAL: Signal): unknown;
@@ -20,7 +17,7 @@ declare module '@warp-drive/schema-record/managed-array' {
20
17
  key: string;
21
18
  owner: SchemaRecord;
22
19
  [ARRAY_SIGNAL]: Signal;
23
- constructor(store: Store, schema: SchemaService, cache: Cache, field: FieldSchema, data: unknown[], address: StableRecordIdentifier, key: string, owner: SchemaRecord);
20
+ constructor(store: Store, schema: SchemaService, cache: Cache, field: ArrayField, data: unknown[], address: StableRecordIdentifier, key: string, owner: SchemaRecord);
24
21
  }
25
22
  }
26
23
  //# sourceMappingURL=managed-array.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"managed-array.d.ts","sourceRoot":"","sources":["../src/managed-array.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAG1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,MAAM,eAAoB,CAAC;AACxC,eAAO,MAAM,MAAM,eAAoB,CAAC;AACxC,eAAO,MAAM,YAAY,eAAoB,CAAC;AAC9C,eAAO,MAAM,MAAM,eAAoB,CAAC;AAExC,wBAAgB,WAAW,CAAC,GAAG,EAAE,YAAY,QAE5C;AA+ED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC;IAC9D,CAAC,MAAM,CAAC,CAAC,CACP,MAAM,EAAE,OAAO,EAAE,EACjB,QAAQ,EAAE,OAAO,KAAK,CAAC,OAAO,EAAE,CAAC,EACjC,I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,EAAE,EACjB,QAAQ,EAAE,OAAO,KAAK,CAAC,OAAO,EAAE,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EAAE,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;CACZ;AAED,qBAAa,YAAY;IACvB,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACZ,OAAO,EAAE,sBAAsB,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,YAAY,CAAC;IACpB,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;gBAG7B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,OAAO,EAAE,EACf,OAAO,EAAE,sBAAsB,EAC/B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,YAAY;CAyHtB"}
@@ -1,15 +1,12 @@
1
1
  declare module '@warp-drive/schema-record/managed-object' {
2
2
  import type Store from '@ember-data/store';
3
- import type { FieldSchema } from '@ember-data/store/-types/q/schema-service';
4
3
  import type { Signal } from '@ember-data/tracking/-private';
5
4
  import type { StableRecordIdentifier } from '@warp-drive/core-types';
6
5
  import type { Cache } from '@warp-drive/core-types/cache';
6
+ import type { ObjectField } from '@warp-drive/core-types/schema/fields';
7
7
  import type { SchemaRecord } from '@warp-drive/schema-record/record';
8
8
  import type { SchemaService } from '@warp-drive/schema-record/schema';
9
- export const SOURCE: unique symbol;
10
- export const MUTATE: unique symbol;
11
- export const OBJECT_SIGNAL: unique symbol;
12
- export const NOTIFY: unique symbol;
9
+ import { MUTATE, OBJECT_SIGNAL, SOURCE } from '@warp-drive/schema-record/symbols';
13
10
  export function notifyObject(obj: ManagedObject): void;
14
11
  export interface ManagedObject {
15
12
  [MUTATE]?(target: unknown[], receiver: typeof Proxy<unknown[]>, prop: string, args: unknown[], _SIGNAL: Signal): unknown;
@@ -20,7 +17,7 @@ declare module '@warp-drive/schema-record/managed-object' {
20
17
  key: string;
21
18
  owner: SchemaRecord;
22
19
  [OBJECT_SIGNAL]: Signal;
23
- constructor(store: Store, schema: SchemaService, cache: Cache, field: FieldSchema, data: object, address: StableRecordIdentifier, key: string, owner: SchemaRecord);
20
+ constructor(store: Store, schema: SchemaService, cache: Cache, field: ObjectField, data: object, address: StableRecordIdentifier, key: string, owner: SchemaRecord);
24
21
  }
25
22
  }
26
23
  //# sourceMappingURL=managed-object.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"managed-object.d.ts","sourceRoot":"","sources":["../src/managed-object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAG1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,MAAM,eAAoB,CAAC;AACxC,eAAO,MAAM,MAAM,eAAoB,CAAC;AACxC,eAAO,MAAM,aAAa,eAAoB,CAAC;AAC/C,eAAO,MAAM,MAAM,eAAoB,CAAC;AAExC,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,QAE9C;AAID,MAAM,WAAW,aAAa;IAC5B,CAAC,MAAM,CAAC,CAAC,CACP,MAAM,EAAE,OAAO,EAAE,EACjB,QAAQ,EAAE,OAAO,KAAK,CAAC,OAAO,EAAE,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EAAE,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;CACZ;AAED,qBAAa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IACxB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACT,OAAO,EAAE,sBAAsB,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,YAAY,CAAC;IACpB,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;gBAG9B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,sBAAsB,EAC/B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,YAAY;CAyFtB"}
@@ -3,12 +3,8 @@ declare module '@warp-drive/schema-record/record' {
3
3
  import { type Signal, Signals } from '@ember-data/tracking/-private';
4
4
  import type { StableRecordIdentifier } from '@warp-drive/core-types';
5
5
  import { RecordStore } from '@warp-drive/core-types/symbols';
6
- export const Destroy: unique symbol;
7
- export const Identifier: unique symbol;
8
- export const Editable: unique symbol;
9
- export const Parent: unique symbol;
10
- export const Checkout: unique symbol;
11
- export const Legacy: unique symbol;
6
+ import { Checkout, Destroy, Editable, Identifier, Legacy } from '@warp-drive/schema-record/symbols';
7
+ export { Editable, Legacy } from '@warp-drive/schema-record/symbols';
12
8
  export class SchemaRecord {
13
9
  [RecordStore]: Store;
14
10
  [Identifier]: StableRecordIdentifier;
@@ -1 +1 @@
1
- {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../src/record.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAI3C,OAAO,EAML,KAAK,MAAM,EACX,OAAO,EACR,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAMrE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAM7D,eAAO,MAAM,OAAO,eAAoB,CAAC;AACzC,eAAO,MAAM,UAAU,eAAuB,CAAC;AAC/C,eAAO,MAAM,QAAQ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