-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: impl SchemaService RFC (#9448)
* feat: implement SchemaService RFC emberjs/rfcs#1027 * add deprecations, fix prod test * delegating schema provider * cleanup'
- Loading branch information
Showing
92 changed files
with
3,479 additions
and
2,947 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { join } from 'path'; | ||
import { copyFileSync, globSync, mkdirSync } from 'fs'; | ||
|
||
export function keepAssets({ from, include, dist }) { | ||
return { | ||
name: 'copy-assets', | ||
|
||
// the assets go into the output directory in the same relative locations as | ||
// in the input directory | ||
async closeBundle() { | ||
const files = globSync(include, { cwd: join(process.cwd(), from) }); | ||
for (let name of files) { | ||
const fromPath = join(process.cwd(), from, name); | ||
const toPath = join(process.cwd(), dist, name); | ||
|
||
mkdirSync(join(toPath, '..'), { recursive: true }); | ||
copyFileSync(fromPath, toPath); | ||
} | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { StableRecordIdentifier } from '../identifier'; | ||
import type { ObjectValue, Value } from '../json/raw'; | ||
import type { OpaqueRecordInstance } from '../record'; | ||
import type { Type } from '../symbols'; | ||
|
||
export type Transformation<T extends Value = Value, PT = unknown> = { | ||
serialize(value: PT, options: ObjectValue | null, record: OpaqueRecordInstance): T; | ||
hydrate(value: T | undefined, options: ObjectValue | null, record: OpaqueRecordInstance): PT; | ||
defaultValue?(options: ObjectValue | null, identifier: StableRecordIdentifier): T; | ||
[Type]: string; | ||
}; | ||
|
||
export type Derivation<R = unknown, T = unknown, FM extends ObjectValue | null = ObjectValue | null> = { | ||
[Type]: string; | ||
} & ((record: R, options: FM, prop: string) => T); | ||
|
||
export type HashFn<T extends object = object> = { [Type]: string } & (( | ||
data: T, | ||
options: ObjectValue | null, | ||
prop: string | null | ||
) => string); |
Oops, something went wrong.