@snap/valdi 1.0.7 → 1.0.8
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/README.md +12 -3
- package/bundled-skills/CONTRIBUTING_SKILLS.md +74 -0
- package/bundled-skills/registry.json +20 -0
- package/bundled-skills/skills/valdi-android/skill.md +89 -0
- package/bundled-skills/skills/valdi-async/skill.md +246 -0
- package/bundled-skills/skills/valdi-async/tests/BUILD.bazel +19 -0
- package/bundled-skills/skills/valdi-async/tests/README.md +25 -0
- package/bundled-skills/skills/valdi-async/tests/src/reference.tsx +210 -0
- package/bundled-skills/skills/valdi-async/tests/tsconfig.json +1 -0
- package/bundled-skills/skills/valdi-bazel/skill.md +122 -0
- package/bundled-skills/skills/valdi-compiler/skill.md +108 -0
- package/bundled-skills/skills/valdi-component-tests/skill.md +430 -0
- package/bundled-skills/skills/valdi-component-tests/tests/BUILD.bazel +24 -0
- package/bundled-skills/skills/valdi-component-tests/tests/README.md +35 -0
- package/bundled-skills/skills/valdi-component-tests/tests/src/ProfileCard.tsx +38 -0
- package/bundled-skills/skills/valdi-component-tests/tests/test/ProfileCardTest.spec.tsx +107 -0
- package/bundled-skills/skills/valdi-component-tests/tests/tsconfig.json +1 -0
- package/bundled-skills/skills/valdi-cpp-runtime/skill.md +103 -0
- package/bundled-skills/skills/valdi-custom-view/skill.md +62 -0
- package/bundled-skills/skills/valdi-ios/skill.md +93 -0
- package/bundled-skills/skills/valdi-migrate/skill.md +175 -0
- package/bundled-skills/skills/valdi-migrate/tests/BUILD.bazel +23 -0
- package/bundled-skills/skills/valdi-migrate/tests/README.md +70 -0
- package/bundled-skills/skills/valdi-migrate/tests/check_antipatterns.py +89 -0
- package/bundled-skills/skills/valdi-migrate/tests/compose_example.kt +94 -0
- package/bundled-skills/skills/valdi-migrate/tests/flutter_example.dart +129 -0
- package/bundled-skills/skills/valdi-migrate/tests/react_example.tsx +98 -0
- package/bundled-skills/skills/valdi-migrate/tests/src/expected_valdi.tsx +267 -0
- package/bundled-skills/skills/valdi-migrate/tests/tsconfig.json +3 -0
- package/bundled-skills/skills/valdi-overview/skill.md +63 -0
- package/bundled-skills/skills/valdi-perf/skill.md +197 -0
- package/bundled-skills/skills/valdi-perf/tests/BUILD.bazel +19 -0
- package/bundled-skills/skills/valdi-perf/tests/README.md +26 -0
- package/bundled-skills/skills/valdi-perf/tests/src/reference.tsx +202 -0
- package/bundled-skills/skills/valdi-perf/tests/tsconfig.json +1 -0
- package/bundled-skills/skills/valdi-polyglot-module/skill.md +85 -0
- package/bundled-skills/skills/valdi-setup/skill.md +129 -0
- package/bundled-skills/skills/valdi-testing/skill.md +65 -0
- package/bundled-skills/skills/valdi-tsx/skill.md +385 -0
- package/bundled-skills/skills/valdi-tsx/tests/BUILD.bazel +19 -0
- package/bundled-skills/skills/valdi-tsx/tests/README.md +29 -0
- package/bundled-skills/skills/valdi-tsx/tests/src/reference.tsx +173 -0
- package/bundled-skills/skills/valdi-tsx/tests/tsconfig.json +1 -0
- package/dist/commands/bootstrap.js +0 -7
- package/dist/commands/newModule.js +10 -14
- package/dist/commands/skills.js +16 -0
- package/dist/commands/skills_commands/create.js +125 -0
- package/dist/commands/skills_commands/install.js +96 -0
- package/dist/commands/skills_commands/list.js +83 -0
- package/dist/commands/skills_commands/remove.js +41 -0
- package/dist/commands/skills_commands/update.js +59 -0
- package/dist/core/constants.js +0 -1
- package/dist/setup/versions.js +1 -1
- package/dist/utils/skillsAdapters.js +140 -0
- package/dist/utils/skillsRegistry.js +40 -0
- package/package.json +6 -1
- package/.bazelignore +0 -2
- package/.bootstrap/apps/cli_application/BUILD.bazel.template +0 -7
- package/.bootstrap/apps/cli_application/modules/{{MODULE_NAME}}/BUILD.bazel.template +0 -11
- package/.bootstrap/apps/cli_application/modules/{{MODULE_NAME}}/src/index.ts +0 -1
- package/.bootstrap/apps/ui_application/.eslint.rc +0 -27
- package/.bootstrap/apps/ui_application/BUILD.bazel.template +0 -19
- package/.bootstrap/apps/ui_application/modules/{{MODULE_NAME}}/BUILD.bazel.template +0 -21
- package/.bootstrap/apps/ui_application/modules/{{MODULE_NAME}}/res/valdi@3x.png +0 -0
- package/.bootstrap/apps/ui_application/modules/{{MODULE_NAME}}/src/App.tsx +0 -133
- package/.bootstrap/apps/ui_application/package.json +0 -24
- package/.bootstrap/modules/cpp_bridge_module/BUILD.bazel.template +0 -21
- package/.bootstrap/modules/cpp_bridge_module/cpp/CalculatorModuleFactory.cpp.template +0 -28
- package/.bootstrap/modules/cpp_bridge_module/src/Calculator.d.ts +0 -4
- package/.bootstrap/modules/ios_android_bridge_module/BUILD.bazel.template +0 -39
- package/.bootstrap/modules/ios_android_bridge_module/android/CalculatorModuleFactory.kt.template +0 -18
- package/.bootstrap/modules/ios_android_bridge_module/ios/SCCCalculatorModuleFactory.m.template +0 -31
- package/.bootstrap/modules/ios_android_bridge_module/src/Calculator.d.ts +0 -4
- package/.bootstrap/modules/ios_android_view_module/BUILD.bazel.template +0 -41
- package/.bootstrap/modules/ios_android_view_module/android/CircleView.kt.template +0 -42
- package/.bootstrap/modules/ios_android_view_module/android/CircleViewAttributesBinder.kt.template +0 -60
- package/.bootstrap/modules/ios_android_view_module/ios/SCCCircleView.h +0 -6
- package/.bootstrap/modules/ios_android_view_module/ios/SCCCircleView.m +0 -82
- package/.bootstrap/modules/ios_android_view_module/src/Circle.tsx.template +0 -15
- package/.bootstrap/modules/ui_component/BUILD.bazel.template +0 -34
- package/.bootstrap/modules/ui_component/src/NewModuleComponent.tsx +0 -45
- package/.config/copyconfig.json +0 -10
- package/.editorconfig +0 -21
- package/.eslintignore +0 -1
- package/.eslintrc.js +0 -72
- package/.github/README.md +0 -164
- package/.metadata/.bazelrc.template +0 -91
- package/.metadata/.bazelversion.template +0 -1
- package/.metadata/.cursorrules.template +0 -60
- package/.metadata/.editorconfig.template +0 -37
- package/.metadata/.eslintrc.js.template +0 -27
- package/.metadata/.gitignore.template +0 -4
- package/.metadata/.prettierrc.json.template +0 -7
- package/.metadata/.watchmanconfig.template +0 -8
- package/.metadata/AGENTS.md.template +0 -282
- package/.metadata/README.md.template +0 -31
- package/.metadata/WORKSPACE.template +0 -57
- package/.metadata/config.yaml.template +0 -1
- package/.metadata/package.json.template +0 -23
- package/.prettierignore +0 -2
- package/.prettierrc.json +0 -7
- package/LINUX_COMPATIBILITY.md +0 -248
- package/prettier.config.js +0 -4
- package/scripts/sync-agents-md.sh +0 -44
- package/scripts/update-agents-templates.ts +0 -170
- package/spec/support/jasmine.json +0 -6
- package/src/commands/bootstrap.ts +0 -410
- package/src/commands/build.ts +0 -89
- package/src/commands/devSetup.ts +0 -17
- package/src/commands/doctor.ts +0 -1832
- package/src/commands/export.ts +0 -131
- package/src/commands/hotreload.ts +0 -108
- package/src/commands/install.ts +0 -93
- package/src/commands/lint.ts +0 -15
- package/src/commands/lint_commands/lintCheck.ts +0 -53
- package/src/commands/lint_commands/lintFormat.ts +0 -49
- package/src/commands/log.ts +0 -108
- package/src/commands/newModule.ts +0 -286
- package/src/commands/package.ts +0 -102
- package/src/commands/projectsync.ts +0 -488
- package/src/commands/test.ts +0 -68
- package/src/core/constants.ts +0 -98
- package/src/core/errors.ts +0 -10
- package/src/index.ts +0 -27
- package/src/setup/DevSetupHelper.ts +0 -290
- package/src/setup/linuxSetup.ts +0 -261
- package/src/setup/macOSSetup.ts +0 -156
- package/src/setup/setupEntryPoint.ts +0 -64
- package/src/setup/versions.ts +0 -8
- package/src/utils/ArgumentsResolver.ts +0 -23
- package/src/utils/BazelClient.ts +0 -285
- package/src/utils/Digraph.ts +0 -81
- package/src/utils/LoadingIndicator.ts +0 -43
- package/src/utils/applicationUtils.ts +0 -276
- package/src/utils/buildInfo.ts +0 -99
- package/src/utils/byString.ts +0 -3
- package/src/utils/cliUtils.ts +0 -112
- package/src/utils/copyBootstrapFiles.ts +0 -30
- package/src/utils/deviceUtils.ts +0 -76
- package/src/utils/errorUtils.ts +0 -63
- package/src/utils/fileUtils.ts +0 -257
- package/src/utils/githubUtils.ts +0 -102
- package/src/utils/jsonUtils.ts +0 -30
- package/src/utils/lintUtils.ts +0 -190
- package/src/utils/linuxDistro.spec.ts +0 -219
- package/src/utils/linuxDistro.ts +0 -326
- package/src/utils/logUtils.ts +0 -9
- package/src/utils/pathUtils.ts +0 -12
- package/src/utils/stringUtils.spec.ts +0 -95
- package/src/utils/stringUtils.ts +0 -103
- package/src/utils/tempDir.ts +0 -24
- package/src/utils/zipUtils.ts +0 -14
- package/test/ValdiSmokeTest.ts +0 -279
- package/test/helpers/AsyncHelpers.ts +0 -113
- package/test/helpers/CommandHelpers.ts +0 -37
- package/test/helpers/ProjectHelpers.ts +0 -153
- package/test/helpers/StreamHelpers.ts +0 -37
- package/test/helpers/TypeScriptClient.ts +0 -217
- package/tsconfig.dist.json +0 -8
- package/tsconfig.json +0 -42
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Sync AGENTS.md content between root and bootstrap templates
|
|
3
|
-
# This script extracts common sections from the root AGENTS.md and updates bootstrap templates
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
-
CLI_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
9
|
-
OPEN_SOURCE_ROOT="$(cd "$CLI_ROOT/../.." && pwd)"
|
|
10
|
-
|
|
11
|
-
ROOT_AGENTS="$OPEN_SOURCE_ROOT/AGENTS.md"
|
|
12
|
-
UI_AGENTS_TEMPLATE="$CLI_ROOT/.bootstrap/apps/ui_application/AGENTS.md.template"
|
|
13
|
-
CLI_AGENTS_TEMPLATE="$CLI_ROOT/.bootstrap/apps/cli_application/AGENTS.md.template"
|
|
14
|
-
|
|
15
|
-
echo "Syncing AGENTS.md patterns from root to bootstrap templates..."
|
|
16
|
-
echo "Root AGENTS.md: $ROOT_AGENTS"
|
|
17
|
-
echo "UI Template: $UI_AGENTS_TEMPLATE"
|
|
18
|
-
echo "CLI Template: $CLI_AGENTS_TEMPLATE"
|
|
19
|
-
|
|
20
|
-
# Extract the Anti-Hallucination section from root AGENTS.md
|
|
21
|
-
# This ensures patterns stay consistent
|
|
22
|
-
ANTI_HALLUCINATION_START="## 🚨 AI Anti-Hallucination: This is NOT React!"
|
|
23
|
-
ANTI_HALLUCINATION_END="## Directory Structure"
|
|
24
|
-
|
|
25
|
-
# For now, just validate that the files exist
|
|
26
|
-
if [ ! -f "$ROOT_AGENTS" ]; then
|
|
27
|
-
echo "Error: Root AGENTS.md not found at $ROOT_AGENTS"
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
if [ ! -f "$UI_AGENTS_TEMPLATE" ]; then
|
|
32
|
-
echo "Error: UI AGENTS.md template not found at $UI_AGENTS_TEMPLATE"
|
|
33
|
-
exit 1
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
if [ ! -f "$CLI_AGENTS_TEMPLATE" ]; then
|
|
37
|
-
echo "Error: CLI AGENTS.md template not found at $CLI_AGENTS_TEMPLATE"
|
|
38
|
-
exit 1
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
echo "✅ All AGENTS.md files found"
|
|
42
|
-
echo ""
|
|
43
|
-
echo "Note: This script currently validates file existence."
|
|
44
|
-
echo "To fully implement sync, run: npm run update-agents-templates"
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ts-node
|
|
2
|
-
/**
|
|
3
|
-
* Updates AGENTS.md templates in bootstrap directory with correct Valdi patterns
|
|
4
|
-
* Ensures consistency with root AGENTS.md anti-hallucination guidelines
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import fs from 'fs';
|
|
8
|
-
import path from 'path';
|
|
9
|
-
|
|
10
|
-
const CLI_ROOT = path.join(__dirname, '..');
|
|
11
|
-
const OPEN_SOURCE_ROOT = path.join(CLI_ROOT, '../..');
|
|
12
|
-
|
|
13
|
-
// Common Valdi patterns section that should be consistent across all AGENTS.md files
|
|
14
|
-
const VALDI_PATTERNS_SECTION = `
|
|
15
|
-
## 🚨 CRITICAL: Valdi is NOT React!
|
|
16
|
-
|
|
17
|
-
**AI assistants often suggest React patterns that DON'T EXIST in Valdi.** This is because TSX/JSX syntax looks like React, but Valdi compiles to native code.
|
|
18
|
-
|
|
19
|
-
### ❌ FORBIDDEN Patterns (Don't exist in Valdi)
|
|
20
|
-
|
|
21
|
-
\`\`\`typescript
|
|
22
|
-
// ❌ WRONG - React hooks don't exist
|
|
23
|
-
const [count, setCount] = useState(0);
|
|
24
|
-
useEffect(() => { ... }, []);
|
|
25
|
-
|
|
26
|
-
// ❌ WRONG - Functional components don't exist
|
|
27
|
-
const MyComponent = () => <view />;
|
|
28
|
-
|
|
29
|
-
// ❌ WRONG - Common AI mistakes
|
|
30
|
-
this.markNeedsRender(); // Doesn't exist!
|
|
31
|
-
this.props.title; // Should be: this.viewModel.title
|
|
32
|
-
onMount() { } // Should be: onCreate()
|
|
33
|
-
onUpdate() { } // Should be: onViewModelUpdate()
|
|
34
|
-
onUnmount() { } // Should be: onDestroy()
|
|
35
|
-
this.context.get(Service); // Wrong pattern, use withProviders()
|
|
36
|
-
\`\`\`
|
|
37
|
-
|
|
38
|
-
### ✅ CORRECT Valdi Patterns
|
|
39
|
-
|
|
40
|
-
\`\`\`typescript
|
|
41
|
-
// ✅ Stateful component with state
|
|
42
|
-
import { StatefulComponent } from 'valdi_core/src/Component';
|
|
43
|
-
|
|
44
|
-
class MyComponent extends StatefulComponent<ViewModel, State> {
|
|
45
|
-
state = { count: 0 };
|
|
46
|
-
|
|
47
|
-
// Lifecycle methods
|
|
48
|
-
onCreate() { } // Component created
|
|
49
|
-
onViewModelUpdate(prev: ViewModel) { } // Props changed
|
|
50
|
-
onDestroy() { } // Before removal
|
|
51
|
-
|
|
52
|
-
// State updates
|
|
53
|
-
handleClick() {
|
|
54
|
-
this.setState({ count: this.state.count + 1 }); // Auto re-renders
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Render (returns void, JSX is statement)
|
|
58
|
-
onRender() {
|
|
59
|
-
<button
|
|
60
|
-
title={\`Count: \${this.state.count}\`}
|
|
61
|
-
onPress={this.handleClick}
|
|
62
|
-
/>;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// ✅ Stateless component (props only)
|
|
67
|
-
import { Component } from 'valdi_core/src/Component';
|
|
68
|
-
|
|
69
|
-
class SimpleComponent extends Component<ViewModel> {
|
|
70
|
-
onRender() {
|
|
71
|
-
<label value={this.viewModel.title} />; // viewModel, not props!
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
\`\`\`
|
|
75
|
-
|
|
76
|
-
### Key Differences from React
|
|
77
|
-
|
|
78
|
-
| Concept | React | Valdi |
|
|
79
|
-
|---------|-------|-------|
|
|
80
|
-
| **Components** | Functions or classes | Classes only (Component or StatefulComponent) |
|
|
81
|
-
| **State** | \`useState\` hook | \`state = { }\` + \`setState()\` |
|
|
82
|
-
| **Props** | \`this.props\` | \`this.viewModel\` |
|
|
83
|
-
| **Lifecycle** | \`useEffect\` | \`onCreate\`, \`onViewModelUpdate\`, \`onDestroy\` |
|
|
84
|
-
| **Re-render** | \`setCount(...)\` | \`this.setState(...)\` |
|
|
85
|
-
| **Return** | \`return <view />\` | \`<view />;\` (statement, returns void) |
|
|
86
|
-
|
|
87
|
-
For complete framework documentation, see: https://github.com/Snapchat/Valdi
|
|
88
|
-
`;
|
|
89
|
-
|
|
90
|
-
function updateAgentsTemplate(templatePath: string, _isCliApp: boolean) {
|
|
91
|
-
console.log(`\nUpdating: ${path.relative(CLI_ROOT, templatePath)}`);
|
|
92
|
-
|
|
93
|
-
let content = fs.readFileSync(templatePath, 'utf-8');
|
|
94
|
-
|
|
95
|
-
// Fix incorrect lifecycle method comments
|
|
96
|
-
content = content.replace(
|
|
97
|
-
/\/\/ onMount\(\) - Called when component is first mounted/g,
|
|
98
|
-
'// onCreate() - Called when component is first created'
|
|
99
|
-
);
|
|
100
|
-
content = content.replace(
|
|
101
|
-
/\/\/ onUnmount\(\) - Called before component is removed/g,
|
|
102
|
-
'// onDestroy() - Called before component is removed'
|
|
103
|
-
);
|
|
104
|
-
content = content.replace(
|
|
105
|
-
/\/\/ onUpdate\(prevProps\) - Called when component updates/g,
|
|
106
|
-
'// onViewModelUpdate(previousViewModel) - Called when viewModel updates'
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
// Find where to insert the patterns section (after Overview, before Project Structure or Development Workflow)
|
|
110
|
-
const insertAfter = '## Overview';
|
|
111
|
-
const insertIndex = content.indexOf(insertAfter);
|
|
112
|
-
|
|
113
|
-
if (insertIndex === -1) {
|
|
114
|
-
console.warn(' ⚠️ Could not find Overview section, skipping pattern insertion');
|
|
115
|
-
} else {
|
|
116
|
-
// Find the end of the Overview section (next ## heading)
|
|
117
|
-
const nextHeadingMatch = content.substring(insertIndex + insertAfter.length).match(/\n## /);
|
|
118
|
-
if (nextHeadingMatch) {
|
|
119
|
-
const insertPosition = insertIndex + insertAfter.length + nextHeadingMatch.index!;
|
|
120
|
-
|
|
121
|
-
// Check if patterns section already exists
|
|
122
|
-
if (!content.includes('🚨 CRITICAL: Valdi is NOT React!')) {
|
|
123
|
-
content =
|
|
124
|
-
content.substring(0, insertPosition) +
|
|
125
|
-
'\n' +
|
|
126
|
-
VALDI_PATTERNS_SECTION +
|
|
127
|
-
'\n' +
|
|
128
|
-
content.substring(insertPosition);
|
|
129
|
-
console.log(' ✅ Added Valdi patterns section');
|
|
130
|
-
} else {
|
|
131
|
-
console.log(' ℹ️ Patterns section already exists, preserving custom content');
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Update Provider pattern example if it exists
|
|
137
|
-
if (content.includes('import { Provider }')) {
|
|
138
|
-
console.log(' ⚠️ Found old Provider pattern, consider updating to withProviders() HOC');
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
fs.writeFileSync(templatePath, content, 'utf-8');
|
|
142
|
-
console.log(' ✅ Template updated');
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
function main() {
|
|
146
|
-
console.log('Updating AGENTS.md bootstrap templates with correct Valdi patterns...\n');
|
|
147
|
-
|
|
148
|
-
const uiTemplate = path.join(CLI_ROOT, '.bootstrap/apps/ui_application/AGENTS.md.template');
|
|
149
|
-
const cliTemplate = path.join(CLI_ROOT, '.bootstrap/apps/cli_application/AGENTS.md.template');
|
|
150
|
-
|
|
151
|
-
if (fs.existsSync(uiTemplate)) {
|
|
152
|
-
updateAgentsTemplate(uiTemplate, false);
|
|
153
|
-
} else {
|
|
154
|
-
console.warn(`UI template not found: ${uiTemplate}`);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (fs.existsSync(cliTemplate)) {
|
|
158
|
-
updateAgentsTemplate(cliTemplate, true);
|
|
159
|
-
} else {
|
|
160
|
-
console.warn(`CLI template not found: ${cliTemplate}`);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
console.log('\n✅ All templates updated!');
|
|
164
|
-
console.log('\nNext steps:');
|
|
165
|
-
console.log(' 1. Review the changes in the templates');
|
|
166
|
-
console.log(' 2. Test with: valdi bootstrap (in a test directory)');
|
|
167
|
-
console.log(' 3. Commit the updated templates');
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
main();
|
|
@@ -1,410 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import inquirer from 'inquirer';
|
|
3
|
-
import type { Argv } from 'yargs';
|
|
4
|
-
import { ANSI_COLORS, BOOTSTRAP_DIR_PATH, META_DIR_PATH, TEMPLATE_BASE_PATHS, VALDI_CONFIG_PATHS } from '../core/constants';
|
|
5
|
-
import { CliError } from '../core/errors';
|
|
6
|
-
import type { ArgumentsResolver } from '../utils/ArgumentsResolver';
|
|
7
|
-
import { BazelClient } from '../utils/BazelClient';
|
|
8
|
-
import type { CliChoice } from '../utils/cliUtils';
|
|
9
|
-
import { getUserChoice, getUserConfirmation } from '../utils/cliUtils';
|
|
10
|
-
import { copyBootstrapFiles } from '../utils/copyBootstrapFiles';
|
|
11
|
-
import { makeCommandHandler } from '../utils/errorUtils';
|
|
12
|
-
import type { Replacements } from '../utils/fileUtils';
|
|
13
|
-
import {
|
|
14
|
-
TemplateFile,
|
|
15
|
-
deleteAll,
|
|
16
|
-
fileExists,
|
|
17
|
-
isDirectoryEmpty,
|
|
18
|
-
processReplacements,
|
|
19
|
-
resolveFilePath,
|
|
20
|
-
} from '../utils/fileUtils';
|
|
21
|
-
import { wrapInColor } from '../utils/logUtils';
|
|
22
|
-
import { toPascalCase, sanitizeProjectName, validateProjectName } from '../utils/stringUtils';
|
|
23
|
-
import { getAllProjectSyncTargets, runProjectSync } from './projectsync';
|
|
24
|
-
import { getLatestReleaseTag } from '../utils/githubUtils';
|
|
25
|
-
|
|
26
|
-
interface CommandParameters {
|
|
27
|
-
confirmBootstrap: boolean;
|
|
28
|
-
projectName: string;
|
|
29
|
-
applicationType: string;
|
|
30
|
-
valdiImport: string;
|
|
31
|
-
valdiWidgetsImport: string;
|
|
32
|
-
valdiVersion: string;
|
|
33
|
-
valdiWidgetsVersion: string;
|
|
34
|
-
skipProjectsync: boolean;
|
|
35
|
-
withCleanup: boolean;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
interface ApplicationTemplate {
|
|
39
|
-
name: string;
|
|
40
|
-
path: string;
|
|
41
|
-
description: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const ALL_APPLICATION_TEMPLATES: readonly ApplicationTemplate[] = [
|
|
45
|
-
{
|
|
46
|
-
name: 'UI Application',
|
|
47
|
-
path: 'ui_application',
|
|
48
|
-
description: `An application rendering UI in a window on iOS, Android and macOS.`,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: 'CLI Application',
|
|
52
|
-
path: 'cli_application',
|
|
53
|
-
description: `A command line application that runs in a terminal`,
|
|
54
|
-
},
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
const VALDI_GIT_URL = 'https://github.com/Snapchat/Valdi';
|
|
58
|
-
const VALDI_WIDGETS_GIT_URL = 'https://github.com/Snapchat/Valdi_Widgets';
|
|
59
|
-
|
|
60
|
-
/** Pinned Valdi release used by default for reproducible bootstraps. Bump when cutting a new Valdi release. */
|
|
61
|
-
const DEFAULT_VALDI_RELEASE_TAG = 'beta-0.0.3';
|
|
62
|
-
/** Pinned Valdi_Widgets release used by default. Should match the Valdi release cycle. */
|
|
63
|
-
const DEFAULT_VALDI_WIDGETS_RELEASE_TAG = 'beta-0.0.3';
|
|
64
|
-
|
|
65
|
-
const DEFAULT_VALDI_IMPORT = `
|
|
66
|
-
http_archive(
|
|
67
|
-
name = "valdi",
|
|
68
|
-
strip_prefix = "Valdi-{{VALDI_RELEASE_TAG}}",
|
|
69
|
-
url = "${VALDI_GIT_URL}/archive/{{VALDI_RELEASE_REF}}.tar.gz",
|
|
70
|
-
)`;
|
|
71
|
-
|
|
72
|
-
const DEFAULT_VALDI_WIDGETS_IMPORT = `
|
|
73
|
-
http_archive(
|
|
74
|
-
name = "valdi_widgets",
|
|
75
|
-
strip_prefix = "Valdi_Widgets-{{VALDI_WIDGETS_RELEASE_TAG}}",
|
|
76
|
-
url = "${VALDI_WIDGETS_GIT_URL}/archive/{{VALDI_WIDGETS_RELEASE_REF}}.tar.gz",
|
|
77
|
-
)`;
|
|
78
|
-
|
|
79
|
-
const LOCAL_VALDI_IMPORT_TEMPLATE = `
|
|
80
|
-
local_repository(
|
|
81
|
-
name = "valdi",
|
|
82
|
-
path = "{{PATH}}",
|
|
83
|
-
)
|
|
84
|
-
`;
|
|
85
|
-
|
|
86
|
-
const LOCAL_VALDI_WIDGETS_IMPORT_TEMPLATE = `
|
|
87
|
-
local_repository(
|
|
88
|
-
name = "valdi_widgets",
|
|
89
|
-
path = "{{PATH}}",
|
|
90
|
-
)
|
|
91
|
-
`;
|
|
92
|
-
|
|
93
|
-
function isAlreadyInitialized(): boolean {
|
|
94
|
-
return fileExists(path.join(process.cwd(), 'WORKSPACE'));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
async function getShouldBootstrap(argv: ArgumentsResolver<CommandParameters>): Promise<boolean> {
|
|
98
|
-
// Get confirmation on directory path
|
|
99
|
-
return argv.getArgumentOrResolve('confirmBootstrap', () => {
|
|
100
|
-
return getUserConfirmation('Do you want to create a new project in the current directory?', true);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const defaultProjectName = path.basename(process.cwd());
|
|
105
|
-
|
|
106
|
-
async function getApplicationType(argv: ArgumentsResolver<CommandParameters>): Promise<ApplicationTemplate> {
|
|
107
|
-
const applicationType = argv.getArgument('applicationType');
|
|
108
|
-
|
|
109
|
-
if (applicationType) {
|
|
110
|
-
const target = ALL_APPLICATION_TEMPLATES.find(target => target.path === applicationType);
|
|
111
|
-
|
|
112
|
-
if (target) {
|
|
113
|
-
return target;
|
|
114
|
-
} else {
|
|
115
|
-
throw new CliError(`Unknown application type: ${applicationType}`);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const choices: CliChoice<ApplicationTemplate>[] = ALL_APPLICATION_TEMPLATES.map(target => ({
|
|
120
|
-
name: `${wrapInColor(target.name, ANSI_COLORS.GREEN_COLOR)} . ${target.description}`,
|
|
121
|
-
value: target,
|
|
122
|
-
}));
|
|
123
|
-
|
|
124
|
-
return await getUserChoice(choices, `Please choose the application type:`);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
async function getProjectName(argv: ArgumentsResolver<CommandParameters>): Promise<string> {
|
|
128
|
-
return argv.getArgumentOrResolve('projectName', async () => {
|
|
129
|
-
let projectName = '';
|
|
130
|
-
let isValid = false;
|
|
131
|
-
|
|
132
|
-
while (!isValid) {
|
|
133
|
-
const result = await inquirer.prompt<{ projectName: string }>([
|
|
134
|
-
{
|
|
135
|
-
type: 'input',
|
|
136
|
-
name: 'projectName',
|
|
137
|
-
message: 'Please provide a name for this project:',
|
|
138
|
-
default: defaultProjectName,
|
|
139
|
-
},
|
|
140
|
-
]);
|
|
141
|
-
|
|
142
|
-
projectName = result.projectName;
|
|
143
|
-
const validationError = validateProjectName(projectName);
|
|
144
|
-
|
|
145
|
-
if (validationError) {
|
|
146
|
-
console.log(wrapInColor(`\n❌ ${validationError}\n`, ANSI_COLORS.RED_COLOR));
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
const sanitized = sanitizeProjectName(projectName);
|
|
151
|
-
if (sanitized !== projectName) {
|
|
152
|
-
console.log(
|
|
153
|
-
wrapInColor(
|
|
154
|
-
`\n⚠️ Project name will be sanitized from "${projectName}" to "${sanitized}"`,
|
|
155
|
-
ANSI_COLORS.YELLOW_COLOR,
|
|
156
|
-
),
|
|
157
|
-
);
|
|
158
|
-
const confirm = await getUserConfirmation('Do you want to continue with this name?', true);
|
|
159
|
-
if (!confirm) {
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
isValid = true;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return sanitizeProjectName(projectName);
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function resolveValdiReleaseTag(
|
|
172
|
-
argv: ArgumentsResolver<CommandParameters>,
|
|
173
|
-
gitUrl: string,
|
|
174
|
-
defaultTag: string,
|
|
175
|
-
versionOption: 'valdiVersion' | 'valdiWidgetsVersion' = 'valdiVersion',
|
|
176
|
-
): Promise<string> {
|
|
177
|
-
const override = argv.getArgument(versionOption);
|
|
178
|
-
if (!override) {
|
|
179
|
-
return Promise.resolve(defaultTag);
|
|
180
|
-
}
|
|
181
|
-
if (override === 'latest') {
|
|
182
|
-
return getLatestReleaseTag(gitUrl);
|
|
183
|
-
}
|
|
184
|
-
return Promise.resolve(override);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
function getValdiImport(argv: ArgumentsResolver<CommandParameters>, valdiReleaseRef: string): string {
|
|
188
|
-
const valdiImport = argv.getArgument('valdiImport');
|
|
189
|
-
if (valdiImport) {
|
|
190
|
-
return processReplacements(LOCAL_VALDI_IMPORT_TEMPLATE, { PATH: valdiImport });
|
|
191
|
-
} else {
|
|
192
|
-
const valdiReleaseTag = valdiReleaseRef.split('/').pop()!;
|
|
193
|
-
return processReplacements(DEFAULT_VALDI_IMPORT, {
|
|
194
|
-
VALDI_RELEASE_REF: valdiReleaseRef,
|
|
195
|
-
VALDI_RELEASE_TAG: valdiReleaseTag,
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
function getValdiWidgetsImport(argv: ArgumentsResolver<CommandParameters>, valdiWidgetsReleaseRef: string): string {
|
|
201
|
-
const valdiWidgetsImport = argv.getArgument('valdiWidgetsImport');
|
|
202
|
-
if (valdiWidgetsImport) {
|
|
203
|
-
return processReplacements(LOCAL_VALDI_WIDGETS_IMPORT_TEMPLATE, { PATH: valdiWidgetsImport });
|
|
204
|
-
} else {
|
|
205
|
-
const valdiWidgetsReleaseTag = valdiWidgetsReleaseRef.split('/').pop()!;
|
|
206
|
-
return processReplacements(DEFAULT_VALDI_WIDGETS_IMPORT, {
|
|
207
|
-
VALDI_WIDGETS_RELEASE_REF: valdiWidgetsReleaseRef,
|
|
208
|
-
VALDI_WIDGETS_RELEASE_TAG: valdiWidgetsReleaseTag,
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// Create files from templates
|
|
214
|
-
function initializeConfigFiles(
|
|
215
|
-
projectName: string,
|
|
216
|
-
template: ApplicationTemplate,
|
|
217
|
-
valdiImport: string,
|
|
218
|
-
valdiWidgetsImport: string,
|
|
219
|
-
) {
|
|
220
|
-
|
|
221
|
-
const TEMPLATE_FILES = [
|
|
222
|
-
TemplateFile.init(TEMPLATE_BASE_PATHS.USER_CONFIG).withOutputPath(resolveFilePath(VALDI_CONFIG_PATHS[0] ?? '')),
|
|
223
|
-
TemplateFile.init(TEMPLATE_BASE_PATHS.BAZEL_VERSION),
|
|
224
|
-
TemplateFile.init(TEMPLATE_BASE_PATHS.WORKSPACE).withReplacements({
|
|
225
|
-
WORKSPACE_NAME: projectName,
|
|
226
|
-
VALDI_IMPORT: valdiImport,
|
|
227
|
-
VALDI_WIDGETS_IMPORT: valdiWidgetsImport,
|
|
228
|
-
}),
|
|
229
|
-
TemplateFile.init(TEMPLATE_BASE_PATHS.BAZEL_RC),
|
|
230
|
-
TemplateFile.init(TEMPLATE_BASE_PATHS.README),
|
|
231
|
-
TemplateFile.init(TEMPLATE_BASE_PATHS.GIT_IGNORE),
|
|
232
|
-
TemplateFile.init(TEMPLATE_BASE_PATHS.WATCHMAN_CONFIG),
|
|
233
|
-
TemplateFile.init(TEMPLATE_BASE_PATHS.EDITOR_CONFIG),
|
|
234
|
-
TemplateFile.init(TEMPLATE_BASE_PATHS.CURSOR_RULES),
|
|
235
|
-
TemplateFile.init(TEMPLATE_BASE_PATHS.AGENTS).withReplacements({ MODULE_NAME: projectName }),
|
|
236
|
-
];
|
|
237
|
-
|
|
238
|
-
TEMPLATE_FILES.forEach(templateFile => {
|
|
239
|
-
console.log(
|
|
240
|
-
wrapInColor(`Creating ${templateFile.baseName} in ${templateFile.outputPath}...`, ANSI_COLORS.YELLOW_COLOR),
|
|
241
|
-
);
|
|
242
|
-
templateFile.expandTemplate();
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
// Copy GitHub templates directory (if it exists)
|
|
246
|
-
const replacements: Replacements = {
|
|
247
|
-
MODULE_NAME: projectName,
|
|
248
|
-
MODULE_NAME_PASCAL_CASED: toPascalCase(projectName),
|
|
249
|
-
};
|
|
250
|
-
const githubSourcePath = path.join(BOOTSTRAP_DIR_PATH, '.github');
|
|
251
|
-
if (fileExists(githubSourcePath)) {
|
|
252
|
-
console.log(wrapInColor('Creating GitHub templates...', ANSI_COLORS.YELLOW_COLOR));
|
|
253
|
-
const githubDestPath = path.join(process.cwd(), '.github');
|
|
254
|
-
copyBootstrapFiles(githubSourcePath, githubDestPath, replacements);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// Copy .cursor rules directory (if it exists)
|
|
258
|
-
const cursorSourcePath = path.join(META_DIR_PATH, '.cursor');
|
|
259
|
-
if (fileExists(cursorSourcePath)) {
|
|
260
|
-
console.log(wrapInColor('Creating Cursor AI rules...', ANSI_COLORS.YELLOW_COLOR));
|
|
261
|
-
const cursorDestPath = path.join(process.cwd(), '.cursor');
|
|
262
|
-
copyBootstrapFiles(cursorSourcePath, cursorDestPath, replacements);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// Setup hello world application
|
|
266
|
-
console.log(wrapInColor(`Initializing ${template.name} application...`, ANSI_COLORS.YELLOW_COLOR));
|
|
267
|
-
const sourcePath = path.join(BOOTSTRAP_DIR_PATH, 'apps', template.path);
|
|
268
|
-
const destPath = process.cwd();
|
|
269
|
-
|
|
270
|
-
copyBootstrapFiles(sourcePath, destPath, replacements);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
async function valdiBootstrap(argv: ArgumentsResolver<CommandParameters>) {
|
|
274
|
-
// Set up a Valdi project in the current directory. Will go through a flow to ask some questions to the user like the name of the application. This will create the following files:
|
|
275
|
-
// user_config.yaml: User configuration file
|
|
276
|
-
// application_names.bzl: Bazel macro file with application names
|
|
277
|
-
const curDir = process.cwd();
|
|
278
|
-
|
|
279
|
-
console.log(`\nCurrent directory: ${wrapInColor(curDir, ANSI_COLORS.GREEN_COLOR)}`);
|
|
280
|
-
|
|
281
|
-
if (isAlreadyInitialized()) {
|
|
282
|
-
// Check for existing project files
|
|
283
|
-
// If the directory already contains a project, prompt the user to re-run command with explicit --with-cleanup flag
|
|
284
|
-
if (argv.getArgument('withCleanup')) {
|
|
285
|
-
console.log(wrapInColor('Deleting all files in current directory...', ANSI_COLORS.YELLOW_COLOR));
|
|
286
|
-
deleteAll(curDir);
|
|
287
|
-
} else {
|
|
288
|
-
throw new CliError(
|
|
289
|
-
`Detected existing project files. Please remove them before re-running 'valdi bootstrap'.\nYou can run '${wrapInColor('valdi bootstrap --with-cleanup', ANSI_COLORS.YELLOW_COLOR, ANSI_COLORS.RED_COLOR)}' to remove ALL FILES in the current directory.`,
|
|
290
|
-
);
|
|
291
|
-
}
|
|
292
|
-
} else if (!isDirectoryEmpty(curDir)) {
|
|
293
|
-
// Folder contains non project files
|
|
294
|
-
// Prompt for manual clean up to prevent accidental deletion of important files
|
|
295
|
-
throw new CliError(
|
|
296
|
-
"Current directory is not empty. Please run 'valdi bootstrap' in an empty directory or manually clean up existing files.",
|
|
297
|
-
);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
if (!(await getShouldBootstrap(argv))) {
|
|
301
|
-
throw new CliError('Bootstrap process aborted.');
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
const applicationType = await getApplicationType(argv);
|
|
305
|
-
|
|
306
|
-
// Prompt user for input
|
|
307
|
-
// - Application Name
|
|
308
|
-
let projectName = await getProjectName(argv);
|
|
309
|
-
|
|
310
|
-
// Validate project name if provided via command line argument
|
|
311
|
-
if (argv.getArgument('projectName')) {
|
|
312
|
-
const validationError = validateProjectName(projectName);
|
|
313
|
-
if (validationError) {
|
|
314
|
-
throw new CliError(validationError);
|
|
315
|
-
}
|
|
316
|
-
projectName = sanitizeProjectName(projectName);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
if (!projectName) {
|
|
320
|
-
throw new CliError('Project name cannot be empty.');
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
const valdiReleaseTag = await resolveValdiReleaseTag(argv, VALDI_GIT_URL, DEFAULT_VALDI_RELEASE_TAG);
|
|
324
|
-
const valdiWidgetsReleaseTag = await resolveValdiReleaseTag(
|
|
325
|
-
argv,
|
|
326
|
-
VALDI_WIDGETS_GIT_URL,
|
|
327
|
-
DEFAULT_VALDI_WIDGETS_RELEASE_TAG,
|
|
328
|
-
'valdiWidgetsVersion',
|
|
329
|
-
);
|
|
330
|
-
|
|
331
|
-
const valdiImport = getValdiImport(argv, valdiReleaseTag);
|
|
332
|
-
const valdiWidgetsImport = getValdiWidgetsImport(argv, valdiWidgetsReleaseTag);
|
|
333
|
-
|
|
334
|
-
// Creating basic config files and Hello World application
|
|
335
|
-
console.log(wrapInColor('Initializing config files...', ANSI_COLORS.BLUE_COLOR));
|
|
336
|
-
initializeConfigFiles(projectName, applicationType, valdiImport, valdiWidgetsImport);
|
|
337
|
-
|
|
338
|
-
// Check bazel version matches .bazelversion
|
|
339
|
-
console.log(wrapInColor('Verifying Bazel installation...', ANSI_COLORS.BLUE_COLOR));
|
|
340
|
-
const bazel = new BazelClient();
|
|
341
|
-
const [returnCode, versionInfo, errors] = await bazel.getVersion();
|
|
342
|
-
|
|
343
|
-
if (returnCode !== 0) {
|
|
344
|
-
throw new CliError(`Bazel installation failed to verify with errors: ${errors.toString()}`);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
console.log(versionInfo);
|
|
348
|
-
|
|
349
|
-
if (argv.getArgument('skipProjectsync')) {
|
|
350
|
-
console.log(wrapInColor('Skipping projectsync', ANSI_COLORS.YELLOW_COLOR));
|
|
351
|
-
} else {
|
|
352
|
-
console.log(wrapInColor('Running projectsync...', ANSI_COLORS.BLUE_COLOR));
|
|
353
|
-
// eslint-disable-next-line unicorn/no-useless-undefined
|
|
354
|
-
await runProjectSync(bazel, await getAllProjectSyncTargets(bazel), undefined, true);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
// Finalize message
|
|
358
|
-
console.log(wrapInColor('Bootstrap complete!', ANSI_COLORS.GREEN_COLOR));
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
export const command = 'bootstrap';
|
|
362
|
-
export const describe = 'Prepares and initializes a project to build and run in Valdi';
|
|
363
|
-
export const builder = (yargs: Argv<CommandParameters>) => {
|
|
364
|
-
yargs
|
|
365
|
-
.option('confirmBootstrap', {
|
|
366
|
-
describe: 'Skip confirmation prompt and start bootstrap process',
|
|
367
|
-
type: 'boolean',
|
|
368
|
-
alias: 'y',
|
|
369
|
-
})
|
|
370
|
-
.option('applicationType', {
|
|
371
|
-
describe: 'Type of application to create',
|
|
372
|
-
alias: 't',
|
|
373
|
-
})
|
|
374
|
-
.option('projectName', {
|
|
375
|
-
describe: 'Name of the project',
|
|
376
|
-
type: 'string',
|
|
377
|
-
alias: 'n',
|
|
378
|
-
})
|
|
379
|
-
.option('valdiImport', {
|
|
380
|
-
describe:
|
|
381
|
-
'Path to a local checkout of the Valdi repo. If not specified, uses the pinned release (see valdiVersion).',
|
|
382
|
-
type: 'string',
|
|
383
|
-
alias: 'l',
|
|
384
|
-
})
|
|
385
|
-
.option('valdiWidgetsImport', {
|
|
386
|
-
describe:
|
|
387
|
-
'Path to a local checkout of the Valdi_Widgets repo. If not specified, uses the pinned release (see valdiWidgetsVersion).',
|
|
388
|
-
type: 'string',
|
|
389
|
-
alias: 'w',
|
|
390
|
-
})
|
|
391
|
-
.option('valdiVersion', {
|
|
392
|
-
describe: `Valdi release tag to use (e.g. v1.0.0). Use "latest" to fetch the GitHub latest release. Default: ${DEFAULT_VALDI_RELEASE_TAG}`,
|
|
393
|
-
type: 'string',
|
|
394
|
-
})
|
|
395
|
-
.option('valdiWidgetsVersion', {
|
|
396
|
-
describe: `Valdi_Widgets release tag to use. Use "latest" to fetch the GitHub latest release. Default: ${DEFAULT_VALDI_WIDGETS_RELEASE_TAG}`,
|
|
397
|
-
type: 'string',
|
|
398
|
-
})
|
|
399
|
-
.option('skipProjectsync', {
|
|
400
|
-
describe: 'Skip projectsync for testing purposes',
|
|
401
|
-
type: 'boolean',
|
|
402
|
-
alias: 'p',
|
|
403
|
-
})
|
|
404
|
-
.option('withCleanup', {
|
|
405
|
-
describe: 'Deletes all existing files in the current directory before initiating bootstrap',
|
|
406
|
-
type: 'boolean',
|
|
407
|
-
alias: 'c',
|
|
408
|
-
});
|
|
409
|
-
};
|
|
410
|
-
export const handler = makeCommandHandler(valdiBootstrap);
|