@doubledigit/cli 0.11.0 → 0.12.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/README.md +1 -0
- package/dist/commands/component-hub-init.d.ts +1 -0
- package/dist/commands/component-hub-init.d.ts.map +1 -1
- package/dist/commands/component-hub-init.js +22 -0
- package/dist/generated/defaults.d.ts +1 -1
- package/dist/generated/defaults.d.ts.map +1 -1
- package/dist/generated/defaults.js +1 -1
- package/dist/lib/component-frameworks.d.ts.map +1 -1
- package/dist/lib/component-frameworks.js +22 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -139,6 +139,7 @@ npx skills add crystalphantom/double-digit --skill dd-component-hub --agent '*'
|
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
Pass `--skip-skills` to skip skill installation. If skill installation fails, init still completes the project scaffold and prints exact retry commands. Use `--yes` for agent-run or scripted init flows; `-y` and `--non-interactive` are accepted compatibility aliases and are forwarded to nested framework scaffolds where supported.
|
|
142
|
+
For HyperFrames, non-interactive init accepts the framework skill defaults by installing `animejs` for all agents without prompting.
|
|
142
143
|
|
|
143
144
|
Register a component with simple JSON:
|
|
144
145
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type RunComponentHubInitResult } from '../lib/component-hub-init.js';
|
|
2
2
|
export declare function buildComponentHubInitHelp(): string;
|
|
3
|
+
export declare function buildComponentHubInitNextSteps(result: RunComponentHubInitResult): string[];
|
|
3
4
|
export declare function runComponentHubInitCommand(args: string[]): RunComponentHubInitResult | undefined;
|
|
4
5
|
//# sourceMappingURL=component-hub-init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-hub-init.d.ts","sourceRoot":"","sources":["../../src/commands/component-hub-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAuFnG,wBAAgB,yBAAyB,WAgCxC;
|
|
1
|
+
{"version":3,"file":"component-hub-init.d.ts","sourceRoot":"","sources":["../../src/commands/component-hub-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAuFnG,wBAAgB,yBAAyB,WAgCxC;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,yBAAyB,GAAG,MAAM,EAAE,CAyB1F;AAuCD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,yBAAyB,GAAG,SAAS,CA8BhG"}
|
|
@@ -102,6 +102,24 @@ Examples:
|
|
|
102
102
|
npx @doubledigit/cli@latest actions component-hub init my-video --registry https://double-digit.example
|
|
103
103
|
`;
|
|
104
104
|
}
|
|
105
|
+
export function buildComponentHubInitNextSteps(result) {
|
|
106
|
+
const ddComponentHubSkillInstalled = result.skills.commands.some((command) => command.success && command.args.includes('dd-component-hub'));
|
|
107
|
+
const lines = [
|
|
108
|
+
'Next steps:',
|
|
109
|
+
` 1. cd ${result.projectDir}`,
|
|
110
|
+
];
|
|
111
|
+
if (result.skills.skipped) {
|
|
112
|
+
lines.push(' 2. Install the project skills when you want agent guidance, or rerun init without --skip-skills.');
|
|
113
|
+
}
|
|
114
|
+
else if (ddComponentHubSkillInstalled) {
|
|
115
|
+
lines.push(' 2. Start your AI coding agent from this directory so it loads .agents/skills/dd-component-hub.');
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
lines.push(' 2. Retry the failed skill installs above, then start your AI coding agent from this directory.');
|
|
119
|
+
}
|
|
120
|
+
lines.push(' 3. First agent prompt:', ` "Use dd-component-hub. Search Component Hub for a ${result.framework} component before building anything custom."`, ` 4. Preview locally: ${result.devCommand}`);
|
|
121
|
+
return lines;
|
|
122
|
+
}
|
|
105
123
|
function printInit(result) {
|
|
106
124
|
console.log(`Initialized Component Hub in ${result.projectDir}`);
|
|
107
125
|
console.log(`Framework: ${result.framework}`);
|
|
@@ -132,6 +150,10 @@ function printInit(result) {
|
|
|
132
150
|
}
|
|
133
151
|
}
|
|
134
152
|
}
|
|
153
|
+
console.log('');
|
|
154
|
+
for (const line of buildComponentHubInitNextSteps(result)) {
|
|
155
|
+
console.log(line);
|
|
156
|
+
}
|
|
135
157
|
}
|
|
136
158
|
export function runComponentHubInitCommand(args) {
|
|
137
159
|
const parsed = parseArgs(args);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const GENERATED_DEFAULT_ACTIONS_APP_URL = "https://
|
|
1
|
+
export declare const GENERATED_DEFAULT_ACTIONS_APP_URL = "https://necto.pro";
|
|
2
2
|
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/generated/defaults.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/generated/defaults.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const GENERATED_DEFAULT_ACTIONS_APP_URL = "https://
|
|
1
|
+
export const GENERATED_DEFAULT_ACTIONS_APP_URL = "https://necto.pro";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-frameworks.d.ts","sourceRoot":"","sources":["../../src/lib/component-frameworks.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE7D,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,oBAAoB,CAAC;IACzB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OA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IAAI,EAAE,MAAM,EAAE,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,mBAAmB,EAAE,CAAC,KAAK,EAAE;QAC3B,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,OAAO,CAAC;KACjB,KAAK,MAAM,CAAC;CACd;AA0ED,eAAO,MAAM,0BAA0B,EAAE,yBAAyB,EAuDjE,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,oBAAoB,CASzE;AAED,wBAAgB,4BAA4B,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,yBAAyB,CAKtF;AAED,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,yBAAyB,EAAE,WAAW,SAAwB,QAKrH"}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
function
|
|
3
|
-
if (!nonInteractive
|
|
2
|
+
function addNonInteractiveSkillFlags(command, nonInteractive, options = {}) {
|
|
3
|
+
if (!nonInteractive)
|
|
4
4
|
return command;
|
|
5
|
+
const args = [...command.args];
|
|
6
|
+
const displayParts = [command.display];
|
|
7
|
+
if (!args.includes('--skill') && options.defaultSkill) {
|
|
8
|
+
args.push('--skill', options.defaultSkill);
|
|
9
|
+
displayParts.push('--skill', options.defaultSkill);
|
|
10
|
+
}
|
|
11
|
+
if (!args.includes('--all') && !args.includes('--agent') && !args.includes('-a')) {
|
|
12
|
+
args.push('--agent', '*');
|
|
13
|
+
displayParts.push('--agent', "'*'");
|
|
14
|
+
}
|
|
15
|
+
if (!args.includes('--all') && !args.includes('--yes') && !args.includes('-y')) {
|
|
16
|
+
args.push('--yes');
|
|
17
|
+
displayParts.push('--yes');
|
|
18
|
+
}
|
|
5
19
|
return {
|
|
6
20
|
...command,
|
|
7
|
-
args
|
|
8
|
-
display:
|
|
21
|
+
args,
|
|
22
|
+
display: displayParts.join(' '),
|
|
9
23
|
};
|
|
10
24
|
}
|
|
11
25
|
function normalizeSlashes(value) {
|
|
@@ -57,7 +71,7 @@ export const componentFrameworkAdapters = [
|
|
|
57
71
|
args: ['skills', 'add', 'remotion-dev/skills', '--all'],
|
|
58
72
|
display: 'npx skills add remotion-dev/skills --all',
|
|
59
73
|
},
|
|
60
|
-
|
|
74
|
+
addNonInteractiveSkillFlags({
|
|
61
75
|
command: 'npx',
|
|
62
76
|
args: ['skills', 'add', 'crystalphantom/double-digit', '--skill', 'dd-component-hub'],
|
|
63
77
|
display: 'npx skills add crystalphantom/double-digit --skill dd-component-hub',
|
|
@@ -82,12 +96,12 @@ export const componentFrameworkAdapters = [
|
|
|
82
96
|
],
|
|
83
97
|
}),
|
|
84
98
|
skillsCommands: ({ nonInteractive }) => [
|
|
85
|
-
|
|
99
|
+
addNonInteractiveSkillFlags({
|
|
86
100
|
command: 'npx',
|
|
87
101
|
args: ['skills', 'add', 'heygen-com/hyperframes'],
|
|
88
102
|
display: 'npx skills add heygen-com/hyperframes',
|
|
89
|
-
}, nonInteractive),
|
|
90
|
-
|
|
103
|
+
}, nonInteractive, { defaultSkill: 'animejs' }),
|
|
104
|
+
addNonInteractiveSkillFlags({
|
|
91
105
|
command: 'npx',
|
|
92
106
|
args: ['skills', 'add', 'crystalphantom/double-digit', '--skill', 'dd-component-hub'],
|
|
93
107
|
display: 'npx skills add crystalphantom/double-digit --skill dd-component-hub',
|