@doubledigit/cli 0.10.0 → 0.11.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.
Files changed (36) hide show
  1. package/README.md +15 -15
  2. package/dist/codegen.d.ts +3 -0
  3. package/dist/codegen.d.ts.map +1 -1
  4. package/dist/codegen.js +22 -0
  5. package/dist/commands/actions.d.ts +4 -4
  6. package/dist/commands/actions.d.ts.map +1 -1
  7. package/dist/commands/actions.js +25 -21
  8. package/dist/commands/component-hub-add.d.ts +4 -0
  9. package/dist/commands/component-hub-add.d.ts.map +1 -0
  10. package/dist/commands/{remotion-hub-add.js → component-hub-add.js} +14 -14
  11. package/dist/commands/component-hub-init.d.ts +4 -0
  12. package/dist/commands/component-hub-init.d.ts.map +1 -0
  13. package/dist/commands/{remotion-hub-init.js → component-hub-init.js} +16 -16
  14. package/dist/commands/sync.d.ts +1 -1
  15. package/dist/commands/sync.d.ts.map +1 -1
  16. package/dist/commands/sync.js +25 -20
  17. package/dist/deploy-profile.d.ts +39 -0
  18. package/dist/deploy-profile.d.ts.map +1 -0
  19. package/dist/deploy-profile.js +131 -0
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +5 -4
  23. package/dist/lib/actions-client.d.ts.map +1 -1
  24. package/dist/lib/component-frameworks.js +4 -4
  25. package/dist/lib/{remotion-hub-init.d.ts → component-hub-init.d.ts} +13 -13
  26. package/dist/lib/component-hub-init.d.ts.map +1 -0
  27. package/dist/lib/{remotion-hub-init.js → component-hub-init.js} +68 -28
  28. package/dist/paths.d.ts +6 -0
  29. package/dist/paths.d.ts.map +1 -1
  30. package/dist/paths.js +3 -0
  31. package/package.json +3 -2
  32. package/dist/commands/remotion-hub-add.d.ts +0 -4
  33. package/dist/commands/remotion-hub-add.d.ts.map +0 -1
  34. package/dist/commands/remotion-hub-init.d.ts +0 -4
  35. package/dist/commands/remotion-hub-init.d.ts.map +0 -1
  36. package/dist/lib/remotion-hub-init.d.ts.map +0 -1
package/README.md CHANGED
@@ -20,8 +20,8 @@ pnpm dev
20
20
  pnpm dd doctor
21
21
  pnpm onboard
22
22
  pnpm onboard -- --no-run
23
- pnpm dd actions remotion-hub
24
- pnpm dd actions remotion-hub init temp-project --framework remotion
23
+ pnpm dd actions component-hub
24
+ pnpm dd actions component-hub init temp-project --framework remotion
25
25
  ```
26
26
 
27
27
  If installed globally, the binary is available as `dd`:
@@ -31,8 +31,8 @@ dd dev
31
31
  dd doctor
32
32
  dd onboard
33
33
  dd onboard --no-run
34
- dd actions remotion-hub
35
- dd actions remotion-hub init temp-project --framework remotion
34
+ dd actions component-hub
35
+ dd actions component-hub init temp-project --framework remotion
36
36
  ```
37
37
 
38
38
  ## Requirements
@@ -116,15 +116,15 @@ dd dev --port 3000
116
116
  Use `dd actions` to discover or call enabled micro-app actions through the running app. External projects should use the published package through `npx @doubledigit/cli@latest` and should not assume a global `dd` binary exists:
117
117
 
118
118
  ```bash
119
- npx @doubledigit/cli@latest actions remotion-hub
120
- npx @doubledigit/cli@latest actions remotion-hub init temp-project --framework remotion --yes
121
- npx @doubledigit/cli@latest actions remotion-hub init html-project --framework hyperframe --yes
122
- npx @doubledigit/cli@latest actions remotion-hub list-components --framework remotion --limit 5
123
- npx @doubledigit/cli@latest actions remotion-hub search-components --framework hyperframe --query "animated chart" --limit 5
124
- npx @doubledigit/cli@latest actions remotion-hub register-component --json-file component.json
119
+ npx @doubledigit/cli@latest actions component-hub
120
+ npx @doubledigit/cli@latest actions component-hub init temp-project --framework remotion --yes
121
+ npx @doubledigit/cli@latest actions component-hub init html-project --framework hyperframe --yes
122
+ npx @doubledigit/cli@latest actions component-hub list-components --framework remotion --limit 5
123
+ npx @doubledigit/cli@latest actions component-hub search-components --framework hyperframe --query "animated chart" --limit 5
124
+ npx @doubledigit/cli@latest actions component-hub register-component --json-file component.json
125
125
  ```
126
126
 
127
- Component Hub currently uses the `remotion-hub` compatibility command. `init` and `add` are handled locally by the CLI because they create or modify files on the caller's machine. Other actions, such as search and registry lookup, call the configured Double Digit app over HTTP.
127
+ Component Hub uses the canonical `component-hub` action command. `init` and `add` are handled locally by the CLI because they create or modify files on the caller's machine. Other actions, such as search and registry lookup, call the configured Double Digit app over HTTP. The old `remotion-hub` action name remains a legacy alias.
128
128
 
129
129
  Pass `--framework remotion|hyperframe` when the target framework is known. Remotion remains the default for compatibility and creates Remotion's Hello World starter so `remotion studio` opens with a visible composition. HyperFrames init requires Node.js 22 or newer and uses `npx hyperframes preview` as its dev command.
130
130
 
@@ -135,7 +135,7 @@ After init, the CLI attempts to install framework skills and the Double Digit Co
135
135
  ```bash
136
136
  npx skills add remotion-dev/skills --all
137
137
  npx skills add heygen-com/hyperframes
138
- npx skills add crystalphantom/double-digit --skill dd-remotion-hub --agent '*' --yes
138
+ npx skills add crystalphantom/double-digit --skill dd-component-hub --agent '*' --yes
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.
@@ -143,7 +143,7 @@ Pass `--skip-skills` to skip skill installation. If skill installation fails, in
143
143
  Register a component with simple JSON:
144
144
 
145
145
  ```bash
146
- npx @doubledigit/cli@latest actions remotion-hub register-component --json-file component.json
146
+ npx @doubledigit/cli@latest actions component-hub register-component --json-file component.json
147
147
  ```
148
148
 
149
149
  Minimal `component.json`:
@@ -171,7 +171,7 @@ The published CLI embeds a hosted default from `DD_ACTIONS_DEFAULT_APP_URL` duri
171
171
  The hosted Double Digit app is the default for npm users:
172
172
 
173
173
  ```bash
174
- npx @doubledigit/cli@latest actions remotion-hub
174
+ npx @doubledigit/cli@latest actions component-hub
175
175
  ```
176
176
 
177
177
  This hosted default does not require a local checkout or running app.
@@ -181,7 +181,7 @@ Before relying on the hosted default in automation, run discovery as a preflight
181
181
  Local development or self-hosted environments should override the target explicitly:
182
182
 
183
183
  ```bash
