* chore: 🤖 upgrade ember-data to v5.3.11 * Add missing copyright headers * refactor: 💡 remove comment * chore: 🤖 update yarn.lock due to merge conflict ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * fix: 🐛 undo ember-source upgrade (should be upgraded w/ ember) ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * chore: 🤖 move dep to devDeps & resolve test-helper version ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * fix: 🐛 unique record id error bug fix using store.push ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * refactor: 💡 cleanup ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * Delete old deprecation initializer (#2748) * refactor: 💡 import from'ember-data/store' ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * refactor: 💡 clean up comments ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * refactor: 💡 remove compatWith comment ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 --------- Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
24 lines
517 B
JavaScript
24 lines
517 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
export default class HostSourceIdArrayTransform {
|
|
deserialize(serialized) {
|
|
const stringValues = serialized || [];
|
|
return stringValues.map(({ id: host_source_id, ...obj }) => ({
|
|
host_source_id,
|
|
...obj,
|
|
}));
|
|
}
|
|
|
|
serialize(deserialized) {
|
|
const strings = deserialized || [];
|
|
return strings.map(({ host_source_id: id, ...obj }) => ({ id, ...obj }));
|
|
}
|
|
|
|
static create() {
|
|
return new this();
|
|
}
|
|
}
|