@minnai/create-aura-app 0.0.15 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minnai/create-aura-app",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "Scaffolding tool for new Aura projects",
5
5
  "bin": "dist/index.js",
6
6
  "files": [
@@ -9,15 +9,21 @@ import { LOCAL_AIRS } from '../../aura.config';
9
9
 
10
10
  export const registerExampleAIRs = () => {
11
11
  // 1. Register Standard AIRs (Core)
12
- // The Standard AIRs export a wrapper object { manifest, resources, component }
13
- // We need to flatten this to match AIRManifest { id, meta, component }
14
- [TasksAIR, YouTubeAIR].forEach((air: any) => {
15
- if (LOCAL_AIRS.includes(air.manifest.id)) {
16
- atmosphere.register({
17
- ...air.manifest,
18
- component: air.component,
19
- resources: air.resources
20
- });
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
+ }
21
27
  }
22
28
  });
23
29
 
@@ -38,9 +44,11 @@ export const registerExampleAIRs = () => {
38
44
  }
39
45
  };
40
46
 
47
+ const getManifest = (air: any) => (air?.default || air)?.manifest;
48
+
41
49
  export const EXAMPLE_AIRS = [
42
- YouTubeAIR.manifest,
43
- TasksAIR.manifest,
50
+ getManifest(YouTubeAIR),
51
+ getManifest(TasksAIR),
44
52
  StocksManifest,
45
53
  CurrencyManifest
46
- ].filter(manifest => LOCAL_AIRS.includes(manifest.id));
54
+ ].filter(manifest => manifest && LOCAL_AIRS.includes(manifest.id));
@@ -271,6 +271,13 @@ export default {
271
271
  }
272
272
  }
273
273
  ],
274
+ resolve: {
275
+ alias: {
276
+ 'react': path.resolve(__dirname, './node_modules/react'),
277
+ 'react-dom': path.resolve(__dirname, './node_modules/react-dom'),
278
+ },
279
+ dedupe: ['react', 'react-dom']
280
+ },
274
281
  server: {
275
282
  port: 5175
276
283
  }