184
- DD_APP_URL=http://localhost:3111 npx @doubledigit/cli@latest actions remotion-hub
184
+ DD_APP_URL=http://localhost:3111 npx @doubledigit/cli@latest actions component-hub
185
185
  ```
186
186
 
187
187
  In GitHub Actions or another CI/CD runner, provide `DD_ACTIONS_DEFAULT_APP_URL` or `DD_APP_URL` through the runner environment, variables, or secrets when building or publishing the CLI package. Do not rely on a local env file being present in CI.
package/dist/codegen.d.ts CHANGED
@@ -4,11 +4,14 @@
4
4
  * Reads the scanner output + config and generates static import files
5
5
  * that the Next.js bundler can tree-shake and analyze.
6
6
  */
7
+ import type { ResolvedDeployProfile } from './deploy-profile.js';
7
8
  import type { DiscoveredApp, DiscoveredPayloadPlugin } from './scanner.js';
8
9
  export declare function generateMicroAppsModule(outputPath: string, enabledApps: DiscoveredApp[]): string;
9
10
  export declare function writeMicroAppsModule(outputPath: string, enabledApps: DiscoveredApp[]): void;
10
11
  export declare function generateMicroAppTranspilePackagesModule(apps: DiscoveredApp[]): string;
11
12
  export declare function writeMicroAppTranspilePackagesModule(outputPath: string, apps: DiscoveredApp[]): void;
13
+ export declare function generateDeployProfileModule(profile: ResolvedDeployProfile): string;
14
+ export declare function writeDeployProfileModule(outputPath: string, profile: ResolvedDeployProfile): void;
12
15
  export declare function generatePayloadPluginsModule(outputPath: string, plugins: DiscoveredPayloadPlugin[]): string;
13
16
  export declare function writePayloadPluginsModule(outputPath: string, plugins: DiscoveredPayloadPlugin[]): void;
14
17
  export declare function generateScopedPayloadConfigModule(app: DiscoveredApp): string;
@@ -1 +1 @@
1
- {"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../src/codegen.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAe3E,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,aAAa,EAAE,GAC3B,MAAM,CAmER;AAED,wBA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,MAAM,CAiBlF;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,qBAAqB,GAC7B,IAAI,CAIN;AAID,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,uBAAuB,EAAE,GACjC,MAAM,CAuBR;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,uBAAuB,EAAE,GACjC,IAAI,CAIN;AAID,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA6B5E;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,aAAa,EAAE,GACpB,IAAI,CAuBN"}
package/dist/codegen.js CHANGED
@@ -102,6 +102,28 @@ export function writeMicroAppTranspilePackagesModule(outputPath, apps) {
102
102
  fs.mkdirSync(path.dirname(outputPath), { recursive: true });
103
103
  fs.writeFileSync(outputPath, content, 'utf-8');
104
104
  }
105
+ export function generateDeployProfileModule(profile) {
106
+ const serializableProfile = {
107
+ name: profile.name ?? null,
108
+ source: profile.source,
109
+ mode: profile.mode,
110
+ primaryApp: profile.primaryApp ?? null,
111
+ apps: profile.apps ?? null,
112
+ brandName: profile.brandName ?? null,
113
+ domain: profile.domain ?? null,
114
+ canonicalUrl: profile.canonicalUrl ?? null,
115
+ mount: profile.mount,
116
+ hidePlatformRoutes: profile.hidePlatformRoutes,
117
+ };
118
+ return `${HEADER}
119
+ export const generatedDeployProfile = ${JSON.stringify(serializableProfile, null, 2)} as const;
120
+ `;
121
+ }
122
+ export function writeDeployProfileModule(outputPath, profile) {
123
+ const content = generateDeployProfileModule(profile);
124
+ fs.mkdirSync(path.dirname(outputPath), { recursive: true });
125
+ fs.writeFileSync(outputPath, content, 'utf-8');
126
+ }
105
127
  // ─── Payload Plugins codegen ───────────────────────────────────────────
106
128
  export function generatePayloadPluginsModule(outputPath, plugins) {
107
129
  const lines = [];
@@ -3,9 +3,9 @@ export declare function getActionPositionals(args: string[]): {
3
3
  value: string;
4
4
  index: number;
5
5
  }[];
6
- export declare function isRemotionHubInitAction(args: string[]): boolean;
7
- export declare function isRemotionHubAddAction(args: string[]): boolean;
8
- export declare function buildRemotionHubInitCommandArgs(args: string[]): string[];
9
- export declare function buildRemotionHubAddCommandArgs(args: string[]): string[];
6
+ export declare function isComponentHubInitAction(args: string[]): boolean;
7
+ export declare function isComponentHubAddAction(args: string[]): boolean;
8
+ export declare function buildComponentHubInitCommandArgs(args: string[]): string[];
9
+ export declare function buildComponentHubAddCommandArgs(args: string[]): string[];
10
10
  export declare function actions(args: string[]): Promise<void>;
11
11
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/commands/actions.ts"],"names":[],"mappings":"AAqCA,wBAAgB,uBAAuB,WAKtC;AAsED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE;WACf,MAAM;WAAS,MAAM;IAuBxD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,WAGrD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,WAGpD;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,EAAE,YAI7D;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,EAAE,YAI5D;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC3D"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/commands/actions.ts"],"names":[],"mappings":"AAuCA,wBAAgB,uBAAuB,WAKtC;AAsED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE;WACf,MAAM;WAAS,MAAM;IAuBxD;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,WAGtD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,WAGrD;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,EAAE,YAI9D;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,EAAE,YAI7D;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuC3D"}
@@ -5,8 +5,9 @@ import { buildActionRequest, fetchActionRequest, isLocalAppUrl, parseActionsArgs
5
5
  import { DEFAULT_APP_URL, readEnvFile } from '../lib/onboarding.js';
6
6
  import { resolveWorkspacePaths } from '../paths.js';
7
7
  import { scanWorkspace } from '../scanner.js';
8
- import { runRemotionHubAddCommand } from './remotion-hub-add.js';
9
- import { runRemotionHubInitCommand } from './remotion-hub-init.js';
8
+ import { runComponentHubAddCommand } from './component-hub-add.js';
9
+ import { runComponentHubInitCommand } from './component-hub-init.js';
10
+ const componentHubActionNames = new Set(['component-hub', 'remotion-hub']);
10
11
  const actionValueOptions = new Set([
11
12
  '--app-url',
12
13
  '--dir',
@@ -53,15 +54,15 @@ Options:
53
54
  --tag, --tags <tags> Add one tag or comma-separated tags to filters.tags
54
55
 
55
56
  Examples:
56
- npx @doubledigit/cli@latest actions remotion-hub
57
- npx @doubledigit/cli@latest actions remotion-hub init my-video --framework remotion --yes
58
- npx @doubledigit/cli@latest actions remotion-hub init my-video --framework hyperframe --yes
59
- npx @doubledigit/cli@latest actions remotion-hub init my-video --framework remotion --skip-skills
60
- npx @doubledigit/cli@latest actions remotion-hub list-components --framework remotion --limit 5
61
- npx @doubledigit/cli@latest actions remotion-hub add terminal-scene --framework remotion --dir my-video
62
- npx @doubledigit/cli@latest actions remotion-hub search-components --framework remotion --query "animated chart" --limit 5
63
- npx @doubledigit/cli@latest actions remotion-hub register-component --json-file component.json
64
- npx @doubledigit/cli@latest actions remotion-hub get-registry-payload --json '{"namespace":"doubledigit","slug":"motion-strip","framework":"remotion"}'
57
+ npx @doubledigit/cli@latest actions component-hub
58
+ npx @doubledigit/cli@latest actions component-hub init my-video --framework remotion --yes
59
+ npx @doubledigit/cli@latest actions component-hub init my-video --framework hyperframe --yes
60
+ npx @doubledigit/cli@latest actions component-hub init my-video --framework remotion --skip-skills
61
+ npx @doubledigit/cli@latest actions component-hub list-components --framework remotion --limit 5
62
+ npx @doubledigit/cli@latest actions component-hub add terminal-scene --framework remotion --dir my-video
63
+ npx @doubledigit/cli@latest actions component-hub search-components --framework remotion --query "animated chart" --limit 5
64
+ npx @doubledigit/cli@latest actions component-hub register-component --json-file component.json
65
+ npx @doubledigit/cli@latest actions component-hub get-registry-payload --json '{"namespace":"doubledigit","slug":"motion-strip","framework":"remotion"}'
65
66
  `;
66
67
  }
67
68
  function readActionEnvFiles(paths) {
@@ -120,34 +121,37 @@ export function getActionPositionals(args) {
120
121
  }
121
122
  return positionals;
122
123
  }
