@origostudio/origo-design 0.0.39 → 0.0.41
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/.vscode/origo-badl.code-snippets +60 -0
- package/CHANGELOG.md +3 -3
- package/dist/packages/angular-renderer/CHANGELOG.md +14 -0
- package/dist/packages/angular-renderer/package.json +4 -4
- package/dist/packages/angular-renderer/src/adapters/web/adapter.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/breadcrumbs/breadcrumbs.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/button/button.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/card/card.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/checkbox/checkbox.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/chip/chip.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/data-grid/data-grid.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/form-field/form-field.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/hbox/hbox.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/label/label.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/list/list.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/radio-group/radio-group.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/select/select.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/sidebar/sidebar.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/switch/switch.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/tabs/tabs.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/text-input/text-input.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/textarea/textarea.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/components/primitives/vbox/vbox.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/lib/renderer.component.d.ts +1 -1
- package/dist/packages/angular-renderer/src/lib/theme.provider.js +1 -1
- package/dist/packages/angular-renderer/src/lib/theme.provider.js.map +1 -1
- package/dist/packages/cli/CHANGELOG.md +20 -0
- package/dist/packages/cli/package.json +2 -2
- package/dist/packages/cli/package.json.bak +2 -2
- package/dist/packages/cli/src/commands/generate/index.js +2 -0
- package/dist/packages/cli/src/commands/generate/index.js.map +1 -1
- package/dist/packages/cli/src/commands/generate/page.d.ts +2 -0
- package/dist/packages/cli/src/commands/generate/page.js +27 -0
- package/dist/packages/cli/src/commands/generate/page.js.map +1 -0
- package/dist/packages/cli/src/lib/generator.d.ts +4 -0
- package/dist/packages/cli/src/lib/generator.js +108 -20
- package/dist/packages/cli/src/lib/generator.js.map +1 -1
- package/dist/packages/cli/src/lib/validation.js +1 -1
- package/dist/packages/cli/src/lib/validation.js.map +1 -1
- package/dist/packages/cli/src/templates/index.d.ts +2 -0
- package/dist/packages/cli/src/templates/index.js +16 -0
- package/dist/packages/cli/src/templates/index.js.map +1 -1
- package/dist/packages/cli/src/templates/list-detail.json +14 -0
- package/dist/packages/cli/src/templates/login.json +15 -0
- package/dist/packages/core/CHANGELOG.md +14 -0
- package/dist/packages/core/package.json +2 -2
- package/dist/packages/core/package.json.bak +2 -2
- package/dist/packages/design-tokens/CHANGELOG.md +14 -0
- package/dist/packages/design-tokens/package.json +2 -2
- package/package.json +1 -1
- package/packages/angular-renderer/CHANGELOG.md +14 -0
- package/packages/angular-renderer/package.json +4 -4
- package/packages/angular-renderer/src/adapters/web/adapter.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/breadcrumbs/breadcrumbs.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/breadcrumbs/breadcrumbs.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/button/button.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/button/button.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/card/card.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/card/card.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/checkbox/checkbox.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/checkbox/checkbox.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/chip/chip.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/chip/chip.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/data-grid/data-grid.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/data-grid/data-grid.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/form-field/form-field.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/form-field/form-field.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/hbox/hbox.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/hbox/hbox.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/label/label.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/label/label.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/list/list.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/list/list.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/radio-group/radio-group.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/radio-group/radio-group.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/select/select.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/select/select.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/sidebar/sidebar.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/sidebar/sidebar.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/switch/switch.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/switch/switch.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/tabs/tabs.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/tabs/tabs.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/text-input/text-input.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/text-input/text-input.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/textarea/textarea.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/textarea/textarea.component.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/vbox/vbox.component.pw.ts +1 -1
- package/packages/angular-renderer/src/components/primitives/vbox/vbox.component.ts +1 -1
- package/packages/angular-renderer/src/lib/renderer.component.ts +1 -1
- package/packages/angular-renderer/src/lib/theme.provider.ts +1 -1
- package/packages/cli/CHANGELOG.md +20 -0
- package/packages/cli/package.json +2 -2
- package/packages/cli/src/commands/generate/index.ts +2 -0
- package/packages/cli/src/commands/generate/page.ts +27 -0
- package/packages/cli/src/lib/generator.ts +128 -19
- package/packages/cli/src/lib/validation.ts +1 -1
- package/packages/cli/src/templates/index.ts +16 -0
- package/packages/cli/src/templates/list-detail.json +14 -0
- package/packages/cli/src/templates/login.json +15 -0
- package/packages/core/CHANGELOG.md +14 -0
- package/packages/core/package-lock.json +2 -2
- package/packages/core/package.json +2 -2
- package/packages/design-tokens/CHANGELOG.md +14 -0
- package/packages/design-tokens/package.json +2 -2
- package/packages/devtools/CHANGELOG.md +14 -0
- package/packages/devtools/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/packages/devtools/package.json +4 -4
- package/packages/devtools/src/content-script/injected.ts +1 -1
- package/packages/devtools/src/devtools-panel/app.component.ts +1 -1
- package/packages/devtools/src/devtools-panel/component-tree/component-tree.component.ts +1 -1
- package/packages/devtools/src/devtools-panel/metadata-detail/metadata-detail.component.ts +1 -1
- package/packages/devtools/src/types/messages.ts +1 -1
- package/packages/playground/CHANGELOG.md +14 -0
- package/packages/playground/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/packages/playground/package.json +4 -4
- package/packages/playground/src/app/app.config.ts +1 -1
- package/packages/playground/src/main.ts +1 -1
- package/packages/playground/src/preview/preview-root.component.ts +2 -2
- package/packages/playground/src/preview/preview.service.ts +6 -2
- package/packages/playground/src/workers/compiler.worker.ts +1 -1
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
SecurityContext,
|
|
12
12
|
} from '@angular/core';
|
|
13
13
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
14
|
-
import { InteractionContract } from '@
|
|
14
|
+
import { InteractionContract } from '@origostudio/core';
|
|
15
15
|
import { OrigoAdapter } from '../../../adapters/web/adapter';
|
|
16
16
|
import { WebExperienceAdapterService } from '../../../adapters/web/experience-adapter.service';
|
|
17
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { test, expect } from '@jscutlery/playwright-ct-angular';
|
|
2
2
|
import { VBoxComponent, VBoxProps } from './vbox.component';
|
|
3
|
-
import { InteractionContract } from '@
|
|
3
|
+
import { InteractionContract } from '@origostudio/core';
|
|
4
4
|
import AxeBuilder from '@axe-core/playwright';
|
|
5
5
|
|
|
6
6
|
test.describe('VBoxComponent Accessibility', () => {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
computed,
|
|
8
8
|
ViewEncapsulation,
|
|
9
9
|
} from '@angular/core';
|
|
10
|
-
import { InteractionContract } from '@
|
|
10
|
+
import { InteractionContract } from '@origostudio/core';
|
|
11
11
|
import { OrigoAdapter, ContainerComponent } from '../../../adapters/web/adapter';
|
|
12
12
|
|
|
13
13
|
export interface VBoxProps {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
viewChild,
|
|
8
8
|
DestroyRef,
|
|
9
9
|
} from '@angular/core';
|
|
10
|
-
import { ASTNode } from '@
|
|
10
|
+
import { ASTNode } from '@origostudio/core';
|
|
11
11
|
import { RENDERER_REGISTRY } from './renderer.tokens';
|
|
12
12
|
import { AdapterPipelineService, ContainerComponent } from '../adapters/web/adapter';
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { APP_INITIALIZER, Provider, PLATFORM_ID, Optional } from '@angular/core';
|
|
2
2
|
import { isPlatformBrowser, DOCUMENT } from '@angular/common';
|
|
3
3
|
|
|
4
|
-
import { loadAndInjectTheme, injectTheme } from '@
|
|
4
|
+
import { loadAndInjectTheme, injectTheme } from '@origostudio/design-tokens/runtime';
|
|
5
5
|
|
|
6
6
|
export interface OrigoThemeOptions {
|
|
7
7
|
url?: string;
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## 0.0.41 (2026-09-30)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- initialize workspace packages and implement CLI generator commands with templates ([b227117](https://github.com/OrigoStudio/origo-design/commit/b227117))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Hardik Patel @hardikpatelse
|
|
10
|
+
|
|
11
|
+
## 0.0.40 (2026-09-29)
|
|
12
|
+
|
|
13
|
+
### 🚀 Features
|
|
14
|
+
|
|
15
|
+
- initialize packages, documentation site, and release workflow ([e0f7371](https://github.com/OrigoStudio/origo-design/commit/e0f7371))
|
|
16
|
+
|
|
17
|
+
### ❤️ Thank You
|
|
18
|
+
|
|
19
|
+
- Hardik Patel @hardikpatelse
|
|
20
|
+
|
|
1
21
|
## 0.0.39 (2026-09-29)
|
|
2
22
|
|
|
3
23
|
This was a version bump only for cli to align it with other projects, there were no code changes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origostudio/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"origo": "./src/main.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@
|
|
12
|
+
"@origostudio/core": "0.0.41",
|
|
13
13
|
"commander": "^15.0.0",
|
|
14
14
|
"tslib": "^2.3.0"
|
|
15
15
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import { entityCommand } from './entity';
|
|
3
|
+
import { pageCommand } from './page';
|
|
3
4
|
import { ejectTemplates } from '../../lib/generator';
|
|
4
5
|
import { handleError } from '../../utils/errors';
|
|
5
6
|
|
|
@@ -7,6 +8,7 @@ export function generateCommand(): Command {
|
|
|
7
8
|
const cmd = new Command('generate').description('Generate Origo artifacts');
|
|
8
9
|
|
|
9
10
|
cmd.addCommand(entityCommand());
|
|
11
|
+
cmd.addCommand(pageCommand());
|
|
10
12
|
|
|
11
13
|
cmd
|
|
12
14
|
.option('--eject', 'Copy internal templates to .origo/templates/ for customization')
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Command, Option } from 'commander';
|
|
2
|
+
import { generatePage } from '../../lib/generator';
|
|
3
|
+
import { handleError } from '../../utils/errors';
|
|
4
|
+
|
|
5
|
+
export function pageCommand(): Command {
|
|
6
|
+
const cmd = new Command('page');
|
|
7
|
+
cmd
|
|
8
|
+
.description('Generate a BADL page boilerplate from a named template')
|
|
9
|
+
.addOption(
|
|
10
|
+
new Option('--template <name>', 'Template name')
|
|
11
|
+
.choices(['list-detail', 'login'])
|
|
12
|
+
.makeOptionMandatory(true)
|
|
13
|
+
)
|
|
14
|
+
.argument('<name>', 'Output schema name (PascalCase, e.g. UserListDetail)')
|
|
15
|
+
.option('--force', 'Overwrite existing file if it exists')
|
|
16
|
+
.option('--json', 'Output machine-readable JSON format')
|
|
17
|
+
.action(
|
|
18
|
+
async (name: string, options: { template: string; force?: boolean; json?: boolean }) => {
|
|
19
|
+
try {
|
|
20
|
+
await generatePage(options.template, name, { force: options.force, json: options.json });
|
|
21
|
+
} catch (error: unknown) {
|
|
22
|
+
handleError(error, { json: options.json });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
return cmd;
|
|
27
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as fs from 'fs/promises';
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import { CliError } from '../utils/errors';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
generateEntityTemplate,
|
|
6
|
+
generateListDetailTemplate,
|
|
7
|
+
generateLoginTemplate,
|
|
8
|
+
} from '../templates';
|
|
5
9
|
|
|
6
10
|
// FR-AI-005 Extensibility: Plugin registry for future AI integration
|
|
7
11
|
export interface GeneratorPlugin {
|
|
@@ -20,10 +24,10 @@ export async function generateEntity(
|
|
|
20
24
|
if (!name || !name.trim()) {
|
|
21
25
|
throw new CliError({ code: 'ERR_INVALID_NAME', message: 'Entity name must not be empty.' });
|
|
22
26
|
}
|
|
23
|
-
if (
|
|
27
|
+
if (!/^[a-zA-Z0-9_-]+$/.test(name)) {
|
|
24
28
|
throw new CliError({
|
|
25
29
|
code: 'ERR_INVALID_NAME',
|
|
26
|
-
message: 'Entity name must
|
|
30
|
+
message: 'Entity name must only contain alphanumeric characters, dashes, or underscores.',
|
|
27
31
|
});
|
|
28
32
|
}
|
|
29
33
|
|
|
@@ -50,19 +54,18 @@ export async function generateEntity(
|
|
|
50
54
|
for (const plugin of plugins) {
|
|
51
55
|
if (plugin.resolveTemplate) {
|
|
52
56
|
const resolved = await plugin.resolveTemplate(name);
|
|
53
|
-
if (resolved) {
|
|
57
|
+
if (resolved !== null && resolved !== undefined) {
|
|
54
58
|
content = resolved;
|
|
55
59
|
break;
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
|
|
60
|
-
if (
|
|
64
|
+
if (content === null) {
|
|
61
65
|
try {
|
|
62
66
|
const rawTemplate = await fs.readFile(userTemplatePath, 'utf-8');
|
|
63
67
|
content =
|
|
64
|
-
rawTemplate.
|
|
65
|
-
'\n';
|
|
68
|
+
rawTemplate.split('{{name}}').join(name).split('{{id}}').join(name.toLowerCase()) + '\n';
|
|
66
69
|
// Validate user template output
|
|
67
70
|
try {
|
|
68
71
|
JSON.parse(content);
|
|
@@ -80,17 +83,125 @@ export async function generateEntity(
|
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
|
|
86
|
+
await fs.mkdir(targetDir, { recursive: true });
|
|
87
|
+
|
|
88
|
+
if (!content) {
|
|
89
|
+
throw new CliError({
|
|
90
|
+
code: 'ERR_UNEXPECTED',
|
|
91
|
+
message: 'Failed to generate entity content.',
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
await fs.writeFile(targetPath, content as string, 'utf-8');
|
|
96
|
+
|
|
97
|
+
// FR-AI-005 Extensibility: Post-generate hooks
|
|
98
|
+
for (const plugin of plugins) {
|
|
99
|
+
if (plugin.postGenerate) {
|
|
100
|
+
await plugin.postGenerate({ name, targetPath });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (options.json) {
|
|
105
|
+
console.log(
|
|
106
|
+
JSON.stringify(
|
|
107
|
+
{
|
|
108
|
+
status: 'success',
|
|
109
|
+
data: {
|
|
110
|
+
file: `./schemas/${name.toLowerCase()}.json`,
|
|
111
|
+
entityName: name,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
null,
|
|
115
|
+
2
|
|
116
|
+
)
|
|
117
|
+
);
|
|
118
|
+
} else {
|
|
119
|
+
console.log(`Successfully generated entity ${name} at ./schemas/${name.toLowerCase()}.json`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export async function generatePage(
|
|
124
|
+
templateName: string,
|
|
125
|
+
name: string,
|
|
126
|
+
options: { force?: boolean; json?: boolean }
|
|
127
|
+
): Promise<void> {
|
|
128
|
+
if (!name || !name.trim()) {
|
|
129
|
+
throw new CliError({ code: 'ERR_INVALID_NAME', message: 'Page name must not be empty.' });
|
|
130
|
+
}
|
|
131
|
+
if (!/^[a-zA-Z0-9_-]+$/.test(name)) {
|
|
132
|
+
throw new CliError({
|
|
133
|
+
code: 'ERR_INVALID_NAME',
|
|
134
|
+
message: 'Page name must only contain alphanumeric characters, dashes, or underscores.',
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (templateName !== 'list-detail' && templateName !== 'login') {
|
|
139
|
+
throw new CliError({
|
|
140
|
+
code: 'ERR_UNKNOWN_TEMPLATE',
|
|
141
|
+
message: `Unknown template: ${templateName}. Must be 'list-detail' or 'login'.`,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const targetDir = path.join(process.cwd(), 'schemas');
|
|
146
|
+
const targetPath = path.join(targetDir, name.toLowerCase() + '.json');
|
|
147
|
+
const userTemplatePath = path.join(process.cwd(), '.origo', 'templates', templateName + '.json');
|
|
148
|
+
let content: string | null = null;
|
|
149
|
+
|
|
83
150
|
try {
|
|
84
|
-
await fs.
|
|
85
|
-
|
|
86
|
-
|
|
151
|
+
await fs.access(targetPath);
|
|
152
|
+
if (!options.force) {
|
|
153
|
+
throw new CliError({
|
|
154
|
+
code: 'ERR_FILE_EXISTS',
|
|
155
|
+
message: `File already exists: ${targetPath}. Use --force to overwrite.`,
|
|
156
|
+
context: { path: targetPath },
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
} catch (error: unknown) {
|
|
160
|
+
if (error instanceof CliError) throw error;
|
|
161
|
+
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// FR-AI-005 Extensibility: Check plugins first
|
|
165
|
+
for (const plugin of plugins) {
|
|
166
|
+
if (plugin.resolveTemplate) {
|
|
167
|
+
const resolved = await plugin.resolveTemplate(name);
|
|
168
|
+
if (resolved !== null && resolved !== undefined) {
|
|
169
|
+
content = resolved;
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
87
173
|
}
|
|
88
174
|
|
|
89
175
|
if (content === null) {
|
|
90
|
-
|
|
176
|
+
try {
|
|
177
|
+
const rawTemplate = await fs.readFile(userTemplatePath, 'utf-8');
|
|
178
|
+
content =
|
|
179
|
+
rawTemplate.split('{{name}}').join(name).split('{{id}}').join(name.toLowerCase()) + '\n';
|
|
180
|
+
// Validate user template output
|
|
181
|
+
try {
|
|
182
|
+
JSON.parse(content);
|
|
183
|
+
} catch {
|
|
184
|
+
throw new CliError({
|
|
185
|
+
code: 'ERR_INVALID_TEMPLATE',
|
|
186
|
+
message: `The user template at ${userTemplatePath} produced invalid JSON when substituted.`,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
} catch (err: unknown) {
|
|
190
|
+
if (err instanceof CliError) throw err;
|
|
191
|
+
const code = (err as NodeJS.ErrnoException).code;
|
|
192
|
+
if (code && code !== 'ENOENT') throw err;
|
|
193
|
+
|
|
194
|
+
if (templateName === 'list-detail') {
|
|
195
|
+
content = generateListDetailTemplate({ id: name.toLowerCase(), name });
|
|
196
|
+
} else {
|
|
197
|
+
content = generateLoginTemplate({ id: name.toLowerCase(), name });
|
|
198
|
+
}
|
|
199
|
+
}
|
|
91
200
|
}
|
|
92
201
|
|
|
93
|
-
await fs.
|
|
202
|
+
await fs.mkdir(targetDir, { recursive: true });
|
|
203
|
+
|
|
204
|
+
await fs.writeFile(targetPath, content as string, 'utf-8');
|
|
94
205
|
|
|
95
206
|
// FR-AI-005 Extensibility: Post-generate hooks
|
|
96
207
|
for (const plugin of plugins) {
|
|
@@ -106,7 +217,7 @@ export async function generateEntity(
|
|
|
106
217
|
status: 'success',
|
|
107
218
|
data: {
|
|
108
219
|
file: `./schemas/${name.toLowerCase()}.json`,
|
|
109
|
-
|
|
220
|
+
templateName: templateName,
|
|
110
221
|
},
|
|
111
222
|
},
|
|
112
223
|
null,
|
|
@@ -114,7 +225,9 @@ export async function generateEntity(
|
|
|
114
225
|
)
|
|
115
226
|
);
|
|
116
227
|
} else {
|
|
117
|
-
console.log(
|
|
228
|
+
console.log(
|
|
229
|
+
`Successfully generated page ${name} using ${templateName} template at ./schemas/${name.toLowerCase()}.json`
|
|
230
|
+
);
|
|
118
231
|
}
|
|
119
232
|
}
|
|
120
233
|
|
|
@@ -151,11 +264,7 @@ export async function ejectTemplates(options: { force?: boolean; json?: boolean
|
|
|
151
264
|
}
|
|
152
265
|
}
|
|
153
266
|
|
|
154
|
-
|
|
155
|
-
await fs.mkdir(destDir, { recursive: true });
|
|
156
|
-
} catch (err: unknown) {
|
|
157
|
-
if ((err as NodeJS.ErrnoException).code !== 'EEXIST') throw err;
|
|
158
|
-
}
|
|
267
|
+
await fs.mkdir(destDir, { recursive: true });
|
|
159
268
|
|
|
160
269
|
await Promise.all(
|
|
161
270
|
jsonFiles.map(file => fs.copyFile(path.join(srcDir, file), path.join(destDir, file)))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
|
-
import { BADLValidator, validateAST } from '@
|
|
3
|
+
import { BADLValidator, validateAST } from '@origostudio/core';
|
|
4
4
|
import { CliError } from '../utils/errors';
|
|
5
5
|
|
|
6
6
|
export interface ValidationOptions {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import origoTemplate from './origo.json';
|
|
2
2
|
import entityTemplate from './entity.json';
|
|
3
3
|
import extensionTemplate from './extension.json';
|
|
4
|
+
import listDetailTemplate from './list-detail.json';
|
|
5
|
+
import loginTemplate from './login.json';
|
|
4
6
|
|
|
5
7
|
export interface EntityOptions {
|
|
6
8
|
id?: string;
|
|
@@ -92,3 +94,17 @@ export function generateOrigoConfig(options: OrigoConfigOptions = {}): string {
|
|
|
92
94
|
);
|
|
93
95
|
}
|
|
94
96
|
}
|
|
97
|
+
|
|
98
|
+
export function generateListDetailTemplate(options: EntityOptions = {}): string {
|
|
99
|
+
const id = options.id || 'default-list-detail';
|
|
100
|
+
const name = options.name || 'DefaultListDetail';
|
|
101
|
+
validateIdentifier(id);
|
|
102
|
+
return JSON.stringify({ ...listDetailTemplate, id, name }, null, 2) + '\n';
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function generateLoginTemplate(options: EntityOptions = {}): string {
|
|
106
|
+
const id = options.id || 'default-login';
|
|
107
|
+
const name = options.name || 'DefaultLogin';
|
|
108
|
+
validateIdentifier(id);
|
|
109
|
+
return JSON.stringify({ ...loginTemplate, id, name }, null, 2) + '\n';
|
|
110
|
+
}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 0.0.41 (2026-09-30)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for core to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.0.40 (2026-09-29)
|
|
6
|
+
|
|
7
|
+
### 🚀 Features
|
|
8
|
+
|
|
9
|
+
- initialize packages, documentation site, and release workflow ([e0f7371](https://github.com/OrigoStudio/origo-design/commit/e0f7371))
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Hardik Patel @hardikpatelse
|
|
14
|
+
|
|
1
15
|
## 0.0.39 (2026-09-29)
|
|
2
16
|
|
|
3
17
|
### 🚀 Features
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
2
|
+
"name": "@origostudio/core",
|
|
3
3
|
"version": "0.0.17",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
|
-
"name": "@
|
|
8
|
+
"name": "@origostudio/core",
|
|
9
9
|
"version": "0.0.17",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ajv": "^8.17.1",
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 0.0.41 (2026-09-30)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for design-tokens to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.0.40 (2026-09-29)
|
|
6
|
+
|
|
7
|
+
### 🚀 Features
|
|
8
|
+
|
|
9
|
+
- initialize packages, documentation site, and release workflow ([e0f7371](https://github.com/OrigoStudio/origo-design/commit/e0f7371))
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Hardik Patel @hardikpatelse
|
|
14
|
+
|
|
1
15
|
## 0.0.39 (2026-09-29)
|
|
2
16
|
|
|
3
17
|
This was a version bump only for design-tokens to align it with other projects, there were no code changes.
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 0.0.41 (2026-09-30)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for devtools to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.0.40 (2026-09-29)
|
|
6
|
+
|
|
7
|
+
### 🚀 Features
|
|
8
|
+
|
|
9
|
+
- initialize packages, documentation site, and release workflow ([e0f7371](https://github.com/OrigoStudio/origo-design/commit/e0f7371))
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Hardik Patel @hardikpatelse
|
|
14
|
+
|
|
1
15
|
## 0.0.39 (2026-09-29)
|
|
2
16
|
|
|
3
17
|
This was a version bump only for devtools to align it with other projects, there were no code changes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"4.1.11","results":[[":src/devtools-panel/app.component.spec.ts",{"duration":
|
|
1
|
+
{"version":"4.1.11","results":[[":src/devtools-panel/app.component.spec.ts",{"duration":178.70303200000126,"failed":false}]]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
3
|
-
"version": "0.0.
|
|
2
|
+
"name": "@origostudio/devtools",
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@
|
|
7
|
-
"@origostudio/cli": "0.0.
|
|
6
|
+
"@origostudio/core": "0.0.41",
|
|
7
|
+
"@origostudio/cli": "0.0.41",
|
|
8
8
|
"@angular/core": "18.1.0",
|
|
9
9
|
"@angular/common": "18.1.0"
|
|
10
10
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DevToolsMessage } from '../types/messages';
|
|
2
|
-
import type { OrigoDevToolsAPI } from '@
|
|
2
|
+
import type { OrigoDevToolsAPI } from '@origostudio/angular-renderer';
|
|
3
3
|
|
|
4
4
|
// Declare the window variable based on the API type
|
|
5
5
|
declare global {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import type { RenderingPath } from '@
|
|
3
|
+
import type { RenderingPath } from '@origostudio/angular-renderer';
|
|
4
4
|
|
|
5
5
|
interface FlatNode {
|
|
6
6
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import type { MetadataSource, ResolutionChain } from '@
|
|
3
|
+
import type { MetadataSource, ResolutionChain } from '@origostudio/angular-renderer';
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
6
6
|
selector: 'origo-devtools-metadata-detail',
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 0.0.41 (2026-09-30)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for playground to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.0.40 (2026-09-29)
|
|
6
|
+
|
|
7
|
+
### 🚀 Features
|
|
8
|
+
|
|
9
|
+
- initialize packages, documentation site, and release workflow ([e0f7371](https://github.com/OrigoStudio/origo-design/commit/e0f7371))
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Hardik Patel @hardikpatelse
|
|
14
|
+
|
|
1
15
|
## 0.0.39 (2026-09-29)
|
|
2
16
|
|
|
3
17
|
This was a version bump only for playground to align it with other projects, there were no code changes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"4.1.11","results":[[":src/workers/compiler.worker.spec.ts",{"duration":
|
|
1
|
+
{"version":"4.1.11","results":[[":src/workers/compiler.worker.spec.ts",{"duration":3567.365329,"failed":false}],[":src/editor/badl-editor.component.spec.ts",{"duration":294.97996299999795,"failed":false}],[":src/editor/schema-registry.spec.ts",{"duration":31.46659699999873,"failed":false}],[":src/preview/preview.service.spec.ts",{"duration":90.75973000000158,"failed":false}],[":src/preview/preview-pane.component.spec.ts",{"duration":198.3648260000009,"failed":false}],[":src/preview/preview-root.component.spec.ts",{"duration":167.41953799999828,"failed":false}],[":src/app/app.component.spec.ts",{"duration":181.25265200000285,"failed":false}]]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
3
|
-
"version": "0.0.
|
|
2
|
+
"name": "@origostudio/playground",
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"private": true,
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@
|
|
7
|
-
"@origostudio/cli": "0.0.
|
|
6
|
+
"@origostudio/core": "0.0.41",
|
|
7
|
+
"@origostudio/cli": "0.0.41"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"@angular/common": "^18.0.0",
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
provideBrowserGlobalErrorListeners,
|
|
4
4
|
provideZonelessChangeDetection,
|
|
5
5
|
} from '@angular/core';
|
|
6
|
-
import { provideOrigo9Primitives } from '@
|
|
6
|
+
import { provideOrigo9Primitives } from '@origostudio/angular-renderer';
|
|
7
7
|
|
|
8
8
|
export const appConfig: ApplicationConfig = {
|
|
9
9
|
providers: [
|
|
@@ -2,7 +2,7 @@ import { bootstrapApplication } from '@angular/platform-browser';
|
|
|
2
2
|
import { appConfig } from './app/app.config';
|
|
3
3
|
import { AppComponent } from './app/app.component';
|
|
4
4
|
import { PreviewRootComponent } from './preview/preview-root.component';
|
|
5
|
-
import { initDevToolsBridge, _injectTestState } from '@
|
|
5
|
+
import { initDevToolsBridge, _injectTestState } from '@origostudio/angular-renderer';
|
|
6
6
|
|
|
7
7
|
const mockDomainJson = {
|
|
8
8
|
id: 'dom-identity',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component, HostListener, signal, computed, inject } from '@angular/core';
|
|
2
|
-
import { CanonicalAST, ASTNode } from '@
|
|
2
|
+
import { CanonicalAST, ASTNode } from '@origostudio/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { OrigoRendererComponent, WebExperienceAdapterService } from '@
|
|
4
|
+
import { OrigoRendererComponent, WebExperienceAdapterService } from '@origostudio/angular-renderer';
|
|
5
5
|
|
|
6
6
|
@Component({
|
|
7
7
|
selector: 'origo-root',
|