create-rudder-app 0.5.0 → 0.6.0
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/templates/demos/index-view.d.ts.map +1 -1
- package/dist/templates/demos/index-view.js +16 -106
- package/dist/templates/demos/index-view.js.map +1 -1
- package/dist/templates/demos/registry.d.ts +13 -0
- package/dist/templates/demos/registry.d.ts.map +1 -1
- package/dist/templates/demos/registry.js +120 -14
- package/dist/templates/demos/registry.js.map +1 -1
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-view.d.ts","sourceRoot":"","sources":["../../../src/templates/demos/index-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"index-view.d.ts","sourceRoot":"","sources":["../../../src/templates/demos/index-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAG7E,wBAAgB,cAAc,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CA6C3D"}
|
|
@@ -1,110 +1,14 @@
|
|
|
1
1
|
import { shouldScaffoldDemo } from '../../templates.js';
|
|
2
|
+
import { DEMOS, demoHref, demoTitle } from './registry.js';
|
|
2
3
|
export function demosIndexView(ctx) {
|
|
3
|
-
const cards =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
title: 'Todos',
|
|
13
|
-
desc: 'ORM + interactive UI. Controller loads initial data, the view hydrates and POSTs to /api/todos/* for live updates.',
|
|
14
|
-
href: '/demos/todos',
|
|
15
|
-
pkgs: '@rudderjs/orm · @rudderjs/router',
|
|
16
|
-
show: shouldScaffoldDemo(ctx, 'todos'),
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
title: 'Avatar resize',
|
|
20
|
-
desc: 'Upload an image — server resizes it to 256×256 WebP via @rudderjs/image and saves to public storage. Side-by-side compare.',
|
|
21
|
-
href: '/demos/avatar',
|
|
22
|
-
pkgs: '@rudderjs/image · @rudderjs/storage',
|
|
23
|
-
show: shouldScaffoldDemo(ctx, 'avatar'),
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
title: 'System info',
|
|
27
|
-
desc: 'Three shell commands (git, node, uptime) executed via @rudderjs/process. Compares sequential vs parallel cost using Process.pool().',
|
|
28
|
-
href: '/demos/system-info',
|
|
29
|
-
pkgs: '@rudderjs/process',
|
|
30
|
-
show: shouldScaffoldDemo(ctx, 'system-info'),
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
title: 'Worker threads',
|
|
34
|
-
desc: 'Compute fib(n) sequentially on the main thread vs across @rudderjs/concurrency worker pool. Watch the parallel cost stay flat as you crank N.',
|
|
35
|
-
href: '/demos/fibonacci',
|
|
36
|
-
pkgs: '@rudderjs/concurrency',
|
|
37
|
-
show: shouldScaffoldDemo(ctx, 'fibonacci'),
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
title: 'Feature flags',
|
|
41
|
-
desc: 'Boolean, value, scoped, and Lottery features resolved against the current user. Sub-route guarded by FeatureMiddleware to demonstrate 403 blocking.',
|
|
42
|
-
href: '/demos/pennant',
|
|
43
|
-
pkgs: '@rudderjs/pennant',
|
|
44
|
-
show: shouldScaffoldDemo(ctx, 'pennant'),
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
title: 'Cache counter',
|
|
48
|
-
desc: 'Persistent view counter via Cache.get + Cache.set. Demonstrates the Cache facade with the in-memory driver.',
|
|
49
|
-
href: '/demos/cache',
|
|
50
|
-
pkgs: '@rudderjs/cache',
|
|
51
|
-
show: shouldScaffoldDemo(ctx, 'cache'),
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
title: 'Queue dispatch',
|
|
55
|
-
desc: 'Click to enqueue ExampleJob via @rudderjs/queue. The handler logs to the server terminal.',
|
|
56
|
-
href: '/demos/queue',
|
|
57
|
-
pkgs: '@rudderjs/queue',
|
|
58
|
-
show: shouldScaffoldDemo(ctx, 'queue'),
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
title: 'Mail send',
|
|
62
|
-
desc: 'Send a Mailable via Mail.to(...).send(). Default driver is "log" — output appears in the dev terminal.',
|
|
63
|
-
href: '/demos/mail',
|
|
64
|
-
pkgs: '@rudderjs/mail',
|
|
65
|
-
show: shouldScaffoldDemo(ctx, 'mail'),
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
title: 'Notifications',
|
|
69
|
-
desc: 'Multi-channel notification via notify(notifiable, notification). Mail channel uses the log driver.',
|
|
70
|
-
href: '/demos/notifications',
|
|
71
|
-
pkgs: '@rudderjs/notification · @rudderjs/mail',
|
|
72
|
-
show: shouldScaffoldDemo(ctx, 'notifications'),
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
title: 'Localization',
|
|
76
|
-
desc: 'Pick a locale to fetch the same keys via trans() server-side. Strings live in lang/<locale>/messages.json.',
|
|
77
|
-
href: '/demos/localization',
|
|
78
|
-
pkgs: '@rudderjs/localization',
|
|
79
|
-
show: shouldScaffoldDemo(ctx, 'localization'),
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
title: 'HTTP client',
|
|
83
|
-
desc: 'Server-side Http.retry(3, 200).timeout(5000).get(url) against a public API. The 500 endpoint exercises retry.',
|
|
84
|
-
href: '/demos/http',
|
|
85
|
-
pkgs: '@rudderjs/http',
|
|
86
|
-
show: shouldScaffoldDemo(ctx, 'http'),
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
title: 'WebSocket chat',
|
|
90
|
-
desc: 'Real-time chat + presence using @rudderjs/broadcast — multi-channel pub/sub over a single WebSocket connection.',
|
|
91
|
-
href: '/demos/ws',
|
|
92
|
-
pkgs: '@rudderjs/broadcast',
|
|
93
|
-
show: shouldScaffoldDemo(ctx, 'ws'),
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
title: 'Collaborative editor',
|
|
97
|
-
desc: 'Yjs CRDT live document with awareness cursors. Open in two tabs to see real-time sync over @rudderjs/sync.',
|
|
98
|
-
href: '/demos/sync',
|
|
99
|
-
pkgs: '@rudderjs/sync',
|
|
100
|
-
show: shouldScaffoldDemo(ctx, 'sync'),
|
|
101
|
-
},
|
|
102
|
-
].filter(c => c.show);
|
|
103
|
-
const cardsJsx = cards.map(c => ` <a key="${c.href}" href="${c.href}" className="feature-card">
|
|
104
|
-
<h3 className="feature-title">${c.title}</h3>
|
|
105
|
-
<p className="feature-desc">${c.desc}</p>
|
|
106
|
-
<p className="feature-desc" style={{ fontSize: '0.7rem', opacity: 0.7 }}>${c.pkgs}</p>
|
|
107
|
-
</a>`).join('\n');
|
|
4
|
+
const cards = DEMOS
|
|
5
|
+
.filter(d => shouldScaffoldDemo(ctx, d.value))
|
|
6
|
+
.map(d => ` <a key="${demoHref(d)}" href="${demoHref(d)}" className="feature-card">
|
|
7
|
+
<h3 className="feature-title">${demoTitle(d)}</h3>
|
|
8
|
+
<p className="feature-desc">${escapeJsxText(d.description)}</p>
|
|
9
|
+
<p className="feature-desc" style={{ fontSize: '0.7rem', opacity: 0.7 }}>${d.packages.join(' · ')}</p>
|
|
10
|
+
</a>`)
|
|
11
|
+
.join('\n');
|
|
108
12
|
return `import '@/index.css'
|
|
109
13
|
|
|
110
14
|
// Override the id-derived URL ('/demos/index') so SPA nav matches the controller ('/demos').
|
|
@@ -133,7 +37,7 @@ export default function DemosIndex() {
|
|
|
133
37
|
|
|
134
38
|
<section className="feature-section">
|
|
135
39
|
<div className="feature-grid">
|
|
136
|
-
${
|
|
40
|
+
${cards}
|
|
137
41
|
</div>
|
|
138
42
|
</section>
|
|
139
43
|
</div>
|
|
@@ -141,4 +45,10 @@ ${cardsJsx}
|
|
|
141
45
|
}
|
|
142
46
|
`;
|
|
143
47
|
}
|
|
48
|
+
// Description strings live as plain text in the registry, but they're emitted
|
|
49
|
+
// inside JSX text nodes. Escape '<' and '>' so a raw '<name>' (e.g. in the
|
|
50
|
+
// localization description) doesn't get parsed as a JSX element.
|
|
51
|
+
function escapeJsxText(s) {
|
|
52
|
+
return s.replace(/</g, '<').replace(/>/g, '>');
|
|
53
|
+
}
|
|
144
54
|
//# sourceMappingURL=index-view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-view.js","sourceRoot":"","sources":["../../../src/templates/demos/index-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAwB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"index-view.js","sourceRoot":"","sources":["../../../src/templates/demos/index-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAwB,MAAM,oBAAoB,CAAA;AAC7E,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE1D,MAAM,UAAU,cAAc,CAAC,GAAoB;IACjD,MAAM,KAAK,GAAG,KAAK;SAChB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;SAC7C,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,mBAAmB,QAAQ,CAAC,CAAC,CAAC,WAAW,QAAQ,CAAC,CAAC,CAAC;0CACxB,SAAS,CAAC,CAAC,CAAC;wCACd,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;qFACiB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;aAC9F,CAAC;SACT,IAAI,CAAC,IAAI,CAAC,CAAA;IAEb,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BP,KAAK;;;;;;CAMN,CAAA;AACD,CAAC;AAED,8EAA8E;AAC9E,2EAA2E;AAC3E,iEAAiE;AACjE,SAAS,aAAa,CAAC,CAAS;IAC9B,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AACtD,CAAC"}
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import type { TemplateContext } from '../../templates.js';
|
|
2
2
|
export interface DemoSpec {
|
|
3
|
+
/** Stable id used in URLs, file names, and the prompt multiselect. */
|
|
3
4
|
value: string;
|
|
5
|
+
/** Short label shown in the @clack/prompts multiselect. */
|
|
4
6
|
label: string;
|
|
7
|
+
/** Single-line hint shown next to the label in the prompt. */
|
|
5
8
|
hint?: string;
|
|
9
|
+
/** Card title shown on /demos. Falls back to `label` when omitted. */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** Long description shown on the /demos card in the scaffolded app + playground. */
|
|
12
|
+
description: string;
|
|
13
|
+
/** Packages this demo exercises — rendered under each /demos card. */
|
|
14
|
+
packages: ReadonlyArray<string>;
|
|
6
15
|
/** Package keys that must all be selected for this demo to scaffold. */
|
|
7
16
|
requires?: ReadonlyArray<keyof TemplateContext['packages']>;
|
|
8
17
|
/** True if this demo requires a database/ORM. */
|
|
9
18
|
requiresOrm?: boolean;
|
|
10
19
|
}
|
|
20
|
+
/** Card title used on /demos — falls back to `label` when not overridden. */
|
|
21
|
+
export declare function demoTitle(spec: DemoSpec): string;
|
|
11
22
|
export declare const DEMOS: ReadonlyArray<DemoSpec>;
|
|
12
23
|
export declare function availableDemos(orm: TemplateContext['orm'], packages: TemplateContext['packages']): DemoSpec[];
|
|
24
|
+
/** Default href for a demo card — `/demos/<value>`. */
|
|
25
|
+
export declare function demoHref(spec: Pick<DemoSpec, 'value'>): string;
|
|
13
26
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/templates/demos/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;A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AACvD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,MAAM,CAE9D"}
|
|
@@ -1,18 +1,120 @@
|
|
|
1
|
+
/** Card title used on /demos — falls back to `label` when not overridden. */
|
|
2
|
+
export function demoTitle(spec) {
|
|
3
|
+
return spec.title ?? spec.label;
|
|
4
|
+
}
|
|
1
5
|
export const DEMOS = [
|
|
2
|
-
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
{
|
|
7
|
+
value: 'contact',
|
|
8
|
+
label: 'Contact form',
|
|
9
|
+
hint: 'CSRF + Zod validation',
|
|
10
|
+
description: 'CSRF-protected form with Zod validation. Demonstrates getCsrfToken() and FormRequest-style error handling.',
|
|
11
|
+
packages: ['@rudderjs/middleware', '@rudderjs/core'],
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
value: 'cache',
|
|
15
|
+
label: 'Cache counter',
|
|
16
|
+
hint: 'Cache.get + Cache.set round-trip',
|
|
17
|
+
description: 'Click "Bump" to read the current value via Cache.get, increment it, and write it back via Cache.set. Default driver is in-memory.',
|
|
18
|
+
packages: ['@rudderjs/cache'],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
value: 'todos',
|
|
22
|
+
label: 'Todos CRUD',
|
|
23
|
+
title: 'Todos',
|
|
24
|
+
hint: 'requires ORM',
|
|
25
|
+
description: 'ORM + interactive UI. Controller loads initial data, the view hydrates and POSTs to /api/todos/* for live updates.',
|
|
26
|
+
packages: ['@rudderjs/orm', '@rudderjs/router'],
|
|
27
|
+
requiresOrm: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
value: 'queue',
|
|
31
|
+
label: 'Queue dispatch',
|
|
32
|
+
hint: 'requires Queue',
|
|
33
|
+
description: 'Dispatch ExampleJob via @rudderjs/queue. The handler logs to the server terminal — install @rudderjs/horizon for a UI.',
|
|
34
|
+
packages: ['@rudderjs/queue'],
|
|
35
|
+
requires: ['queue'],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
value: 'mail',
|
|
39
|
+
label: 'Mail send',
|
|
40
|
+
hint: 'requires Mail',
|
|
41
|
+
description: 'Send a DemoMail via @rudderjs/mail. Default driver is log — output lands in the dev server terminal.',
|
|
42
|
+
packages: ['@rudderjs/mail'],
|
|
43
|
+
requires: ['mail'],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
value: 'notifications',
|
|
47
|
+
label: 'Notifications',
|
|
48
|
+
hint: 'requires Notifications + Mail',
|
|
49
|
+
description: "Dispatch a WelcomeNotification via notify(). The notification's via() picks the channel(s); mail routes through the log driver.",
|
|
50
|
+
packages: ['@rudderjs/notification', '@rudderjs/mail'],
|
|
51
|
+
requires: ['notifications', 'mail'],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
value: 'localization',
|
|
55
|
+
label: 'Localization',
|
|
56
|
+
hint: 'requires Localization',
|
|
57
|
+
description: 'Locale switcher resolves the same keys server-side via trans(). Strings live in lang/<locale>/messages.json.',
|
|
58
|
+
packages: ['@rudderjs/localization'],
|
|
59
|
+
requires: ['localization'],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
value: 'http',
|
|
63
|
+
label: 'HTTP client',
|
|
64
|
+
hint: 'requires HTTP',
|
|
65
|
+
description: 'Server-side Http.retry(3, 200).timeout(5000).get(url) against a public API. The 500 endpoint exercises the retry path.',
|
|
66
|
+
packages: ['@rudderjs/http'],
|
|
67
|
+
requires: ['http'],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
value: 'avatar',
|
|
71
|
+
label: 'Avatar resize',
|
|
72
|
+
hint: 'requires Storage + Image',
|
|
73
|
+
description: 'Upload an image — server resizes it to 256×256 WebP via @rudderjs/image and saves to public storage. Side-by-side compare.',
|
|
74
|
+
packages: ['@rudderjs/image', '@rudderjs/storage'],
|
|
75
|
+
requires: ['storage', 'image'],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
value: 'fibonacci',
|
|
79
|
+
label: 'Worker threads',
|
|
80
|
+
hint: 'requires Concurrency',
|
|
81
|
+
description: 'Compute fib(n) sequentially on the main thread vs across @rudderjs/concurrency worker pool. Watch the parallel cost stay flat as you crank N.',
|
|
82
|
+
packages: ['@rudderjs/concurrency'],
|
|
83
|
+
requires: ['concurrency'],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
value: 'system-info',
|
|
87
|
+
label: 'System info',
|
|
88
|
+
hint: 'requires Process',
|
|
89
|
+
description: 'Three shell commands (git, node, uptime) executed via @rudderjs/process. Compares sequential vs parallel cost using Process.pool().',
|
|
90
|
+
packages: ['@rudderjs/process'],
|
|
91
|
+
requires: ['process'],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
value: 'pennant',
|
|
95
|
+
label: 'Feature flags',
|
|
96
|
+
hint: 'requires Pennant + Auth',
|
|
97
|
+
description: 'Boolean, value, scoped, and Lottery features resolved against the current user. Sub-route guarded by FeatureMiddleware to demonstrate 403 blocking.',
|
|
98
|
+
packages: ['@rudderjs/pennant'],
|
|
99
|
+
requires: ['pennant', 'auth'],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
value: 'ws',
|
|
103
|
+
label: 'WebSocket chat',
|
|
104
|
+
hint: 'requires WebSocket / Broadcast',
|
|
105
|
+
description: 'Real-time chat + presence using @rudderjs/broadcast — multi-channel pub/sub over a single WebSocket connection.',
|
|
106
|
+
packages: ['@rudderjs/broadcast'],
|
|
107
|
+
requires: ['broadcast'],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
value: 'sync',
|
|
111
|
+
label: 'Yjs collaboration',
|
|
112
|
+
title: 'Collaborative editor',
|
|
113
|
+
hint: 'requires Sync',
|
|
114
|
+
description: 'Yjs CRDT live document with awareness cursors. Open in two tabs to see real-time sync over @rudderjs/sync.',
|
|
115
|
+
packages: ['@rudderjs/sync'],
|
|
116
|
+
requires: ['sync'],
|
|
117
|
+
},
|
|
16
118
|
];
|
|
17
119
|
export function availableDemos(orm, packages) {
|
|
18
120
|
return DEMOS.filter(d => {
|
|
@@ -23,4 +125,8 @@ export function availableDemos(orm, packages) {
|
|
|
23
125
|
return true;
|
|
24
126
|
});
|
|
25
127
|
}
|
|
128
|
+
/** Default href for a demo card — `/demos/<value>`. */
|
|
129
|
+
export function demoHref(spec) {
|
|
130
|
+
return `/demos/${spec.value}`;
|
|
131
|
+
}
|
|
26
132
|
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/templates/demos/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/templates/demos/registry.ts"],"names":[],"mappings":"AAqBA,6EAA6E;AAC7E,MAAM,UAAU,SAAS,CAAC,IAAc;IACtC,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAA;AACjC,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAA4B;IAC5C;QACE,KAAK,EAAQ,SAAS;QACtB,KAAK,EAAQ,cAAc;QAC3B,IAAI,EAAS,uBAAuB;QACpC,WAAW,EAAE,4GAA4G;QACzH,QAAQ,EAAK,CAAC,sBAAsB,EAAE,gBAAgB,CAAC;KACxD;IACD;QACE,KAAK,EAAQ,OAAO;QACpB,KAAK,EAAQ,eAAe;QAC5B,IAAI,EAAS,kCAAkC;QAC/C,WAAW,EAAE,mIAAmI;QAChJ,QAAQ,EAAK,CAAC,iBAAiB,CAAC;KACjC;IACD;QACE,KAAK,EAAQ,OAAO;QACpB,KAAK,EAAQ,YAAY;QACzB,KAAK,EAAQ,OAAO;QACpB,IAAI,EAAS,cAAc;QAC3B,WAAW,EA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,IAAI,GAAG,KAAK,KAAK;YAAE,OAAO,KAAK,CAAA;QAChD,IAAI,CAAC,CAAC,QAAQ;YAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;QACzD,OAAO,IAAI,CAAA;IACb,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,QAAQ,CAAC,IAA6B;IACpD,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,CAAA;AAC/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rudder-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
21
|
"import": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./demos-registry": {
|
|
24
|
+
"types": "./dist/templates/demos/registry.d.ts",
|
|
25
|
+
"import": "./dist/templates/demos/registry.js"
|
|
22
26
|
}
|
|
23
27
|
},
|
|
24
28
|
"dependencies": {
|