@snap/valdi 1.1.7 → 1.2.1
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/.metadata/.bazelrc.template +9 -7
- package/.metadata/AGENTS.md.template +7 -0
- package/.metadata/MODULE.bazel.template +47 -3
- package/.metadata/README.md.template +2 -2
- package/.metadata/bzl/patches/rules_python/1.9.0/BUILD.bazel.template +1 -0
- package/.metadata/bzl/patches/rules_python/1.9.0/remove_setuptools_spaces.patch.template +96 -0
- package/.metadata/skill-tests-README.md.template +1 -1
- package/README.md +47 -14
- package/bundled-skills/registry.json +2 -1
- package/bundled-skills/skills/valdi-animations/skill.md +49 -0
- package/bundled-skills/skills/valdi-async/skill.md +3 -2
- package/bundled-skills/skills/valdi-async/tests/README.md +1 -1
- package/bundled-skills/skills/valdi-bazel/skill.md +2 -6
- package/bundled-skills/skills/valdi-component-tests/tests/README.md +1 -1
- package/bundled-skills/skills/valdi-cpp-runtime/skill.md +18 -0
- package/bundled-skills/skills/valdi-custom-view/skill.md +1 -1
- package/bundled-skills/skills/valdi-error-handling/skill.md +1 -1
- package/bundled-skills/skills/valdi-gestures/skill.md +3 -3
- package/bundled-skills/skills/valdi-migrate/skill.md +2 -1
- package/bundled-skills/skills/valdi-migrate/tests/README.md +2 -2
- package/bundled-skills/skills/valdi-mock-breakdown/skill.md +4 -4
- package/bundled-skills/skills/valdi-mock-to-module/skill.md +9 -6
- package/bundled-skills/skills/valdi-overview/skill.md +2 -1
- package/bundled-skills/skills/valdi-perf/skill.md +121 -5
- package/bundled-skills/skills/valdi-perf/tests/README.md +1 -1
- package/bundled-skills/skills/valdi-pr-review/skill.md +189 -0
- package/bundled-skills/skills/valdi-profile/skill.md +5 -3
- package/bundled-skills/skills/valdi-setup/skill.md +3 -6
- package/bundled-skills/skills/valdi-testing/skill.md +1 -1
- package/bundled-skills/skills/valdi-tsx/skill.md +47 -11
- package/bundled-skills/skills/valdi-tsx/tests/README.md +1 -1
- package/debugger/README.md +356 -0
- package/debugger/debugger-actions.js +373 -0
- package/debugger/debugger-api.js +225 -0
- package/debugger/debugger-bootstrap.js +295 -0
- package/debugger/debugger-model.js +790 -0
- package/debugger/debugger-performance.js +573 -0
- package/debugger/debugger-preview-html.js +676 -0
- package/debugger/debugger-providers.js +389 -0
- package/debugger/debugger-render.js +529 -0
- package/debugger/debugger-runtime.js +387 -0
- package/debugger/debugger-session.js +188 -0
- package/debugger/debugger-settings.js +209 -0
- package/debugger/debugger-state.js +221 -0
- package/debugger/debugger-tree-model.js +539 -0
- package/debugger/debugger.css +1865 -0
- package/debugger/devtools-panel.css +1318 -0
- package/debugger/devtools-panel.html +273 -0
- package/debugger/devtools-panel.js +3329 -0
- package/debugger/index.html +279 -0
- package/dist/commands/bootstrap.js +7 -6
- package/dist/commands/build.js +7 -1
- package/dist/commands/debugger.js +163 -0
- package/dist/commands/doctor.js +3 -62
- package/dist/commands/export.js +47 -16
- package/dist/commands/hotreload.js +247 -27
- package/dist/commands/inspect.js +5 -2
- package/dist/commands/inspect_commands/input.js +176 -0
- package/dist/commands/inspect_commands/snapshot.js +1 -1
- package/dist/commands/inspect_commands/tree.js +1 -1
- package/dist/commands/install.js +79 -2
- package/dist/commands/projectsync.js +15 -0
- package/dist/commands/webHotreload.js +31 -0
- package/dist/core/constants.js +34 -7
- package/dist/debugger/chromiumConsole.js +279 -0
- package/dist/debugger/inputClient.js +473 -0
- package/dist/debugger/server.js +3801 -0
- package/dist/debugger/targetRegistry.js +436 -0
- package/dist/debugger/webPreviewPerformance.js +864 -0
- package/dist/index.js +0 -0
- package/dist/utils/BazelClient.js +34 -5
- package/dist/utils/applicationUtils.js +20 -2
- package/dist/utils/buildInfo.js +5 -1
- package/dist/utils/chromiumDevToolsClient.js +350 -0
- package/dist/utils/cliUtils.js +2 -2
- package/dist/utils/daemonClient.js +364 -44
- package/dist/utils/directorySync.js +153 -0
- package/dist/utils/githubUtils.js +1 -1
- package/dist/utils/hermesClient.js +82 -176
- package/dist/utils/loopbackHost.js +14 -0
- package/dist/utils/owlCdpClient.js +282 -0
- package/dist/utils/owlDevToolsExtension.js +142 -0
- package/dist/utils/processUtils.js +14 -0
- package/dist/utils/stringUtils.js +13 -1
- package/dist/utils/webApplicationSession.js +58 -0
- package/dist/utils/webHotReloadSession.js +212 -0
- package/dist/utils/webServerUtils.js +195 -0
- package/dist/utils/zipUtils.js +20 -2
- package/package.json +4 -2
- package/dist/commands/inspect_commands/snapshot.spec.js +0 -105
- package/dist/core/packageFiles.spec.js +0 -29
- package/dist/preview/previewGenerator.spec.js +0 -203
- package/dist/preview/viewModelParser.spec.js +0 -171
- package/dist/utils/linuxDistro.spec.js +0 -122
- package/dist/utils/skillsAdapters.spec.js +0 -141
- package/dist/utils/stringUtils.spec.js +0 -81
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
require("jasmine");
|
|
4
|
-
const stringUtils_1 = require("./stringUtils");
|
|
5
|
-
describe('stringUtils', () => {
|
|
6
|
-
it('converts strings to pascal case', () => {
|
|
7
|
-
const testCases = [['hello', 'Hello'], ['hello world', 'HelloWorld'], ['My New Module', 'MyNewModule'], ['my_new_module', 'MyNewModule']];
|
|
8
|
-
testCases.forEach(([input, expected]) => {
|
|
9
|
-
expect((0, stringUtils_1.toPascalCase)(input)).toBe(expected);
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
it('converts strings to snake case', () => {
|
|
13
|
-
const testCases = [['hello', 'hello'], ['hello world', 'hello_world']];
|
|
14
|
-
testCases.forEach(([input, expected]) => {
|
|
15
|
-
expect((0, stringUtils_1.toSnakeCase)(input)).toBe(expected);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
describe('sanitizeProjectName', () => {
|
|
19
|
-
it('replaces dashes with underscores', () => {
|
|
20
|
-
expect((0, stringUtils_1.sanitizeProjectName)('my-project')).toBe('my_project');
|
|
21
|
-
expect((0, stringUtils_1.sanitizeProjectName)('my-cool-app')).toBe('my_cool_app');
|
|
22
|
-
});
|
|
23
|
-
it('preserves original case', () => {
|
|
24
|
-
expect((0, stringUtils_1.sanitizeProjectName)('MyProject')).toBe('MyProject');
|
|
25
|
-
expect((0, stringUtils_1.sanitizeProjectName)('MY_PROJECT')).toBe('MY_PROJECT');
|
|
26
|
-
expect((0, stringUtils_1.sanitizeProjectName)('testNewModule')).toBe('testNewModule');
|
|
27
|
-
});
|
|
28
|
-
it('removes invalid characters', () => {
|
|
29
|
-
expect((0, stringUtils_1.sanitizeProjectName)('my project!')).toBe('myproject');
|
|
30
|
-
expect((0, stringUtils_1.sanitizeProjectName)('my@project#')).toBe('myproject');
|
|
31
|
-
expect((0, stringUtils_1.sanitizeProjectName)('my.project')).toBe('myproject');
|
|
32
|
-
});
|
|
33
|
-
it('prefixes with underscore if starts with number', () => {
|
|
34
|
-
expect((0, stringUtils_1.sanitizeProjectName)('123project')).toBe('_123project');
|
|
35
|
-
expect((0, stringUtils_1.sanitizeProjectName)('7-eleven')).toBe('_7_eleven');
|
|
36
|
-
});
|
|
37
|
-
it('handles mixed cases', () => {
|
|
38
|
-
expect((0, stringUtils_1.sanitizeProjectName)('My-Cool_Project123')).toBe('My_Cool_Project123');
|
|
39
|
-
});
|
|
40
|
-
it('handles already valid names', () => {
|
|
41
|
-
expect((0, stringUtils_1.sanitizeProjectName)('my_project')).toBe('my_project');
|
|
42
|
-
expect((0, stringUtils_1.sanitizeProjectName)('myproject')).toBe('myproject');
|
|
43
|
-
expect((0, stringUtils_1.sanitizeProjectName)('my_project_123')).toBe('my_project_123');
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
describe('validateProjectName', () => {
|
|
47
|
-
it('rejects empty names', () => {
|
|
48
|
-
expect((0, stringUtils_1.validateProjectName)('')).toBeTruthy();
|
|
49
|
-
expect((0, stringUtils_1.validateProjectName)(' ')).toBeTruthy();
|
|
50
|
-
});
|
|
51
|
-
it('rejects reserved words (case-insensitive)', () => {
|
|
52
|
-
expect((0, stringUtils_1.validateProjectName)('test')).toContain('reserved word');
|
|
53
|
-
expect((0, stringUtils_1.validateProjectName)('Test')).toContain('reserved word');
|
|
54
|
-
expect((0, stringUtils_1.validateProjectName)('TEST')).toContain('reserved word');
|
|
55
|
-
expect((0, stringUtils_1.validateProjectName)('build')).toContain('reserved word');
|
|
56
|
-
expect((0, stringUtils_1.validateProjectName)('workspace')).toContain('reserved word');
|
|
57
|
-
expect((0, stringUtils_1.validateProjectName)('native')).toContain('reserved word');
|
|
58
|
-
expect((0, stringUtils_1.validateProjectName)('package')).toContain('reserved word');
|
|
59
|
-
});
|
|
60
|
-
it('accepts valid names with mixed case', () => {
|
|
61
|
-
expect((0, stringUtils_1.validateProjectName)('my_project')).toBeNull();
|
|
62
|
-
expect((0, stringUtils_1.validateProjectName)('myproject')).toBeNull();
|
|
63
|
-
expect((0, stringUtils_1.validateProjectName)('my_cool_app')).toBeNull();
|
|
64
|
-
expect((0, stringUtils_1.validateProjectName)('project123')).toBeNull();
|
|
65
|
-
expect((0, stringUtils_1.validateProjectName)('MyProject')).toBeNull();
|
|
66
|
-
expect((0, stringUtils_1.validateProjectName)('testNewModule')).toBeNull();
|
|
67
|
-
});
|
|
68
|
-
it('accepts names with dashes (they will be sanitized)', () => {
|
|
69
|
-
expect((0, stringUtils_1.validateProjectName)('my-project')).toBeNull();
|
|
70
|
-
expect((0, stringUtils_1.validateProjectName)('my-cool-app')).toBeNull();
|
|
71
|
-
});
|
|
72
|
-
it('rejects names with only invalid characters', () => {
|
|
73
|
-
expect((0, stringUtils_1.validateProjectName)('!!!')).toBeTruthy();
|
|
74
|
-
expect((0, stringUtils_1.validateProjectName)('...')).toBeTruthy();
|
|
75
|
-
expect((0, stringUtils_1.validateProjectName)('@#$')).toBeTruthy();
|
|
76
|
-
});
|
|
77
|
-
it('handles names that start with numbers', () => {
|
|
78
|
-
expect((0, stringUtils_1.validateProjectName)('123project')).toContain('sanitized');
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
});
|