@minnai/create-aura-app 0.0.16 → 0.0.17
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/package.json
CHANGED
|
@@ -9,17 +9,21 @@ import { LOCAL_AIRS } from '../../aura.config';
|
|
|
9
9
|
|
|
10
10
|
export const registerExampleAIRs = () => {
|
|
11
11
|
// 1. Register Standard AIRs (Core)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
const coreAIRs = [
|
|
13
|
+
{ data: TasksAIR, id: 'tasks-air' },
|
|
14
|
+
{ data: YouTubeAIR, id: 'youtube-player-air' }
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
coreAIRs.forEach(({ data, id }) => {
|
|
18
|
+
if (LOCAL_AIRS.includes(id)) {
|
|
19
|
+
const air = (data as any).default || data;
|
|
20
|
+
if (air && air.manifest) {
|
|
21
|
+
atmosphere.register({
|
|
22
|
+
...air.manifest,
|
|
23
|
+
component: air.component || air.Component,
|
|
24
|
+
resources: air.resources
|
|
25
|
+
});
|
|
26
|
+
}
|
|
23
27
|
}
|
|
24
28
|
});
|
|
25
29
|
|
|
@@ -40,9 +44,11 @@ export const registerExampleAIRs = () => {
|
|
|
40
44
|
}
|
|
41
45
|
};
|
|
42
46
|
|
|
47
|
+
const getManifest = (air: any) => (air?.default || air)?.manifest;
|
|
48
|
+
|
|
43
49
|
export const EXAMPLE_AIRS = [
|
|
44
|
-
YouTubeAIR
|
|
45
|
-
TasksAIR
|
|
50
|
+
getManifest(YouTubeAIR),
|
|
51
|
+
getManifest(TasksAIR),
|
|
46
52
|
StocksManifest,
|
|
47
53
|
CurrencyManifest
|
|
48
|
-
].filter(manifest => LOCAL_AIRS.includes(manifest.id));
|
|
54
|
+
].filter(manifest => manifest && LOCAL_AIRS.includes(manifest.id));
|