veryfront 0.1.1178 → 0.1.1179
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/esm/cli/app/operations/project-creation.d.ts.map +1 -1
- package/esm/cli/app/operations/project-creation.js +43 -11
- package/esm/cli/app/utils.d.ts +0 -1
- package/esm/cli/app/utils.d.ts.map +1 -1
- package/esm/cli/app/utils.js +0 -3
- package/esm/cli/commands/demo/demo.d.ts +0 -4
- package/esm/cli/commands/demo/demo.d.ts.map +1 -1
- package/esm/cli/commands/demo/demo.js +32 -26
- package/esm/cli/commands/deploy/command.d.ts +5 -177
- package/esm/cli/commands/deploy/command.d.ts.map +1 -1
- package/esm/cli/commands/deploy/command.js +87 -1002
- package/esm/cli/commands/deploy/index.d.ts +2 -2
- package/esm/cli/commands/deploy/index.d.ts.map +1 -1
- package/esm/cli/commands/deploy/index.js +1 -1
- package/esm/cli/commands/init/init-command.d.ts.map +1 -1
- package/esm/cli/commands/init/init-command.js +56 -306
- package/esm/cli/commands/init/interactive-wizard.d.ts +2 -2
- package/esm/cli/commands/init/interactive-wizard.d.ts.map +1 -1
- package/esm/cli/commands/init/interactive-wizard.js +2 -8
- package/esm/cli/commands/push/command.d.ts.map +1 -1
- package/esm/cli/commands/push/command.js +55 -107
- package/esm/cli/commands/up/command.d.ts +6 -1
- package/esm/cli/commands/up/command.d.ts.map +1 -1
- package/esm/cli/commands/up/command.js +92 -78
- package/esm/cli/mcp/tools/catalog-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/catalog-tools.js +17 -7
- package/esm/cli/mcp/tools/deploy-tool.d.ts +15 -24
- package/esm/cli/mcp/tools/deploy-tool.d.ts.map +1 -1
- package/esm/cli/mcp/tools/deploy-tool.js +21 -69
- package/esm/cli/shared/deployment/control-plane.d.ts +64 -0
- package/esm/cli/shared/deployment/control-plane.d.ts.map +1 -0
- package/esm/cli/shared/deployment/control-plane.js +149 -0
- package/esm/cli/shared/deployment/deploy-project.d.ts +145 -0
- package/esm/cli/shared/deployment/deploy-project.d.ts.map +1 -0
- package/esm/cli/shared/deployment/deploy-project.js +706 -0
- package/esm/cli/shared/deployment/progress.d.ts +17 -0
- package/esm/cli/shared/deployment/progress.d.ts.map +1 -0
- package/esm/cli/shared/deployment/progress.js +52 -0
- package/esm/cli/shared/deployment/result.d.ts +21 -0
- package/esm/cli/shared/deployment/result.d.ts.map +1 -0
- package/esm/cli/shared/deployment/result.js +1 -0
- package/esm/cli/shared/project-creation.d.ts +43 -0
- package/esm/cli/shared/project-creation.d.ts.map +1 -0
- package/esm/cli/shared/project-creation.js +343 -0
- package/esm/cli/shared/project-name.d.ts +3 -0
- package/esm/cli/shared/project-name.d.ts.map +1 -0
- package/esm/cli/shared/project-name.js +10 -0
- package/esm/cli/shared/project-resolution.d.ts +102 -0
- package/esm/cli/shared/project-resolution.d.ts.map +1 -0
- package/esm/cli/shared/project-resolution.js +167 -0
- package/esm/cli/templates/integration-loader.d.ts +0 -5
- package/esm/cli/templates/integration-loader.d.ts.map +1 -1
- package/esm/cli/templates/integration-loader.js +0 -413
- package/esm/cli/utils/git.d.ts.map +1 -1
- package/esm/cli/utils/git.js +10 -1
- package/esm/deno.d.ts +1 -0
- package/esm/deno.js +6 -5
- package/esm/src/agent/conversation/root-run-lifecycle.d.ts +4 -0
- package/esm/src/agent/conversation/root-run-lifecycle.d.ts.map +1 -1
- package/esm/src/agent/conversation/root-run-lifecycle.js +3 -1
- package/esm/src/agent/factory.d.ts.map +1 -1
- package/esm/src/agent/factory.js +40 -7
- package/esm/src/agent/hosted/chat-preparation.d.ts +13 -0
- package/esm/src/agent/hosted/chat-preparation.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-preparation.js +71 -21
- package/esm/src/agent/hosted/chat-request-parser.d.ts +11 -0
- package/esm/src/agent/hosted/chat-request-parser.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-request-parser.js +39 -2
- package/esm/src/agent/hosted/chat-runtime-contract.d.ts +7 -0
- package/esm/src/agent/hosted/chat-runtime-contract.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts +10 -0
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.js +30 -5
- package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-agent-chat-execution.js +4 -0
- package/esm/src/agent/hosted/cloud-agent-provider-bootstrap.d.ts +2 -0
- package/esm/src/agent/hosted/cloud-agent-provider-bootstrap.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-chat-execution-preparation.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-chat-execution-preparation.js +9 -2
- package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts +1 -6
- package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-runtime-system-messages.js +19 -39
- package/esm/src/agent/hosted/default-chat-runtime.d.ts +3 -1
- package/esm/src/agent/hosted/default-chat-runtime.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-chat-runtime.js +18 -0
- package/esm/src/agent/hosted/default-project-steering-refresh.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-project-steering-refresh.js +12 -3
- package/esm/src/agent/hosted/runtime-request-config.d.ts +3 -0
- package/esm/src/agent/hosted/runtime-request-config.d.ts.map +1 -1
- package/esm/src/agent/hosted/runtime-request-config.js +17 -0
- package/esm/src/agent/hosted/veryfront-cloud-agent-service.d.ts +3 -0
- package/esm/src/agent/hosted/veryfront-cloud-agent-service.d.ts.map +1 -1
- package/esm/src/agent/index.d.ts +2 -1
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/index.js +1 -0
- package/esm/src/agent/runtime/agent-definition.d.ts +8 -3
- package/esm/src/agent/runtime/agent-definition.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-definition.js +21 -50
- package/esm/src/agent/runtime/agent-runtime-step.d.ts +5 -0
- package/esm/src/agent/runtime/agent-runtime-step.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-runtime-step.js +24 -3
- package/esm/src/agent/runtime/call-context.d.ts +67 -0
- package/esm/src/agent/runtime/call-context.d.ts.map +1 -0
- package/esm/src/agent/runtime/call-context.js +146 -0
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +255 -31
- package/esm/src/agent/runtime/runtime-tool-config.d.ts +21 -0
- package/esm/src/agent/runtime/runtime-tool-config.d.ts.map +1 -1
- package/esm/src/agent/runtime/runtime-tool-config.js +41 -0
- package/esm/src/agent/runtime/skill-prompt.d.ts +2 -1
- package/esm/src/agent/runtime/skill-prompt.d.ts.map +1 -1
- package/esm/src/agent/runtime/skill-prompt.js +40 -4
- package/esm/src/agent/runtime/tool-exposure.d.ts +67 -0
- package/esm/src/agent/runtime/tool-exposure.d.ts.map +1 -0
- package/esm/src/agent/runtime/tool-exposure.js +191 -0
- package/esm/src/agent/runtime/tool-inventory.d.ts +2 -0
- package/esm/src/agent/runtime/tool-inventory.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-inventory.js +33 -4
- package/esm/src/agent/service/auth.d.ts +8 -0
- package/esm/src/agent/service/auth.d.ts.map +1 -1
- package/esm/src/agent/service/auth.js +50 -0
- package/esm/src/agent/service/config.d.ts +1 -0
- package/esm/src/agent/service/config.d.ts.map +1 -1
- package/esm/src/agent/service/config.js +2 -0
- package/esm/src/agent/service/routes.d.ts +5 -0
- package/esm/src/agent/service/routes.d.ts.map +1 -1
- package/esm/src/agent/service/routes.js +2 -0
- package/esm/src/agent/service/runtime.d.ts.map +1 -1
- package/esm/src/agent/service/runtime.js +1 -0
- package/esm/src/agent/types.d.ts +22 -0
- package/esm/src/agent/types.d.ts.map +1 -1
- package/esm/src/eval/agent-service/durable-run-canaries/cli-runner.d.ts.map +1 -1
- package/esm/src/eval/agent-service/durable-run-canaries/cli-runner.js +4 -1
- package/esm/src/eval/agent-service/durable-run-canaries/environment.d.ts +1 -0
- package/esm/src/eval/agent-service/durable-run-canaries/environment.d.ts.map +1 -1
- package/esm/src/eval/agent-service/durable-run-canaries/environment.js +1 -0
- package/esm/src/eval/agent-service/durable-run-canaries/index.d.ts +1 -1
- package/esm/src/eval/agent-service/durable-run-canaries/index.d.ts.map +1 -1
- package/esm/src/eval/agent-service/durable-run-canaries/runner.d.ts +8 -0
- package/esm/src/eval/agent-service/durable-run-canaries/runner.d.ts.map +1 -1
- package/esm/src/eval/agent-service/durable-run-canaries/runner.js +25 -4
- package/esm/src/html/hydration-script-builder/dev-client-renderer.d.ts +14 -0
- package/esm/src/html/hydration-script-builder/dev-client-renderer.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/dev-client-renderer.js +17 -12
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.d.ts +10 -0
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.d.ts.map +1 -0
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +9 -0
- package/esm/src/html/hydration-script-builder/prod-scripts.d.ts +6 -0
- package/esm/src/html/hydration-script-builder/prod-scripts.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/prod-scripts.js +8 -12
- package/esm/src/html/utils.d.ts.map +1 -1
- package/esm/src/html/utils.js +2 -1
- package/esm/src/internal-agents/run-system-prompt.d.ts.map +1 -1
- package/esm/src/internal-agents/run-system-prompt.js +14 -22
- package/esm/src/modules/import-map/default-import-map.js +1 -1
- package/esm/src/modules/import-map/loader.js +1 -1
- package/esm/src/modules/react-loader/unified-loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/unified-loader.js +2 -1
- package/esm/src/platform/adapters/fs/github/stat-operations.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/github/stat-operations.js +4 -5
- package/esm/src/platform/adapters/fs/veryfront/stat-operations.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/stat-operations.js +5 -5
- package/esm/src/platform/adapters/runtime/node/filesystem-adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/node/filesystem-adapter.js +4 -1
- package/esm/src/react/compat/config-generator.js +1 -1
- package/esm/src/react/compat/ssr-adapter/server-loader.js +2 -1
- package/esm/src/release-assets/build-executor.d.ts.map +1 -1
- package/esm/src/release-assets/build-executor.js +2 -1
- package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/ssr-orchestrator.js +2 -20
- package/esm/src/rendering/ssr-outcome.d.ts +66 -0
- package/esm/src/rendering/ssr-outcome.d.ts.map +1 -0
- package/esm/src/rendering/ssr-outcome.js +139 -0
- package/esm/src/server/dev-server/route-discovery.d.ts.map +1 -1
- package/esm/src/server/dev-server/route-discovery.js +6 -12
- package/esm/src/server/handlers/request/module/data-endpoint-handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/module/data-endpoint-handler.js +10 -38
- package/esm/src/server/handlers/request/module/page-data-endpoint-handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/module/page-data-endpoint-handler.js +20 -72
- package/esm/src/server/handlers/request/module/page-module-handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/module/page-module-handler.js +6 -24
- package/esm/src/server/handlers/request/ssr/ssr.handler.d.ts +11 -0
- package/esm/src/server/handlers/request/ssr/ssr.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/ssr/ssr.handler.js +41 -77
- package/esm/src/server/handlers/utils/dependency-snapshot-protocol.d.ts +98 -0
- package/esm/src/server/handlers/utils/dependency-snapshot-protocol.d.ts.map +1 -0
- package/esm/src/server/handlers/utils/dependency-snapshot-protocol.js +113 -0
- package/esm/src/server/services/rendering/ssr.service.d.ts +9 -4
- package/esm/src/server/services/rendering/ssr.service.d.ts.map +1 -1
- package/esm/src/server/services/rendering/ssr.service.js +105 -166
- package/esm/src/skill/index.d.ts +0 -1
- package/esm/src/skill/index.d.ts.map +1 -1
- package/esm/src/skill/index.js +0 -2
- package/esm/src/transforms/esm/http-bundler.d.ts +1 -1
- package/esm/src/transforms/esm/http-bundler.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-bundler.js +1 -1
- package/esm/src/transforms/esm/http-cache-helpers.js +1 -1
- package/esm/src/transforms/esm/import-rewriter.js +1 -1
- package/esm/src/transforms/esm/package-registry.d.ts +3 -18
- package/esm/src/transforms/esm/package-registry.d.ts.map +1 -1
- package/esm/src/transforms/esm/package-registry.js +4 -33
- package/esm/src/transforms/esm/react-cdn.d.ts +18 -0
- package/esm/src/transforms/esm/react-cdn.d.ts.map +1 -0
- package/esm/src/transforms/esm/react-cdn.js +31 -0
- package/esm/src/transforms/esm/react-imports.js +1 -1
- package/esm/src/transforms/import-rewriter/ssr-adapter.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/ssr-adapter.js +1 -1
- package/esm/src/transforms/pipeline/context.js +1 -1
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +5 -5
- package/esm/cli/commands/init/index.d.ts +0 -8
- package/esm/cli/commands/init/index.d.ts.map +0 -1
- package/esm/cli/commands/init/index.js +0 -6
- package/esm/src/html/hydration-script-builder/templates/index.d.ts +0 -11
- package/esm/src/html/hydration-script-builder/templates/index.d.ts.map +0 -1
- package/esm/src/html/hydration-script-builder/templates/index.js +0 -10
- package/esm/src/html/hydration-script-builder/templates/loader.d.ts +0 -2
- package/esm/src/html/hydration-script-builder/templates/loader.d.ts.map +0 -1
- package/esm/src/html/hydration-script-builder/templates/loader.js +0 -238
- package/esm/src/html/hydration-script-builder/templates/navigation-store.d.ts +0 -11
- package/esm/src/html/hydration-script-builder/templates/navigation-store.d.ts.map +0 -1
- package/esm/src/html/hydration-script-builder/templates/navigation-store.js +0 -53
- package/esm/src/html/hydration-script-builder/templates/renderer.d.ts +0 -2
- package/esm/src/html/hydration-script-builder/templates/renderer.d.ts.map +0 -1
- package/esm/src/html/hydration-script-builder/templates/renderer.js +0 -337
- package/esm/src/html/hydration-script-builder/templates/router.d.ts +0 -2
- package/esm/src/html/hydration-script-builder/templates/router.d.ts.map +0 -1
- package/esm/src/html/hydration-script-builder/templates/router.js +0 -1465
- package/esm/src/html/hydration-script-builder/templates/spa-renderer.d.ts +0 -3
- package/esm/src/html/hydration-script-builder/templates/spa-renderer.d.ts.map +0 -1
- package/esm/src/html/hydration-script-builder/templates/spa-renderer.js +0 -108
- package/esm/src/skill/prompt-augmentation.d.ts +0 -21
- package/esm/src/skill/prompt-augmentation.d.ts.map +0 -1
- package/esm/src/skill/prompt-augmentation.js +0 -48
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-creation.d.ts","sourceRoot":"","sources":["../../../../src/cli/app/operations/project-creation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"project-creation.d.ts","sourceRoot":"","sources":["../../../../src/cli/app/operations/project-creation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAY5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,QAAQ,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,sBAAsB,EAC3B,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,QAAQ,CAAC,CAoEnB"}
|
|
@@ -5,12 +5,18 @@
|
|
|
5
5
|
* including remote project registration and local scaffolding.
|
|
6
6
|
*/
|
|
7
7
|
import { cwd } from "../../../src/platform/index.js";
|
|
8
|
+
import { join } from "../../../src/platform/compat/path/index.js";
|
|
8
9
|
import { addLog, setProjects, updateRemote } from "../state.js";
|
|
9
10
|
import { readToken } from "../../auth/token-store.js";
|
|
10
11
|
import { fetchRemoteProjects } from "../../sync/index.js";
|
|
11
|
-
import { getLocalProjectsFromState
|
|
12
|
+
import { getLocalProjectsFromState } from "../utils.js";
|
|
12
13
|
import { reserveProjectSlug } from "../../shared/reserve-slug.js";
|
|
13
|
-
import {
|
|
14
|
+
import { normalizeProjectSlug } from "../../shared/slug.js";
|
|
15
|
+
import { resolveOrCreateProject } from "../../shared/project-resolution.js";
|
|
16
|
+
import { createApiClient } from "../../shared/config.js";
|
|
17
|
+
import { getProjectTarget } from "../../shared/deployment-provenance.js";
|
|
18
|
+
import { resolveCliApiUrl } from "../../shared/constants.js";
|
|
19
|
+
import { createProject as createSharedProject } from "../../shared/project-creation.js";
|
|
14
20
|
/**
|
|
15
21
|
* Create a new project from a template
|
|
16
22
|
*/
|
|
@@ -23,18 +29,44 @@ export async function createProject(ctx, projectName, template) {
|
|
|
23
29
|
if (!token) {
|
|
24
30
|
return addLog("error", "Not authenticated. Press 'a' to login.")(state);
|
|
25
31
|
}
|
|
26
|
-
const normalizedSlug =
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
await
|
|
30
|
-
name:
|
|
32
|
+
const normalizedSlug = normalizeProjectSlug(projectName);
|
|
33
|
+
const reserved = await reserveProjectSlug(normalizedSlug, token);
|
|
34
|
+
const slug = reserved.slug;
|
|
35
|
+
const creation = await createSharedProject({
|
|
36
|
+
name: slug,
|
|
37
|
+
parentDir: join(cwd(), "projects"),
|
|
31
38
|
template,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
runtime: "node",
|
|
40
|
+
features: [],
|
|
41
|
+
integrations: [],
|
|
42
|
+
environmentValues: {},
|
|
43
|
+
conflictPolicy: "fail",
|
|
44
|
+
installDependencies: false,
|
|
45
|
+
initializeGit: false,
|
|
46
|
+
includePackageMetadata: false,
|
|
47
|
+
});
|
|
48
|
+
// A project the TUI just reserved is this directory's project, so it
|
|
49
|
+
// resolves through the same owner as every other create: reservation
|
|
50
|
+
// responses that omit the id still settle on the canonical one, and the
|
|
51
|
+
// link is always written.
|
|
52
|
+
const config = {
|
|
53
|
+
apiUrl: resolveCliApiUrl(),
|
|
54
|
+
apiToken: token,
|
|
55
|
+
projectSlug: slug,
|
|
56
|
+
};
|
|
57
|
+
await resolveOrCreateProject({
|
|
58
|
+
projectDir: creation.projectDir,
|
|
59
|
+
config,
|
|
60
|
+
source: { kind: "inferred", name: "project files" },
|
|
61
|
+
client: {
|
|
62
|
+
getProject: (reference) => getProjectTarget(createApiClient(config), reference),
|
|
63
|
+
// The slug is reserved before scaffolding so the directory can take
|
|
64
|
+
// its name; hand that reservation over rather than taking a second.
|
|
65
|
+
reserveSlug: () => Promise.resolve(reserved),
|
|
66
|
+
},
|
|
35
67
|
});
|
|
36
68
|
const currentProjects = getLocalProjectsFromState(state);
|
|
37
|
-
currentProjects.push({ slug, path:
|
|
69
|
+
currentProjects.push({ slug, path: creation.projectDir });
|
|
38
70
|
state = setProjects(currentProjects)(state);
|
|
39
71
|
const result = await fetchRemoteProjects();
|
|
40
72
|
state = updateRemote({
|
package/esm/cli/app/utils.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { type AppState, type StateUpdater } from "./state.js";
|
|
7
7
|
export declare function generateRandomSlug(): string;
|
|
8
|
-
export declare function normalizeSlug(projectName: string): string;
|
|
9
8
|
export declare function getLocalProjectsFromState(appState: AppState): Array<{
|
|
10
9
|
slug: string;
|
|
11
10
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/cli/app/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAU,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAGtE,wBAAgB,kBAAkB,IAAI,MAAM,CAI3C;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/cli/app/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAU,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAGtE,wBAAgB,kBAAkB,IAAI,MAAM,CAI3C;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,QAAQ,GACjB,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAQvC;AAED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,EACvC,MAAM,EAAE,MAAM,IAAI,EAClB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAyBf"}
|
package/esm/cli/app/utils.js
CHANGED
|
@@ -14,9 +14,6 @@ export function generateRandomSlug() {
|
|
|
14
14
|
const noun = NOUNS[Math.floor(Math.random() * NOUNS.length)];
|
|
15
15
|
return `${adj}-${noun}`;
|
|
16
16
|
}
|
|
17
|
-
export function normalizeSlug(projectName) {
|
|
18
|
-
return projectName.replace(/[^a-z0-9-]/gi, "-").toLowerCase();
|
|
19
|
-
}
|
|
20
17
|
export function getLocalProjectsFromState(appState) {
|
|
21
18
|
const result = [];
|
|
22
19
|
for (const item of appState.projects.items) {
|
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module cli/commands/demo
|
|
5
5
|
*/
|
|
6
|
-
import { type ApiClient } from "../../shared/config.js";
|
|
7
|
-
import { type ProjectTarget } from "../../shared/deployment-provenance.js";
|
|
8
|
-
import { type ReserveResult } from "../../shared/reserve-slug.js";
|
|
9
6
|
type AuthMethod = "google" | "github" | "microsoft" | "token";
|
|
10
|
-
export declare function resolveDemoReservedProject(reserveResult: ReserveResult, token: string, client?: ApiClient): Promise<ProjectTarget>;
|
|
11
7
|
export interface DemoOptions {
|
|
12
8
|
/** Project name for the demo (default: demo-{random}) */
|
|
13
9
|
projectName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/demo/demo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/demo/demo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA2DH,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAsa9D,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AA+DD,wBAAsB,WAAW,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmH1E"}
|
|
@@ -5,20 +5,19 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { chdir, cwd, promptSync, writeStdout } from "../../../src/platform/index.js";
|
|
7
7
|
import { getStdinReader, setRawMode } from "../../../src/platform/index.js";
|
|
8
|
-
import { join } from "../../../src/platform/compat/path/index.js";
|
|
9
8
|
import { AnimatedDotMatrix, bold, brand, BRAND_TRUECOLOR, dim, error, formatDuration, HIDE_CURSOR, muted, SHOW_CURSOR, success, successBanner, typeCommand, typeLine, } from "../../ui/index.js";
|
|
10
9
|
import { exitProcess, isTTY, logError } from "../../utils/index.js";
|
|
11
10
|
import { createOAuthAuthorizationUrl, createOAuthState, readToken, saveToken, validateToken, } from "../../auth/index.js";
|
|
12
11
|
import { canOpenBrowser, openBrowser } from "../../auth/browser.js";
|
|
13
12
|
import { getCallbackUrl, startCallbackServer } from "../../auth/callback-server.js";
|
|
14
13
|
import { DEFAULT_CALLBACK_PORT, DEFAULT_LOGIN_TIMEOUT_MS, resolveCliApiUrl, } from "../../shared/constants.js";
|
|
15
|
-
import {
|
|
16
|
-
import { writeProjectLink } from "../../shared/project-link.js";
|
|
14
|
+
import { createProject as createSharedProject } from "../../shared/project-creation.js";
|
|
17
15
|
import { randomSuffix } from "../../shared/slug.js";
|
|
18
16
|
import { deployCommand } from "../deploy/index.js";
|
|
19
17
|
import { pushCommand } from "../push/index.js";
|
|
20
18
|
import { devCommand } from "../dev/index.js";
|
|
21
19
|
import { createApiClient } from "../../shared/config.js";
|
|
20
|
+
import { resolveOrCreateProject } from "../../shared/project-resolution.js";
|
|
22
21
|
import { getProjectTarget } from "../../shared/deployment-provenance.js";
|
|
23
22
|
import { reserveProjectSlug } from "../../shared/reserve-slug.js";
|
|
24
23
|
import { DEMO_STEPS } from "./steps.js";
|
|
@@ -38,16 +37,6 @@ const AUTH_OPTIONS = [
|
|
|
38
37
|
{ id: "microsoft", label: "Microsoft" },
|
|
39
38
|
{ id: "token", label: "API Token" },
|
|
40
39
|
];
|
|
41
|
-
export async function resolveDemoReservedProject(reserveResult, token, client = createApiClient({
|
|
42
|
-
apiUrl: resolveCliApiUrl(),
|
|
43
|
-
apiToken: token,
|
|
44
|
-
projectSlug: reserveResult.slug,
|
|
45
|
-
})) {
|
|
46
|
-
if (reserveResult.projectId) {
|
|
47
|
-
return { id: reserveResult.projectId, slug: reserveResult.slug };
|
|
48
|
-
}
|
|
49
|
-
return getProjectTarget(client, reserveResult.slug);
|
|
50
|
-
}
|
|
51
40
|
function clearCountdownLine() {
|
|
52
41
|
write(`\r ${" ".repeat(30)}\r`);
|
|
53
42
|
}
|
|
@@ -276,15 +265,20 @@ async function executeStepAction(step, projectName, loginMethod) {
|
|
|
276
265
|
return;
|
|
277
266
|
}
|
|
278
267
|
case "create": {
|
|
279
|
-
await
|
|
268
|
+
const creation = await createSharedProject({
|
|
280
269
|
name: projectName,
|
|
270
|
+
parentDir: cwd(),
|
|
281
271
|
template: "ai-agent",
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
272
|
+
runtime: "node",
|
|
273
|
+
features: [],
|
|
274
|
+
integrations: [],
|
|
275
|
+
environmentValues: {},
|
|
276
|
+
conflictPolicy: "overwrite",
|
|
277
|
+
installDependencies: false,
|
|
278
|
+
initializeGit: false,
|
|
279
|
+
includePackageMetadata: false,
|
|
286
280
|
});
|
|
287
|
-
const projectDir =
|
|
281
|
+
const projectDir = creation.projectDir;
|
|
288
282
|
const slug = `${projectName}-${randomSuffix()}`;
|
|
289
283
|
actualProjectSlug = slug;
|
|
290
284
|
const token = await readToken();
|
|
@@ -293,14 +287,26 @@ async function executeStepAction(step, projectName, loginMethod) {
|
|
|
293
287
|
console.log();
|
|
294
288
|
console.log(` ${dim("Registering project...")}`);
|
|
295
289
|
try {
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
290
|
+
const demoConfig = {
|
|
291
|
+
apiUrl: resolveCliApiUrl(),
|
|
292
|
+
apiToken: token,
|
|
293
|
+
projectSlug: slug,
|
|
294
|
+
};
|
|
295
|
+
const outcome = await resolveOrCreateProject({
|
|
296
|
+
projectDir,
|
|
297
|
+
config: demoConfig,
|
|
298
|
+
source: { kind: "inferred", name: "project files" },
|
|
299
|
+
client: {
|
|
300
|
+
getProject: (reference) => getProjectTarget(createApiClient(demoConfig), reference),
|
|
301
|
+
reserveSlug: async (reserveSlug, options) => {
|
|
302
|
+
const reserved = await reserveProjectSlug(reserveSlug, token, undefined, undefined, options);
|
|
303
|
+
return { slug: reserved.slug, projectId: reserved.projectId };
|
|
304
|
+
},
|
|
305
|
+
},
|
|
302
306
|
});
|
|
303
|
-
actualProjectSlug =
|
|
307
|
+
actualProjectSlug = outcome.kind === "planned-create"
|
|
308
|
+
? outcome.plannedSlug
|
|
309
|
+
: outcome.project.slug;
|
|
304
310
|
console.log(" ✓ Project registered");
|
|
305
311
|
console.log(` ${dim("Pushing code...")}`);
|
|
306
312
|
chdir(projectDir);
|
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
* @module cli/commands/deploy
|
|
8
8
|
*/
|
|
9
9
|
import type { InferSchema } from "../../../src/extensions/schema/index.js";
|
|
10
|
-
import { type
|
|
11
|
-
import {
|
|
12
|
-
import { type ReleaseAssetManifestResponse } from "../../../src/release-assets/index.js";
|
|
10
|
+
import { type DeployProject } from "../../shared/deployment/deploy-project.js";
|
|
11
|
+
import type { DeployResult } from "../../shared/deployment/result.js";
|
|
13
12
|
/**
|
|
14
13
|
* Schema factory for deploy command arguments
|
|
15
14
|
*/
|
|
@@ -45,12 +44,8 @@ export declare const DeployArgsSchema: import("../../../src/internal-agents/sche
|
|
|
45
44
|
type ParsedDeployOptions = InferSchema<ReturnType<typeof getDeployArgsSchema>>;
|
|
46
45
|
export type DeployOptions = Omit<ParsedDeployOptions, "skipSourcePush"> & {
|
|
47
46
|
skipSourcePush?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
|
|
50
|
-
assetManifestPollIntervalMs?: number;
|
|
51
|
-
assetManifestTimeoutMs?: number;
|
|
52
|
-
environmentPollIntervalMs?: number;
|
|
53
|
-
environmentTimeoutMs?: number;
|
|
47
|
+
/** Deploy Execution override for tests; production uses createDeployProject(). */
|
|
48
|
+
deployProject?: DeployProject;
|
|
54
49
|
};
|
|
55
50
|
/**
|
|
56
51
|
* Parse CLI arguments into validated DeployOptions
|
|
@@ -71,176 +66,9 @@ export declare const parseDeployArgs: (args: import("../../shared/types.js").Par
|
|
|
71
66
|
/**
|
|
72
67
|
* Environment from the API
|
|
73
68
|
*/
|
|
74
|
-
|
|
75
|
-
id: string;
|
|
76
|
-
release: {
|
|
77
|
-
id: string;
|
|
78
|
-
name: string | null;
|
|
79
|
-
} | null;
|
|
80
|
-
}
|
|
81
|
-
interface Environment {
|
|
82
|
-
id: string;
|
|
83
|
-
name: string;
|
|
84
|
-
protected: boolean;
|
|
85
|
-
project_id?: string;
|
|
86
|
-
project?: string | {
|
|
87
|
-
id: string;
|
|
88
|
-
};
|
|
89
|
-
projectId?: string;
|
|
90
|
-
deployment?: EnvironmentDeployment | null;
|
|
91
|
-
domains?: string[];
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Release from the API
|
|
95
|
-
*/
|
|
96
|
-
interface Release {
|
|
97
|
-
id: string;
|
|
98
|
-
name: string;
|
|
99
|
-
version: string | null;
|
|
100
|
-
project_id?: string;
|
|
101
|
-
project?: string | {
|
|
102
|
-
id: string;
|
|
103
|
-
};
|
|
104
|
-
projectId?: string;
|
|
105
|
-
export_status: string;
|
|
106
|
-
build_status: string;
|
|
107
|
-
deploy_status: string;
|
|
108
|
-
}
|
|
109
|
-
export type DeploymentRoutingConvergence = {
|
|
110
|
-
status: "converged";
|
|
111
|
-
acknowledged: number;
|
|
112
|
-
recipients: number;
|
|
113
|
-
} | {
|
|
114
|
-
status: "pending";
|
|
115
|
-
} | {
|
|
116
|
-
status: "skipped";
|
|
117
|
-
};
|
|
118
|
-
export interface Deployment {
|
|
119
|
-
id: string;
|
|
120
|
-
release_id: string;
|
|
121
|
-
environment_id: string;
|
|
122
|
-
routing_convergence?: DeploymentRoutingConvergence;
|
|
123
|
-
}
|
|
124
|
-
export interface DeploymentVerification {
|
|
125
|
-
projectId: string;
|
|
126
|
-
projectSlug: string;
|
|
127
|
-
environmentId: string;
|
|
128
|
-
environmentName: string;
|
|
129
|
-
releaseId: string;
|
|
130
|
-
releaseVersion: string;
|
|
131
|
-
deploymentId: string;
|
|
132
|
-
commitSha: string | null;
|
|
133
|
-
sourceDigest: string;
|
|
134
|
-
}
|
|
135
|
-
export interface DeployResult {
|
|
136
|
-
projectId: string;
|
|
137
|
-
projectSlug: string;
|
|
138
|
-
release: {
|
|
139
|
-
id: string;
|
|
140
|
-
name: string;
|
|
141
|
-
version: string;
|
|
142
|
-
};
|
|
143
|
-
environment: string;
|
|
144
|
-
environmentId: string;
|
|
145
|
-
deploymentId: string;
|
|
146
|
-
url: string;
|
|
147
|
-
protected: boolean;
|
|
148
|
-
routingConvergence: DeploymentRoutingConvergence | null;
|
|
149
|
-
commitSha: string | null;
|
|
150
|
-
sourceDigest: string;
|
|
151
|
-
controlPlane: string;
|
|
152
|
-
branch: string;
|
|
153
|
-
}
|
|
154
|
-
export interface ReleaseSourceVerification {
|
|
155
|
-
projectId: string;
|
|
156
|
-
releaseId: string;
|
|
157
|
-
releaseVersion: string;
|
|
158
|
-
commitSha: string | null;
|
|
159
|
-
sourceDigest: string;
|
|
160
|
-
}
|
|
161
|
-
export interface EnvironmentReadinessOptions {
|
|
162
|
-
pollIntervalMs?: number;
|
|
163
|
-
timeoutMs?: number;
|
|
164
|
-
}
|
|
165
|
-
export interface EnvironmentReadinessTarget {
|
|
166
|
-
projectSlug: string;
|
|
167
|
-
environmentName: string;
|
|
168
|
-
url: string;
|
|
169
|
-
route?: string | null;
|
|
170
|
-
protected: boolean;
|
|
171
|
-
apiToken: string;
|
|
172
|
-
}
|
|
173
|
-
interface ReleaseSourceExpectation {
|
|
174
|
-
projectId: string;
|
|
175
|
-
releaseId: string;
|
|
176
|
-
commitSha: string | null;
|
|
177
|
-
sourceDigest: string;
|
|
178
|
-
releaseName?: string;
|
|
179
|
-
}
|
|
180
|
-
interface DeploymentExpectation {
|
|
181
|
-
projectId: string;
|
|
182
|
-
projectSlug: string;
|
|
183
|
-
environmentId: string;
|
|
184
|
-
environmentName: string;
|
|
185
|
-
releaseId: string;
|
|
186
|
-
deploymentId: string;
|
|
187
|
-
commitSha: string | null;
|
|
188
|
-
sourceDigest: string;
|
|
189
|
-
releaseName?: string;
|
|
190
|
-
}
|
|
191
|
-
interface VerificationRetryOptions {
|
|
192
|
-
attempts?: number;
|
|
193
|
-
delayMs?: number;
|
|
194
|
-
}
|
|
195
|
-
interface DeploymentVerificationOptions extends VerificationRetryOptions {
|
|
196
|
-
releaseSource?: VerificationRetryOptions;
|
|
197
|
-
verifiedRelease?: ReleaseSourceVerification;
|
|
198
|
-
}
|
|
199
|
-
export declare function getDeploymentRoutingConvergenceWarning(deployment: Deployment): string | null;
|
|
200
|
-
export declare function assertProjectOwnership(resourceType: "Environment" | "Release", resource: {
|
|
201
|
-
id: string;
|
|
202
|
-
project_id?: string;
|
|
203
|
-
}, projectId: string): void;
|
|
204
|
-
/**
|
|
205
|
-
* Get environment by name (with pagination support)
|
|
206
|
-
*/
|
|
207
|
-
export declare function getEnvironmentByName(client: ApiClient, projectSlug: string, name: string): Promise<Environment | null>;
|
|
208
|
-
export declare function getProject(client: ApiClient, projectReference: string): Promise<ProjectTarget>;
|
|
209
|
-
export declare function getRelease(client: ApiClient, projectReference: string, releaseId: string): Promise<Release>;
|
|
210
|
-
export declare function getDeployment(client: ApiClient, projectReference: string, deploymentId: string): Promise<Deployment>;
|
|
211
|
-
export declare function getReleaseSourceDigest(client: ApiClient, projectReference: string, releaseId: string): Promise<string>;
|
|
212
|
-
/**
|
|
213
|
-
* Create a new release
|
|
214
|
-
*/
|
|
215
|
-
export declare function createRelease(client: ApiClient, projectSlug: string, options?: {
|
|
216
|
-
name?: string;
|
|
217
|
-
branch?: string;
|
|
218
|
-
}): Promise<Release>;
|
|
219
|
-
/**
|
|
220
|
-
* Create a new deployment
|
|
221
|
-
*/
|
|
222
|
-
export declare function createDeployment(client: ApiClient, projectSlug: string, releaseId: string, environmentId: string): Promise<Deployment>;
|
|
223
|
-
export declare function verifyReleaseSource(client: ApiClient, projectReference: string, expected: ReleaseSourceExpectation, options?: VerificationRetryOptions): Promise<ReleaseSourceVerification>;
|
|
224
|
-
export declare function verifyDeployment(client: ApiClient, projectReference: string, expected: DeploymentExpectation, options?: DeploymentVerificationOptions): Promise<DeploymentVerification>;
|
|
225
|
-
export declare function resolvePushedSource(input: {
|
|
226
|
-
projectDir: string;
|
|
227
|
-
controlPlane: string;
|
|
228
|
-
projectId: string;
|
|
229
|
-
projectSlug: string;
|
|
230
|
-
branch: string;
|
|
231
|
-
}): Promise<{
|
|
232
|
-
commitSha: string | null;
|
|
233
|
-
sourceDigest: string;
|
|
234
|
-
}>;
|
|
235
|
-
export declare function waitForEnvironmentReady(target: EnvironmentReadinessTarget, options?: EnvironmentReadinessOptions): Promise<void>;
|
|
236
|
-
export declare function waitForReleaseAssetManifest(client: ApiClient, projectSlug: string, releaseId: string, options?: {
|
|
237
|
-
expectedRoutes?: string[];
|
|
238
|
-
pollIntervalMs?: number;
|
|
239
|
-
timeoutMs?: number;
|
|
240
|
-
}): Promise<ReleaseAssetManifestResponse>;
|
|
69
|
+
export type { DeployResult };
|
|
241
70
|
/**
|
|
242
71
|
* Create a release and deploy to an environment
|
|
243
72
|
*/
|
|
244
73
|
export declare function deployCommand(options: DeployOptions): Promise<DeployResult | null>;
|
|
245
|
-
export {};
|
|
246
74
|
//# sourceMappingURL=command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAO3E,OAAO,EAGL,KAAK,aAAa,EAGnB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;IAO5B,uFAAuF;;IAEvF,oDAAoD;;IAEpD,mEAAmE;;GAGtE,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;IATzB,uFAAuF;;IAEvF,oDAAoD;;IAEpD,mEAAmE;;GAKR,CAAC;AAEhE;;GAEG;AACH,KAAK,mBAAmB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC;AAC/E,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,GAAG;IACxE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kFAAkF;IAClF,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;IAxBxB,uFAAuF;;IAEvF,oDAAoD;;IAEpD,mEAAmE;;GA4BrE,CAAC;AAEH;;GAEG;AACH,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAGxF"}
|