123
- export function isRemotionHubInitAction(args) {
124
+ export function isComponentHubInitAction(args) {
124
125
  const positionals = getActionPositionals(args);
125
- return positionals[0]?.value === 'remotion-hub' && positionals[1]?.value === 'init';
126
+ return componentHubActionNames.has(positionals[0]?.value ?? '') && positionals[1]?.value === 'init';
126
127
  }
127
- export function isRemotionHubAddAction(args) {
128
+ export function isComponentHubAddAction(args) {
128
129
  const positionals = getActionPositionals(args);
129
- return positionals[0]?.value === 'remotion-hub' && positionals[1]?.value === 'add';
130
+ return componentHubActionNames.has(positionals[0]?.value ?? '') && positionals[1]?.value === 'add';
130
131
  }
131
- export function buildRemotionHubInitCommandArgs(args) {
132
+ export function buildComponentHubInitCommandArgs(args) {
132
133
  const positionals = getActionPositionals(args);
133
134
  const dropIndexes = new Set([positionals[0]?.index, positionals[1]?.index]);
134
135
  return args.filter((_, index) => !dropIndexes.has(index));
135
136
  }
136
- export function buildRemotionHubAddCommandArgs(args) {
137
+ export function buildComponentHubAddCommandArgs(args) {
137
138
  const positionals = getActionPositionals(args);
138
139
  const dropIndexes = new Set([positionals[0]?.index, positionals[1]?.index]);
139
140
  return args.filter((_, index) => !dropIndexes.has(index));
140
141
  }
141
142
  export async function actions(args) {
142
- if (isRemotionHubInitAction(args)) {
143
- runRemotionHubInitCommand(buildRemotionHubInitCommandArgs(args));
143
+ if (isComponentHubInitAction(args)) {
144
+ runComponentHubInitCommand(buildComponentHubInitCommandArgs(args));
144
145
  return;
145
146
  }
146
- if (isRemotionHubAddAction(args)) {
147
- await runRemotionHubAddCommand(buildRemotionHubAddCommandArgs(args));
147
+ if (isComponentHubAddAction(args)) {
148
+ await runComponentHubAddCommand(buildComponentHubAddCommandArgs(args));
148
149
  return;
149
150
  }
150
151
  const parsed = parseActionsArgs(args);
152
+ if (parsed.microApp === 'remotion-hub') {
153
+ parsed.microApp = 'component-hub';
154
+ }
151
155
  if (parsed.help || !parsed.microApp) {
152
156
  console.log(buildHelp());
153
157
  return;
@@ -0,0 +1,4 @@
1
+ import { type RunComponentHubAddResult } from '../lib/component-hub-init.js';
2
+ export declare function buildComponentHubAddHelp(): string;
3
+ export declare function runComponentHubAddCommand(args: string[]): Promise<RunComponentHubAddResult | undefined>;
4
+ //# sourceMappingURL=component-hub-add.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-hub-add.d.ts","sourceRoot":"","sources":["../../src/commands/component-hub-add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AA+EjG,wBAAgB,wBAAwB,WAwBvC;AAkBD,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC,CA4B/C"}
@@ -1,4 +1,4 @@
1
- import { runRemotionHubAdd } from '../lib/remotion-hub-init.js';
1
+ import { runComponentHubAdd } from '../lib/component-hub-init.js';
2
2
  const valueFlags = new Set([
3
3
  'app-url',
4
4
  'dir',
@@ -46,7 +46,7 @@ function parseArgs(args) {
46
46
  flags[rawKey] = true;
47
47
  continue;
48
48
  }
49
- throw new Error(`Unknown option for Remotion Hub add: --${rawKey}`);
49
+ throw new Error(`Unknown option for Component Hub add: --${rawKey}`);
50
50
  }
51
51
  return { positional, flags };
52
52
  }
@@ -61,16 +61,16 @@ function stringFlag(flags, ...names) {
61
61
  function booleanFlag(flags, ...names) {
62
62
  return names.some((name) => flags[name] === true);
63
63
  }
64
- export function buildRemotionHubAddHelp() {
64
+ export function buildComponentHubAddHelp() {
65
65
  return `
66
- dd actions remotion-hub add - Install a registry component into a local Remotion Hub project
66
+ dd actions component-hub add - Install a registry component into a local Component Hub project
67
67
 
68
68
  Usage:
69
- dd actions remotion-hub add <item> [options]
69
+ dd actions component-hub add <item> [options]
70
70
 
71
71
  Options:
72
72
  --dir <path> Project directory
73
- --registry <url> Double Digit app URL or /api/remotion-hub/r endpoint
73
+ --registry <url> Double Digit app URL or /api/component-hub/r endpoint
74
74
  --url, --app-url <url> Alias for --registry
75
75
  --namespace <name> Registry namespace when item is not namespace/slug
76
76
  --framework <name> Framework tag (e.g. remotion, hyperframe)
@@ -80,10 +80,10 @@ Options:
80
80
  --json Print machine-readable JSON
81
81
 
82
82
  Examples:
83
- npx @doubledigit/cli@latest actions remotion-hub add terminal-scene
84
- npx @doubledigit/cli@latest actions remotion-hub add doubledigit/terminal-scene --dir ./my-video
85
- npx @doubledigit/cli@latest actions remotion-hub add doubledigit/terminal-scene --framework hyperframe
86
- npx @doubledigit/cli@latest actions remotion-hub add terminal-scene --registry https://double-digit.example --skip-install
83
+ npx @doubledigit/cli@latest actions component-hub add terminal-scene
84
+ npx @doubledigit/cli@latest actions component-hub add doubledigit/terminal-scene --dir ./my-video
85
+ npx @doubledigit/cli@latest actions component-hub add doubledigit/terminal-scene --framework hyperframe
86
+ npx @doubledigit/cli@latest actions component-hub add terminal-scene --registry https://double-digit.example --skip-install
87
87
  `;
88
88
  }
89
89
  function printAdd(result) {
@@ -101,17 +101,17 @@ function printAdd(result) {
101
101
  console.log(result.snippet);
102
102
  }
103
103
  }
104
- export async function runRemotionHubAddCommand(args) {
104
+ export async function runComponentHubAddCommand(args) {
105
105
  const parsed = parseArgs(args);
106
106
  const json = booleanFlag(parsed.flags, 'json');
107
107
  if (booleanFlag(parsed.flags, 'help', 'h')) {
108
- console.log(buildRemotionHubAddHelp());
108
+ console.log(buildComponentHubAddHelp());
109
109
  return undefined;
110
110
  }
111
111
  if (parsed.positional.length !== 1) {
112
- throw new Error('Usage: dd actions remotion-hub add <item> [options]');
112
+ throw new Error('Usage: dd actions component-hub add <item> [options]');
113
113
  }
114
- const result = await runRemotionHubAdd({
114
+ const result = await runComponentHubAdd({
115
115
  item: parsed.positional[0] ?? '',
116
116
  projectDir: stringFlag(parsed.flags, 'dir'),
117
117
  registry: stringFlag(parsed.flags, 'registry', 'url', 'app-url'),
@@ -0,0 +1,4 @@
1
+ import { type RunComponentHubInitResult } from '../lib/component-hub-init.js';
2
+ export declare function buildComponentHubInitHelp(): string;
3
+ export declare function runComponentHubInitCommand(args: string[]): RunComponentHubInitResult | undefined;
4
+ //# sourceMappingURL=component-hub-init.d.ts.map
@@ -0,0 +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;AAkCD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,yBAAyB,GAAG,SAAS,CA8BhG"}
@@ -1,4 +1,4 @@
1
- import { runRemotionHubInit } from '../lib/remotion-hub-init.js';
1
+ import { runComponentHubInit } from '../lib/component-hub-init.js';
2
2
  const valueFlags = new Set([
3
3
  'app-url',
4
4
  'dir',
@@ -54,7 +54,7 @@ function parseArgs(args) {
54
54
  flags[rawKey] = true;
55
55
  continue;
56
56
  }
57
- throw new Error(`Unknown option for Remotion Hub init: --${rawKey}`);
57
+ throw new Error(`Unknown option for Component Hub init: --${rawKey}`);
58
58
  }
59
59
  return { positional, flags };
60
60
  }
@@ -69,18 +69,18 @@ function stringFlag(flags, ...names) {
69
69
  function booleanFlag(flags, ...names) {
70
70
  return names.some((name) => flags[name] === true);
71
71
  }
72
- export function buildRemotionHubInitHelp() {
72
+ export function buildComponentHubInitHelp() {
73
73
  return `
74
- dd actions remotion-hub init - Initialize a local Component Hub project
74
+ dd actions component-hub init - Initialize a local Component Hub project
75
75
 
76
76
  Creates a Remotion starter by default, then adds Component Hub config files.
77
77
 
78
78
  Usage:
79
- dd actions remotion-hub init [project-dir] [options]
79
+ dd actions component-hub init [project-dir] [options]
80
80
 
81
81
  Options:
82
82
  --dir <path> Project directory
83
- --registry <url> Double Digit app URL or /api/remotion-hub/r endpoint
83
+ --registry <url> Double Digit app URL or /api/component-hub/r endpoint
84
84
  --url, --app-url <url> Alias for --registry
85
85
  --namespace <name> Registry namespace (default: doubledigit)
86
86
  --framework <name> Framework to scaffold (remotion or hyperframe; default: remotion)
@@ -94,12 +94,12 @@ Options:
94
94
  --json Print machine-readable JSON
95
95
 
96
96
  Examples:
97
- npx @doubledigit/cli@latest actions remotion-hub init
98
- npx @doubledigit/cli@latest actions remotion-hub init my-video
99
- npx @doubledigit/cli@latest actions remotion-hub init my-video --framework remotion --yes
100
- npx @doubledigit/cli@latest actions remotion-hub init my-video --framework hyperframe --yes
101
- npx @doubledigit/cli@latest actions remotion-hub init my-video --framework remotion --skip-skills
102
- npx @doubledigit/cli@latest actions remotion-hub init my-video --registry https://double-digit.example
97
+ npx @doubledigit/cli@latest actions component-hub init
98
+ npx @doubledigit/cli@latest actions component-hub init my-video
99
+ npx @doubledigit/cli@latest actions component-hub init my-video --framework remotion --yes
100
+ npx @doubledigit/cli@latest actions component-hub init my-video --framework hyperframe --yes
101
+ npx @doubledigit/cli@latest actions component-hub init my-video --framework remotion --skip-skills
102
+ npx @doubledigit/cli@latest actions component-hub init my-video --registry https://double-digit.example
103
103
  `;
104
104
  }
105
105
  function printInit(result) {
@@ -133,17 +133,17 @@ function printInit(result) {
133
133
  }
134
134
  }
135
135
  }
136
- export function runRemotionHubInitCommand(args) {
136
+ export function runComponentHubInitCommand(args) {
137
137
  const parsed = parseArgs(args);
138
138
  const json = booleanFlag(parsed.flags, 'json');
139
139
  if (booleanFlag(parsed.flags, 'help', 'h')) {
140
- console.log(buildRemotionHubInitHelp());
140
+ console.log(buildComponentHubInitHelp());
141
141
  return undefined;
142
142
  }
143
143
  if (parsed.positional.length > 1) {
144
- throw new Error('Usage: dd actions remotion-hub init [project-dir] [options]');
144
+ throw new Error('Usage: dd actions component-hub init [project-dir] [options]');
145
145
  }
146
- const result = runRemotionHubInit({
146
+ const result = runComponentHubInit({
147
147
  projectDir: stringFlag(parsed.flags, 'dir') ?? parsed.positional[0],
148
148
  registry: stringFlag(parsed.flags, 'registry', 'url', 'app-url'),
149
149
  namespace: stringFlag(parsed.flags, 'namespace'),
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * dd sync — Regenerate micro-apps.ts and payload-plugins.ts from config + discovered packages.
3
3
  */
4
- export declare function sync(): Promise<void>;
4
+ export declare function sync(args?: string[]): Promise<void>;
5
5
  //# sourceMappingURL=sync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAqC1C"}
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA;;GAEG;AAoBH,wBAAsB,IAAI,CAAC,IAAI,GAAE,MAAM,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAyC7D"}
@@ -2,37 +2,42 @@
2
2
  * dd sync — Regenerate micro-apps.ts and payload-plugins.ts from config + discovered packages.
3
3
  */
4
4
  import { resolveWorkspacePaths } from '../paths.js';
5
- import { readConfig, isEntryEnabled } from '../config.js';
5
+ import { readConfig } from '../config.js';
6
6
  import { scanWorkspace } from '../scanner.js';
7
- import { writeMicroAppsModule, writeMicroAppTranspilePackagesModule, writePayloadPluginsModule, writeScopedPayloadConfigs, } from '../codegen.js';
8
- export async function sync() {
7
+ import { parseProfileArg, resolveBuildApps, resolveDeployProfile, resolveRuntimeApps, validateDeployProfile, } from '../deploy-profile.js';
8
+ import { writeMicroAppsModule, writeMicroAppTranspilePackagesModule, writeDeployProfileModule, writePayloadPluginsModule, writeScopedPayloadConfigs, } from '../codegen.js';
9
+ export async function sync(args = []) {
9
10
  const paths = resolveWorkspacePaths();
10
11
  const config = readConfig(paths.configPath);
11
12
  const { microApps: allApps, payloadPlugins } = scanWorkspace(paths);
12
- // Apply DD_APPS env var override (micro-apps only)
13
- const envApps = process.env.DD_APPS;
14
- let enabledApps = allApps;
15
- if (envApps) {
16
- const whitelist = new Set(envApps.split(',').map((s) => s.trim()).filter(Boolean));
17
- enabledApps = allApps.filter((app) => whitelist.has(app.key));
18
- console.log(`📋 DD_APPS override: ${[...whitelist].join(', ')}`);
13
+ const profile = resolveDeployProfile(paths, {
14
+ profileName: parseProfileArg(args),
15
+ });
16
+ validateDeployProfile(profile, allApps);
17
+ const buildApps = resolveBuildApps(allApps, profile);
18
+ const runtimeApps = resolveRuntimeApps(buildApps, profile, config);
19
+ if (profile.name) {
20
+ console.log(`📋 Deploy profile: ${profile.name} (${profile.mode})`);
19
21
  }
20
- else if (config.apps) {
21
- enabledApps = allApps.filter((app) => isEntryEnabled(config.apps[app.key]));
22
+ else if (profile.apps) {
23
+ console.log(`📋 DD_APPS build filter: ${profile.apps.join(', ')}`);
22
24
  }
23
- writeMicroAppsModule(paths.microAppsOutputPath, allApps);
24
- writeMicroAppTranspilePackagesModule(paths.microAppTranspilePackagesOutputPath, allApps);
25
+ writeMicroAppsModule(paths.microAppsOutputPath, buildApps);
26
+ writeMicroAppTranspilePackagesModule(paths.microAppTranspilePackagesOutputPath, buildApps);
27
+ writeDeployProfileModule(paths.deployProfileOutputPath, profile);
28
+ writeDeployProfileModule(paths.sharedDeployProfileOutputPath, profile);
25
29
  writePayloadPluginsModule(paths.payloadPluginsOutputPath, payloadPlugins);
26
- writeScopedPayloadConfigs(paths.payloadConfigsDir, allApps);
27
- console.log(`✅ Synced ${enabledApps.length}/${allApps.length} micro-apps → micro-apps.ts`);
28
- for (const app of allApps) {
29
- const isEnabled = enabledApps.some((e) => e.key === app.key);
30
+ writeScopedPayloadConfigs(paths.payloadConfigsDir, buildApps);
31
+ console.log(`✅ Synced ${buildApps.length}/${allApps.length} micro-app package(s) in build graph → micro-apps.ts`);
32
+ console.log(`✅ Runtime exposes ${runtimeApps.length}/${buildApps.length} generated micro-app(s)`);
33
+ for (const app of buildApps) {
34
+ const isEnabled = runtimeApps.some((e) => e.key === app.key);
30
35
  console.log(` ${isEnabled ? '✅' : '❌'} ${app.key} (${app.npmName})`);
31
36
  }
32
37
  console.log(`✅ Synced ${payloadPlugins.length} payload plugin(s) → payload-plugins.ts`);
33
38
  for (const plugin of payloadPlugins) {
34
39
  console.log(` 🔌 ${plugin.key} (${plugin.npmName})`);
35
40
  }
36
- console.log(`✅ Synced ${allApps.length} micro-app package(s) → micro-app-transpile-packages.ts`);
37
- console.log(`✅ Synced ${allApps.length} scoped Payload config(s)`);
41
+ console.log(`✅ Synced ${buildApps.length} micro-app package(s) → micro-app-transpile-packages.ts`);
42
+ console.log(`✅ Synced ${buildApps.length} scoped Payload config(s)`);
38
43
  }
@@ -0,0 +1,39 @@
1
+ import type { DDAppsConfigFile } from './config.js';
2
+ import type { WorkspacePaths } from './paths.js';
3
+ import type { DiscoveredApp } from './scanner.js';
4
+ export type DeployMode = 'platform' | 'primary-app';
5
+ export interface DeployProfile {
6
+ mode?: DeployMode;
7
+ primaryApp?: string;
8
+ apps?: string[];
9
+ brandName?: string;
10
+ domain?: string;
11
+ canonicalUrl?: string;
12
+ mount?: string;
13
+ database?: string;
14
+ }
15
+ export interface DeployProfilesFile {
16
+ profiles?: Record<string, DeployProfile>;
17
+ }
18
+ export interface ResolvedDeployProfile {
19
+ name?: string;
20
+ source: 'default' | 'file' | 'env';
21
+ mode: DeployMode;
22
+ primaryApp?: string;
23
+ apps?: string[];
24
+ brandName?: string;
25
+ domain?: string;
26
+ canonicalUrl?: string;
27
+ mount: string;
28
+ hidePlatformRoutes: boolean;
29
+ }
30
+ export interface ResolveDeployProfileOptions {
31
+ profileName?: string;
32
+ env?: Record<string, string | undefined>;
33
+ }
34
+ export declare function resolveDeployProfile(paths: WorkspacePaths, options?: ResolveDeployProfileOptions): ResolvedDeployProfile;
35
+ export declare function validateDeployProfile(profile: ResolvedDeployProfile, discoveredApps: DiscoveredApp[]): void;
36
+ export declare function resolveBuildApps(discoveredApps: DiscoveredApp[], profile: ResolvedDeployProfile): DiscoveredApp[];
37
+ export declare function resolveRuntimeApps(buildApps: DiscoveredApp[], profile: ResolvedDeployProfile, config: DDAppsConfigFile): DiscoveredApp[];
38
+ export declare function parseProfileArg(args?: string[]): string | undefined;
39
+ //# sourceMappingURL=deploy-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy-profile.d.ts","sourceRoot":"","sources":["../src/deploy-profile.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,aAAa,CAAC;AAEpD,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,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BvE"}
@@ -0,0 +1,131 @@
1
+ import fs from 'node:fs';
2
+ import { isEntryEnabled } from './config.js';
3
+ function readProfilesFile(path) {
4
+ if (!fs.existsSync(path))
5
+ return {};
6
+ try {
7
+ return JSON.parse(fs.readFileSync(path, 'utf-8'));
8
+ }
9
+ catch (error) {
10
+ const detail = error instanceof Error ? error.message : String(error);
11
+ throw new Error(`Could not parse deploy profiles at ${path}: ${detail}`);
12
+ }
13
+ }
14
+ function splitAppList(value) {
15
+ const apps = value
16
+ ?.split(',')
17
+ .map((app) => app.trim())
18
+ .filter(Boolean);
19
+ return apps && apps.length > 0 ? apps : undefined;
20
+ }
21
+ function parseBoolean(value) {
22
+ if (value === undefined)
23
+ return undefined;
24
+ const normalized = value.trim().toLowerCase();
25
+ if (['1', 'true', 'yes', 'on'].includes(normalized))
26
+ return true;
27
+ if (['0', 'false', 'no', 'off'].includes(normalized))
28
+ return false;
29
+ return undefined;
30
+ }
31
+ function normalizeMode(value) {
32
+ if (!value)
33
+ return undefined;
34
+ if (value === 'platform' || value === 'primary-app')
35
+ return value;
36
+ throw new Error(`Invalid deploy mode "${value}". Expected "platform" or "primary-app".`);
37
+ }
38
+ function unique(values) {
39
+ return [...new Set(values)];
40
+ }
41
+ export function resolveDeployProfile(paths, options = {}) {
42
+ const env = options.env ?? process.env;
43
+ const profilesFile = readProfilesFile(paths.deployProfilesPath);
44
+ const requestedName = options.profileName ?? env.DD_DEPLOY_PROFILE;
45
+ const fileProfile = requestedName
46
+ ? profilesFile.profiles?.[requestedName]
47
+ : undefined;
48
+ if (requestedName && !fileProfile) {
49
+ throw new Error(`Deploy profile "${requestedName}" was not found in ${paths.deployProfilesPath}`);
50
+ }
51
+ const envApps = splitAppList(env.DD_APPS);
52
+ const envMode = normalizeMode(env.DD_DEPLOY_MODE);
53
+ const mode = envMode ?? fileProfile?.mode ?? 'platform';
54
+ const primaryApp = env.DD_PRIMARY_APP?.trim() || fileProfile?.primaryApp;
55
+ const apps = envApps ?? fileProfile?.apps;
56
+ const hidePlatformRoutes = parseBoolean(env.DD_HIDE_PLATFORM_ROUTES) ?? mode === 'primary-app';
57
+ return {
58
+ name: requestedName,
59
+ source: envMode || envApps || env.DD_PRIMARY_APP ? 'env' : requestedName ? 'file' : 'default',
60
+ mode,
61
+ primaryApp,
62
+ apps: apps ? unique(apps) : undefined,
63
+ brandName: env.DD_BRAND_NAME?.trim() || fileProfile?.brandName,
64
+ domain: env.DD_BRAND_DOMAIN?.trim() || fileProfile?.domain,
65
+ canonicalUrl: env.DD_CANONICAL_URL?.trim() || fileProfile?.canonicalUrl,
66
+ mount: env.DD_PRIMARY_APP_MOUNT?.trim() || fileProfile?.mount || '/',
67
+ hidePlatformRoutes,
68
+ };
69
+ }
70
+ function ensureKnownAppKeys(apps, keys, label) {
71
+ const known = new Set(apps.map((app) => app.key));
72
+ const missing = keys.filter((key) => !known.has(key));
73
+ if (missing.length > 0) {
74
+ throw new Error(`${label} references unknown micro-app(s): ${missing.join(', ')}`);
75
+ }
76
+ }
77
+ export function validateDeployProfile(profile, discoveredApps) {
78
+ const keys = [
79
+ ...(profile.primaryApp ? [profile.primaryApp] : []),
80
+ ...(profile.apps ?? []),
81
+ ];
82
+ ensureKnownAppKeys(discoveredApps, keys, 'Deploy profile');
83
+ if (profile.mode !== 'primary-app')
84
+ return;
85
+ if (!profile.primaryApp) {
86
+ throw new Error('primary-app deploy mode requires DD_PRIMARY_APP or profile.primaryApp');
87
+ }
88
+ const apps = profile.apps ?? [profile.primaryApp];
89
+ if (apps.length !== 1 || apps[0] !== profile.primaryApp) {
90
+ throw new Error('primary-app deploy mode must resolve exactly one app matching primaryApp');
91
+ }
92
+ }
93
+ export function resolveBuildApps(discoveredApps, profile) {
94
+ const buildKeys = profile.apps ?? (profile.mode === 'primary-app' && profile.primaryApp
95
+ ? [profile.primaryApp]
96
+ : undefined);
97
+ if (!buildKeys)
98
+ return discoveredApps;
99
+ ensureKnownAppKeys(discoveredApps, buildKeys, 'Build app filter');
100
+ const whitelist = new Set(buildKeys);
101
+ return discoveredApps.filter((app) => whitelist.has(app.key));
102
+ }
103
+ export function resolveRuntimeApps(buildApps, profile, config) {
104
+ if (profile.mode === 'primary-app') {
105
+ return buildApps.filter((app) => app.key === profile.primaryApp);
106
+ }
107
+ if (profile.apps)
108
+ return buildApps;
109
+ if (!config.apps)
110
+ return buildApps;
111
+ return buildApps.filter((app) => isEntryEnabled(config.apps?.[app.key]));
112
+ }
113
+ export function parseProfileArg(args = []) {
114
+ for (let i = 0; i < args.length; i++) {
115
+ const arg = args[i];
116
+ if (arg === '--profile') {
117
+ const value = args[i + 1];
118
+ if (!value || value.startsWith('--')) {
119
+ throw new Error('--profile requires a value');
120
+ }
121
+ return value;
122
+ }
123
+ if (arg.startsWith('--profile=')) {
124
+ const value = arg.slice('--profile='.length).trim();
125
+ if (!value)
126
+ throw new Error('--profile requires a value');
127
+ return value;
128
+ }
129
+ }
130
+ return undefined;
131
+ }
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * without importing the full extension-management dependency graph first.
7
7
  */
8
8
  declare const command: string, args: string[];
9
- declare const HELP = "\n@doubledigit/cli \u2014 Manage extensions and local setup\n\nCommands:\n doctor Check local prerequisites and project health\n onboard Prepare local development and start the app\n run Start the local app with automatic DB bootstrap\n dev Start DB + app without migrations or seed data\n db <subcommand> Database helpers (status, migrate, create)\n actions <app> [action] Discover and invoke micro-app actions\n create <name> Scaffold a new micro-app from the template\n init <project-name> Scaffold a new Double Digit project\n add|install <source> Install an extension from GitHub or a marketplace\n sync Regenerate micro-apps.ts from dd-apps.config.json\n enable <name> Enable a micro-app (updates config + runs sync)\n disable <name> Disable a micro-app (updates config + runs sync)\n uninstall|remove <name> Completely remove a micro-app\n list List all discovered micro-apps with enabled/disabled status\n info <name> Show detailed info about an installed extension\n outdated Check for outdated marketplace extensions\n reconcile Detect drift between lock file, marketplace, and local files\n marketplace <sub> Manage marketplace registrations (add/list/update/remove)\n browse [marketplace] Browse available extensions in registered marketplaces\n\nOptions:\n --help, -h Show this help message\n\nExamples:\n dd doctor\n dd onboard --yes\n dd onboard # setup + start the dev server\n dd onboard --no-run # setup only\n dd init my-project # scaffold and bootstrap a fresh project\n dd init my-project --run # scaffold + bootstrap + start\n dd init my-project --skip-install --no-git\n dd run\n dd dev\n dd db status\n npx @doubledigit/cli@latest actions remotion-hub init my-video --framework remotion --yes\n npx @doubledigit/cli@latest actions remotion-hub init my-video --framework remotion --skip-skills\n npx @doubledigit/cli@latest actions remotion-hub search-components --framework remotion --query \"animated chart\"\n dd create invoice-tracker\n dd add gh:owner/repo/extensions/micro-apps/habit-tracker\n dd add habit-tracker@community\n dd info habit-tracker\n dd reconcile\n dd marketplace add digitaldouble/dd-marketplace\n dd browse community\n DD_APPS=tasks,agent-v2 dd sync\n";
9
+ declare const HELP = "\n@doubledigit/cli \u2014 Manage extensions and local setup\n\nCommands:\n doctor Check local prerequisites and project health\n onboard Prepare local development and start the app\n run Start the local app with automatic DB bootstrap\n dev Start DB + app without migrations or seed data\n db <subcommand> Database helpers (status, migrate, create)\n actions <app> [action] Discover and invoke micro-app actions\n create <name> Scaffold a new micro-app from the template\n init <project-name> Scaffold a new Double Digit project\n add|install <source> Install an extension from GitHub or a marketplace\n sync Regenerate micro-apps.ts from dd-apps.config.json\n enable <name> Enable a micro-app (updates config + runs sync)\n disable <name> Disable a micro-app (updates config + runs sync)\n uninstall|remove <name> Completely remove a micro-app\n list List all discovered micro-apps with enabled/disabled status\n info <name> Show detailed info about an installed extension\n outdated Check for outdated marketplace extensions\n reconcile Detect drift between lock file, marketplace, and local files\n marketplace <sub> Manage marketplace registrations (add/list/update/remove)\n browse [marketplace] Browse available extensions in registered marketplaces\n\nOptions:\n --help, -h Show this help message\n\nExamples:\n dd doctor\n dd onboard --yes\n dd onboard # setup + start the dev server\n dd onboard --no-run # setup only\n dd init my-project # scaffold and bootstrap a fresh project\n dd init my-project --run # scaffold + bootstrap + start\n dd init my-project --skip-install --no-git\n dd run\n dd dev\n dd db status\n npx @doubledigit/cli@latest actions component-hub init my-video --framework remotion --yes\n npx @doubledigit/cli@latest actions component-hub init my-video --framework remotion --skip-skills\n npx @doubledigit/cli@latest actions component-hub search-components --framework remotion --query \"animated chart\"\n dd create invoice-tracker\n dd add gh:owner/repo/extensions/micro-apps/habit-tracker\n dd add habit-tracker@community\n dd info habit-tracker\n dd reconcile\n dd marketplace add digitaldouble/dd-marketplace\n dd browse community\n DD_APPS=tasks,agent-v2 dd sync\n dd sync --profile necto-component-hub\n";
10
10
  declare function requireArg(value: string | undefined, usage: string): string;
11
11
  declare function runAddCommand(rawArgs: string[]): Promise<void>;
12
12
  declare function main(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,QAAA,MAAW,OAAO,UAAK,IAAI,UAAgB,CAAC;AAE5C,QAAA,MAAM,IAAI,y7EAiDT,CAAC;AAEF,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAOpE;AAED,iBAAe,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB7D;AAED,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAsInC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,QAAA,MAAW,OAAO,UAAK,IAAI,UAAgB,CAAC;AAE5C,QAAA,MAAM,IAAI,q+EAkDT,CAAC;AAEF,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAOpE;AAED,iBAAe,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB7D;AAED,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAsInC"}
package/dist/index.js CHANGED
@@ -45,9 +45,9 @@ Examples:
45
45
  dd run
46
46
  dd dev
47
47
  dd db status
48
- npx @doubledigit/cli@latest actions remotion-hub init my-video --framework remotion --yes
49
- npx @doubledigit/cli@latest actions remotion-hub init my-video --framework remotion --skip-skills
50
- npx @doubledigit/cli@latest actions remotion-hub search-components --framework remotion --query "animated chart"
48
+ npx @doubledigit/cli@latest actions component-hub init my-video --framework remotion --yes
49
+ npx @doubledigit/cli@latest actions component-hub init my-video --framework remotion --skip-skills
50
+ npx @doubledigit/cli@latest actions component-hub search-components --framework remotion --query "animated chart"
51
51
  dd create invoice-tracker
52
52
  dd add gh:owner/repo/extensions/micro-apps/habit-tracker
53
53
  dd add habit-tracker@community
@@ -56,6 +56,7 @@ Examples:
56
56
  dd marketplace add digitaldouble/dd-marketplace
57
57
  dd browse community
58
58
  DD_APPS=tasks,agent-v2 dd sync
59
+ dd sync --profile necto-component-hub
59
60
  `;
60
61
  function requireArg(value, usage) {
61
62
  if (!value) {
@@ -138,7 +139,7 @@ async function main() {
138
139
  break;
139
140
  case 'sync': {
140
141
  const { sync } = await import('./commands/sync.js');
141
- await sync();
142
+ await sync(args);
142
143
  break;
143
144
  }
144
145
  case 'enable': {
@@ -1 +1 @@
1
- {"version":3,"file":"actions-client.d.ts","sourceRoot":"","sources":["../../src/lib/actions-client.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,WAA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AAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAiCjF"}
@@ -59,8 +59,8 @@ export const componentFrameworkAdapters = [
59
59
  },
60
60
  addNonInteractiveAgentFlags({
61
61
  command: 'npx',
62
- args: ['skills', 'add', 'crystalphantom/double-digit', '--skill', 'dd-remotion-hub'],
63
- display: 'npx skills add crystalphantom/double-digit --skill dd-remotion-hub',
62
+ args: ['skills', 'add', 'crystalphantom/double-digit', '--skill', 'dd-component-hub'],
63
+ display: 'npx skills add crystalphantom/double-digit --skill dd-component-hub',
64
64
  }, nonInteractive),
65
65
  ],
66
66
  buildPostAddSnippet: buildRemotionSnippet,
@@ -89,8 +89,8 @@ export const componentFrameworkAdapters = [
89
89
  }, nonInteractive),
90
90
  addNonInteractiveAgentFlags({
91
91
  command: 'npx',
92
- args: ['skills', 'add', 'crystalphantom/double-digit', '--skill', 'dd-remotion-hub'],
93
- display: 'npx skills add crystalphantom/double-digit --skill dd-remotion-hub',
92
+ args: ['skills', 'add', 'crystalphantom/double-digit', '--skill', 'dd-component-hub'],
93
+ display: 'npx skills add crystalphantom/double-digit --skill dd-component-hub',
94
94
  }, nonInteractive),
95
95
  ],
96
96
  buildPostAddSnippet: () => '',
@@ -11,7 +11,7 @@ type ComponentHubSkillsInstallResult = ComponentHubSkillsCommand & {
11
11
  status: number | null;
12
12
  error?: string;
13
13
  };
14
- export interface RemotionHubConfig {
14
+ export interface ComponentHubConfig {
15
15
  $schema: string;
16
16
  registry: string;
17
17
  namespace: string;
@@ -40,7 +40,7 @@ export interface RemotionHubConfig {
40
40
  language: 'typescript' | 'javascript';
41
41
  };
42
42
  }
43
- export interface RemotionHubLock {
43
+ export interface ComponentHubLock {
44
44
  version: 1;
45
45
  installed: Record<string, {
46
46
  version: string | null;
@@ -54,7 +54,7 @@ export interface RemotionHubLock {
54
54
  framework: string;
55
55
  }>;
56
56
  }
57
- export interface RunRemotionHubInitOptions {
57
+ export interface RunComponentHubInitOptions {
58
58
  projectDir?: string;
59
59
  registry?: string;
60
60
  namespace?: string;
@@ -69,12 +69,12 @@ export interface RunRemotionHubInitOptions {
69
69
  framework?: string;
70
70
  nodeVersion?: string;
71
71
  }
72
- export interface RunRemotionHubInitResult {
72
+ export interface RunComponentHubInitResult {
73
73
  projectDir: string;
74
74
  configPath: string;
75
75
  lockPath: string;
76
76
  created: string[];
77
- config: RemotionHubConfig;
77
+ config: ComponentHubConfig;
78
78
  framework: ComponentFrameworkId;
79
79
  devCommand: string;
80
80
  create: {
@@ -92,7 +92,7 @@ export interface RunRemotionHubInitResult {
92
92
  commands: ComponentHubSkillsInstallResult[];
93
93
  };
94
94
  }
95
- export interface RunRemotionHubAddOptions {
95
+ export interface RunComponentHubAddOptions {
96
96
  item: string;
97
97
  projectDir?: string;
98
98
  namespace?: string;
@@ -104,7 +104,7 @@ export interface RunRemotionHubAddOptions {
104
104
  spawnImpl?: typeof spawnSync;
105
105
  framework?: string;
106
106
  }
107
- export interface RunRemotionHubAddResult {
107
+ export interface RunComponentHubAddResult {
108
108
  name: string;
109
109
  namespace: string;
110
110
  slug: string;
@@ -116,19 +116,19 @@ export interface RunRemotionHubAddResult {
116
116
  snippet: string;
117
117
  framework: ComponentFrameworkId;
118
118
  }
119
- export interface ResolveRemotionHubRegistryOptions {
119
+ export interface ResolveComponentHubRegistryOptions {
120
120
  registry?: string;
121
121
  env?: Record<string, string | undefined>;
122
122
  generatedDefaultRegistry?: string;
123
123
  localDefaultRegistry?: string;
124
124
  }
125
- export declare function resolveRemotionHubRegistry({ registry, env, generatedDefaultRegistry, localDefaultRegistry, }?: ResolveRemotionHubRegistryOptions): string;
126
- export declare function buildRemotionSkillsCommands(options?: Pick<RunRemotionHubInitOptions, 'nonInteractive' | 'yes'>): {
125
+ export declare function resolveComponentHubRegistry({ registry, env, generatedDefaultRegistry, localDefaultRegistry, }?: ResolveComponentHubRegistryOptions): string;
126
+ export declare function buildRemotionSkillsCommands(options?: Pick<RunComponentHubInitOptions, 'nonInteractive' | 'yes'>): {
127
127
  command: "npx";
128
128
  args: string[];
129
129
  display: string;
130
130
  }[];
131
- export declare function runRemotionHubInit(options?: RunRemotionHubInitOptions): RunRemotionHubInitResult;
132
- export declare function runRemotionHubAdd(options: RunRemotionHubAddOptions): Promise<RunRemotionHubAddResult>;
131
+ export declare function runComponentHubInit(options?: RunComponentHubInitOptions): RunComponentHubInitResult;
132
+ export declare function runComponentHubAdd(options: RunComponentHubAddOptions): Promise<RunComponentHubAddResult>;
133
133
  export {};
134
- //# sourceMappingURL=remotion-hub-init.d.ts.map
134
+ //# sourceMappingURL=component-hub-init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-hub-init.d.ts","sourceRoot":"","sources":["../../src/lib/component-hub-init.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGV,MAAM,oBAAoB,CAAC;AAY5B,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAOnC,KAAK,yBAAyB,GAAG;IAC/B,OAAO,EAAE,KAAK,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAQF,KAAK,+BAA+B,GAAG,yBAAyB,GAAG;IACjE,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE;QAChD,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,M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B;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,oBAAoB,CAAC;CACjC;AAsFD,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,QAAQ,EACR,GAAiB,EACjB,wBAA4D,EAC5D,oBAAuC,GACxC,GAAE,kCAAuC,UAQzC;AAqMD,wBAAgB,2BAA2B,CACzC,OAAO,GAAE,IAAI,CAAC,0BAA0B,EAAE,gBAAgB,GAAG,KAAK,CAAM;;;;IAMzE;AA0QD,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,0BAA+B,GAAG,yBAAyB,CA0DvG;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,wBAAwB,CAAC,CAmGnC"}
@@ -1,11 +1,11 @@
1
- import { spawnSync } from 'node:child_process';
1
+ import { spawnSync, } from 'node:child_process';
2
2
  import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync, } from 'node:fs';
3
3
  import path from 'node:path';
4
4
  import { GENERATED_DEFAULT_ACTIONS_APP_URL } from '../generated/defaults.js';
5
5
  import { isLocalAppUrl } from './actions-client.js';
6
6
  import { assertFrameworkNodeRequirement, getComponentFrameworkAdapter, normalizeFrameworkId, } from './component-frameworks.js';
7
- const CONFIG_FILE = 'remotion-hub.json';
8
- const LOCK_FILE = 'remotion-hub.lock.json';
7
+ const CONFIG_FILE = 'component-hub.json';
8
+ const LOCK_FILE = 'component-hub.lock.json';
9
9
  const DEFAULT_REGISTRY = 'http://localhost:3111';
10
10
  const DEFAULT_NAMESPACE = 'doubledigit';
11
11
  function toJson(value) {
@@ -86,7 +86,7 @@ function detectLanguage(projectDir) {
86
86
  function firstExisting(projectDir, candidates, fallback) {
87
87
  return candidates.find((candidate) => existsSync(path.join(projectDir, candidate))) ?? fallback;
88
88
  }
89
- export function resolveRemotionHubRegistry({ registry, env = process.env, generatedDefaultRegistry = GENERATED_DEFAULT_ACTIONS_APP_URL, localDefaultRegistry = DEFAULT_REGISTRY, } = {}) {
89
+ export function resolveComponentHubRegistry({ registry, env = process.env, generatedDefaultRegistry = GENERATED_DEFAULT_ACTIONS_APP_URL, localDefaultRegistry = DEFAULT_REGISTRY, } = {}) {
90
90
  return readUrlValue(registry)
91
91
  ?? readUrlValue(env.DD_APP_URL)
92
92
  ?? readUrlValue(env.APP_URL)
@@ -103,8 +103,8 @@ function defaultConfig(projectDir, options) {
103
103
  const remotionAdapter = getComponentFrameworkAdapter('remotion');
104
104
  const hyperframeAdapter = getComponentFrameworkAdapter('hyperframe');
105
105
  return {
106
- $schema: 'https://remotion-hub.dev/schema/remotion-hub.json',
107
- registry: resolveRemotionHubRegistry({ registry: options.registry }),
106
+ $schema: 'https://component-hub.dev/schema/component-hub.json',
107
+ registry: resolveComponentHubRegistry({ registry: options.registry }),
108
108
  namespace: options.namespace?.trim() || DEFAULT_NAMESPACE,
109
109
  defaultFramework: framework,
110
110
  frameworks: {
@@ -120,12 +120,12 @@ function defaultConfig(projectDir, options) {
120
120
  },
121
121
  },
122
122
  paths: {
123
- scenes: 'src/remotion-hub/[framework]/scenes',
124
- components: 'src/remotion-hub/[framework]/components',
125
- overlays: 'src/remotion-hub/[framework]/overlays',
126
- transitions: 'src/remotion-hub/[framework]/transitions',
127
- assets: 'public/remotion-hub/[framework]/assets',
128
- registry: `src/remotion-hub/registry.${entryExtension}`,
123
+ scenes: 'src/component-hub/[framework]/scenes',
124
+ components: 'src/component-hub/[framework]/components',
125
+ overlays: 'src/component-hub/[framework]/overlays',
126
+ transitions: 'src/component-hub/[framework]/transitions',
127
+ assets: 'public/component-hub/[framework]/assets',
128
+ registry: `src/component-hub/registry.${entryExtension}`,
129
129
  },
130
130
  remotion: {
131
131
  entrypoint: firstExisting(projectDir, ['src/index.ts', 'src/index.tsx', 'src/index.js', 'src/index.jsx'], `src/index.${entryExtension}`),
@@ -182,13 +182,13 @@ function registrySource(config, lock) {
182
182
  return acc;
183
183
  }, {});
184
184
  const lines = [
185
- '// Generated by remotion-hub. Do not edit manually.',
185
+ '// Generated by component-hub. Do not edit manually.',
186
186
  '',
187
- `export const remotionHubRegistry = ${JSON.stringify(installed, null, 2)}${config.project.language === 'typescript' ? ' as const' : ''};`,
187
+ `export const componentHubRegistry = ${JSON.stringify(installed, null, 2)}${config.project.language === 'typescript' ? ' as const' : ''};`,
188
188
  '',
189
189
  ];
190
190
  if (config.project.language === 'typescript') {
191
- lines.push('export type RemotionHubRegistry = typeof remotionHubRegistry;', '');
191
+ lines.push('export type ComponentHubRegistry = typeof componentHubRegistry;', '');
192
192
  }
193
193
  return lines.join('\n');
194
194
  }
@@ -203,14 +203,50 @@ function hasPackageJson(projectDir) {
203
203
  function hasEntries(projectDir) {
204
204
  return existsSync(projectDir) && readdirSync(projectDir).length > 0;
205
205
  }
206
+ function withNonInteractiveNpx(command, nonInteractive) {
207
+ if (!nonInteractive || command.command !== 'npx')
208
+ return command;
209
+ const args = command.args[0] === '--yes'
210
+ ? command.args
211
+ : ['--yes', ...command.args];
212
+ const display = command.display
213
+ ? command.display.startsWith('npx --yes ')
214
+ ? command.display
215
+ : command.display.startsWith('npx ')
216
+ ? `npx --yes ${command.display.slice('npx '.length)}`
217
+ : `npx --yes ${args.slice(1).join(' ')}`
218
+ : command.display;
219
+ return {
220
+ ...command,
221
+ args,
222
+ ...(display ? { display } : {}),
223
+ };
224
+ }
225
+ function componentHubChildSpawnOptions(command, options) {
226
+ return {
227
+ cwd: options.cwd,
228
+ encoding: 'buffer',
229
+ stdio: options.quiet ? 'pipe' : 'inherit',
230
+ ...(options.nonInteractive && command === 'npx'
231
+ ? { env: { ...process.env, npm_config_yes: 'true' } }
232
+ : {}),
233
+ };
234
+ }
235
+ function spawnComponentHubChild(command, options) {
236
+ return (options.spawnImpl ?? spawnSync)(command.command, command.args, componentHubChildSpawnOptions(command.command, options));
237
+ }
206
238
  export function buildRemotionSkillsCommands(options = {}) {
207
239
  const nonInteractive = options.yes === true || options.nonInteractive === true;
208
- return getComponentFrameworkAdapter('remotion').skillsCommands({ nonInteractive });
240
+ return getComponentFrameworkAdapter('remotion')
241
+ .skillsCommands({ nonInteractive })
242
+ .map((command) => withNonInteractiveNpx(command, nonInteractive));
209
243
  }
210
244
  function runFrameworkSkillsInstall(projectDir, options) {
211
245
  const adapter = getComponentFrameworkAdapter(options.framework);
212
246
  const nonInteractive = options.yes === true || options.nonInteractive === true;
213
- const commands = adapter.skillsCommands({ nonInteractive });
247
+ const commands = adapter
248
+ .skillsCommands({ nonInteractive })
249
+ .map((command) => withNonInteractiveNpx(command, nonInteractive));
214
250
  if (options.skipSkills) {
215
251
  return commands.map((command) => ({
216
252
  ...command,
@@ -220,9 +256,11 @@ function runFrameworkSkillsInstall(projectDir, options) {
220
256
  }));
221
257
  }
222
258
  return commands.map((command) => {
223
- const result = (options.spawnImpl ?? spawnSync)(command.command, command.args, {
259
+ const result = spawnComponentHubChild(command, {
224
260
  cwd: projectDir,
225
- stdio: options.quiet ? 'pipe' : 'inherit',
261
+ nonInteractive,
262
+ quiet: options.quiet,
263
+ spawnImpl: options.spawnImpl,
226
264
  });
227
265
  return {
228
266
  ...command,
@@ -247,7 +285,7 @@ function shouldSkipFrameworkCreate(options) {
247
285
  function ensureBaseFrameworkProject(projectDir, options) {
248
286
  const adapter = getComponentFrameworkAdapter(options.framework);
249
287
  const nonInteractive = options.yes === true || options.nonInteractive === true;
250
- const frameworkCreate = adapter.buildCreateCommand(projectDir, { nonInteractive });
288
+ const frameworkCreate = withNonInteractiveNpx(adapter.buildCreateCommand(projectDir, { nonInteractive }), nonInteractive);
251
289
  if (shouldSkipFrameworkCreate(options) || hasPackageJson(projectDir)) {
252
290
  return {
253
291
  ...frameworkCreate,
@@ -259,9 +297,11 @@ function ensureBaseFrameworkProject(projectDir, options) {
259
297
  throw new Error(`Project directory exists but is not a ${adapter.displayName} project: ${projectDir}. `
260
298
  + `Remove it, choose an empty path, or run ${adapter.displayName} setup manually before Component Hub init.`);
261
299
  }
262
- const result = (options.spawnImpl ?? spawnSync)(frameworkCreate.command, frameworkCreate.args, {
300
+ const result = spawnComponentHubChild(frameworkCreate, {
263
301
  cwd: process.cwd(),
264
- stdio: options.quiet ? 'pipe' : 'inherit',
302
+ nonInteractive,
303
+ quiet: options.quiet,
304
+ spawnImpl: options.spawnImpl,
265
305
  });
266
306
  assertFrameworkCreateSucceeded(result, adapter.displayName, frameworkCreate.command, frameworkCreate.args);
267
307
  return {
@@ -272,7 +312,7 @@ function ensureBaseFrameworkProject(projectDir, options) {
272
312
  function loadConfig(projectDir) {
273
313
  const configPath = path.join(projectDir, CONFIG_FILE);
274
314
  if (!existsSync(configPath)) {
275
- throw new Error(`Missing ${CONFIG_FILE}. Run Remotion Hub init first.`);
315
+ throw new Error(`Missing ${CONFIG_FILE}. Run Component Hub init first.`);
276
316
  }
277
317
  return JSON.parse(readFileSync(configPath, 'utf8'));
278
318
  }
@@ -300,11 +340,11 @@ function registryPayloadUrl(config, namespace, slug, registryOverride, framework
300
340
  const encodedNamespace = encodeURIComponent(namespace);
301
341
  const encodedSlug = encodeURIComponent(slug);
302
342
  let url = '';
303
- if (base.endsWith('/api/remotion-hub/r')) {
343
+ if (base.endsWith('/api/component-hub/r')) {
304
344
  url = `${base}/${encodedNamespace}/${encodedSlug}`;
305
345
  }
306
346
  else {
307
- url = `${base}/api/remotion-hub/r/${encodedNamespace}/${encodedSlug}`;
347
+ url = `${base}/api/component-hub/r/${encodedNamespace}/${encodedSlug}`;
308
348
  }
309
349
  if (framework) {
310
350
  url += `?framework=${encodeURIComponent(framework)}`;
@@ -372,7 +412,7 @@ function targetForRegistryFile(config, file, framework) {
372
412
  return path.posix.join(rootPath.replace(/\/+$/, ''), sourcePath.slice(prefix.length));
373
413
  }
374
414
  }
375
- return path.posix.join('src/remotion-hub', sourcePath).replace(/\[framework\]/g, framework);
415
+ return path.posix.join('src/component-hub', sourcePath).replace(/\[framework\]/g, framework);
376
416
  }
377
417
  function packageJsonDependencies(projectDir) {
378
418
  const packageJsonPath = path.join(projectDir, 'package.json');
@@ -412,7 +452,7 @@ function installDependencies(projectDir, packageManager, dependencies, spawnImpl
412
452
  }
413
453
  return missing;
414
454
  }
415
- export function runRemotionHubInit(options = {}) {
455
+ export function runComponentHubInit(options = {}) {
416
456
  const framework = normalizeFrameworkId(options.framework);
417
457
  const adapter = getComponentFrameworkAdapter(framework);
418
458
  const normalizedOptions = { ...options, framework };
@@ -464,7 +504,7 @@ export function runRemotionHubInit(options = {}) {
464
504
  },
465
505
  };
466
506
  }
467
- export async function runRemotionHubAdd(options) {
507
+ export async function runComponentHubAdd(options) {
468
508
  const projectDir = resolveProjectDir(options.projectDir);
469
509
  const config = loadConfig(projectDir);
470
510
  const framework = normalizeFrameworkId(options.framework ?? getConfigDefaultFramework(config));
package/dist/paths.d.ts CHANGED
@@ -17,12 +17,18 @@ export interface WorkspacePaths {
17
17
  mainAppDir: string;
18
18
  /** dd-apps.config.json path */
19
19
  configPath: string;
20
+ /** Root deployment profile config path */
21
+ deployProfilesPath: string;
20
22
  /** dd-apps.lock.json path */
21
23
  lockFilePath: string;
22
24
  /** Generated micro-apps.ts path */
23
25
  microAppsOutputPath: string;
24
26
  /** Generated micro-app package list consumed by next.config.ts */
25
27
  microAppTranspilePackagesOutputPath: string;
28
+ /** Generated deploy profile module path */
29
+ deployProfileOutputPath: string;
30
+ /** Generated deploy profile module path for workspace packages */
31
+ sharedDeployProfileOutputPath: string;
26
32
  /** Generated payload-plugins.ts path */
27
33
  payloadPluginsOutputPath: string;
28
34
  /** Scoped Payload config directory */
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,4CAA4C;IAC5C,2BAA2B,EAAE,MAAM,CAAC;IACpC,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,mCAAmC,EAAE,MAAM,CAAC;IAC5C,wCAAwC;IACxC,wBAAwB,EAAE,MAAM,CAAC;IACjC,sCAAsC;IACtC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,4BAA4B;IAC5B,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAgBD,wBAAgB,qBAAqB,CAAC,GAAG,SAAgB,GAAG,cAAc,CAsBzE;AAED,qEAAqE;AACrE,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,WAAW,GAAG,gBAAgB,EACpC,IAAI,EAAE,MAAM,GACX,MAAM,CAKR;AAED,oEAAoE;AACpE,wBAAgB,cAAc,CAC5B,IAAI,EAAE,WAAW,GAAG,gBAAgB,EACpC,IAAI,EAAE,MAAM,GACX,MAAM,CAIR;AAED,uFAAuF;AACvF,w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,wBAAgB,qBAAqB,CAAC,GAAG,SAAgB,GAAG,cAAc,CAyBzE;AAED,qEAAqE;AACrE,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,WAAW,GAAG,gBAAgB,EACpC,IAAI,EAAE,MAAM,GACX,MAAM,CAKR;AAED,oEAAoE;AACpE,wBAAgB,cAAc,CAC5B,IAAI,EAAE,WAAW,GAAG,gBAAgB,EACpC,IAAI,EAAE,MAAM,GACX,MAAM,CAIR;AAED,uFAAuF;AACvF,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,EAAE,CAM/D;AAED,0FAA0F;AAC1F,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,EAAE,CAO5D;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,MAAM,GACX,MAAM,CAER;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,MAAM,EACZ,aAAa,CAAC,EAAE,WAAW,GAAG,gBAAgB,GAC7C,MAAM,EAAE,CAcV"}
package/dist/paths.js CHANGED
@@ -30,9 +30,12 @@ export function resolveWorkspacePaths(cwd = process.cwd()) {
30
30
  extensionsPayloadPluginsDir: path.join(root, 'extensions', 'payload-plugins'),
31
31
  mainAppDir,
32
32
  configPath: path.join(mainAppDir, 'dd-apps.config.json'),
33
+ deployProfilesPath: path.join(root, 'dd-deploy.profiles.json'),
33
34
  lockFilePath: path.join(root, 'dd-apps.lock.json'),
34
35
  microAppsOutputPath: path.join(mainAppDir, 'src', 'lib', 'micro-apps.ts'),
35
36
  microAppTranspilePackagesOutputPath: path.join(mainAppDir, 'src', 'lib', 'micro-app-transpile-packages.ts'),
37
+ deployProfileOutputPath: path.join(mainAppDir, 'src', 'lib', 'deploy-profile.generated.ts'),
38
+ sharedDeployProfileOutputPath: path.join(root, 'packages', 'shared', 'src', 'deploy-profile.generated.ts'),
36
39
  payloadPluginsOutputPath: path.join(mainAppDir, 'src', 'lib', 'payload-plugins.ts'),
37
40
  payloadConfigsDir: path.join(mainAppDir, 'payload-configs'),
38
41
  mainAppPackageJsonPath: path.join(mainAppDir, 'package.json'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doubledigit/cli",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "private": false,
5
5
  "description": "CLI for Double Digit local setup and extension management.",
6
6
  "license": "MIT",
@@ -50,7 +50,8 @@
50
50
  },
51
51
  "scripts": {
52
52
  "test": "tsx --test test/*.test.ts",
53
- "build": "pnpm generate:defaults && tsc -p tsconfig.json",
53
+ "build": "pnpm clean && pnpm generate:defaults && tsc -p tsconfig.json",
54
+ "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
54
55
  "generate:defaults": "node scripts/generate-defaults.mjs",
55
56
  "typecheck": "pnpm generate:defaults && tsc -p tsconfig.json --noEmit"
56
57
  }
@@ -1,4 +0,0 @@
1
- import { type RunRemotionHubAddResult } from '../lib/remotion-hub-init.js';
2
- export declare function buildRemotionHubAddHelp(): string;
3
- export declare function runRemotionHubAddCommand(args: string[]): Promise<RunRemotionHubAddResult | undefined>;
4
- //# sourceMappingURL=remotion-hub-add.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remotion-hub-add.d.ts","sourceRoot":"","sources":["../../src/commands/remotion-hub-add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AA+E9F,wBAAgB,uBAAuB,WAwBtC;AAkBD,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC,CA4B9C"}
@@ -1,4 +0,0 @@
1
- import { type RunRemotionHubInitResult } from '../lib/remotion-hub-init.js';
2
- export declare function buildRemotionHubInitHelp(): string;
3
- export declare function runRemotionHubInitCommand(args: string[]): RunRemotionHubInitResult | undefined;
4
- //# sourceMappingURL=remotion-hub-init.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remotion-hub-init.d.ts","sourceRoot":"","sources":["../../src/commands/remotion-hub-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAuFhG,wBAAgB,wBAAwB,WAgCvC;AAkCD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,wBAAwB,GAAG,SAAS,CA8B9F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"remotion-hub-init.d.ts","sourceRoot":"","sources":["../../src/lib/remotion-hub-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,oBAAoB,CAAC;AAYtE,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAOnC,KAAK,yBAAyB,GAAG;IAC/B,OAAO,EAAE,KAAK,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,+BAA+B,GAAG,yBAAyB,GAAG;IACjE,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE;QAChD,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EA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