@topolo/cli 0.4.8 → 0.4.9
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/dist/index.js +12 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5819,6 +5819,15 @@ function normalizeWorkspaceSwitcherMode(value) {
|
|
|
5819
5819
|
if (mode === "required" || mode === "optional" || mode === "off") return mode;
|
|
5820
5820
|
throw new Error("Invalid workspace switcher mode. Use required, optional, or off.");
|
|
5821
5821
|
}
|
|
5822
|
+
function normalizeFirstPartyAppDir(value) {
|
|
5823
|
+
const requested = String(value).trim().replace(/\\/g, "/").replace(/^\.\//, "");
|
|
5824
|
+
const appDir = requested.startsWith("apps/") ? requested.slice("apps/".length) : requested;
|
|
5825
|
+
const segments = appDir.split("/");
|
|
5826
|
+
if (!appDir || appDir.startsWith("/") || appDir.startsWith("apps/") || segments.some((segment) => !segment || segment === "." || segment === "..")) {
|
|
5827
|
+
throw new Error("Invalid first-party app directory. Use a repository name such as TopoloForms or apps/TopoloForms.");
|
|
5828
|
+
}
|
|
5829
|
+
return appDir;
|
|
5830
|
+
}
|
|
5822
5831
|
function normalizeTarget(value) {
|
|
5823
5832
|
if (!value) return "platform";
|
|
5824
5833
|
if (value === "platform" || value === "developer") return value;
|
|
@@ -8970,7 +8979,8 @@ function applicationScaffoldPayload(application, options = {}) {
|
|
|
8970
8979
|
}
|
|
8971
8980
|
const ownerType = target === "platform" ? "topolo_first_party" : "third_party";
|
|
8972
8981
|
const distributionModel = target === "platform" ? "marketplace" : "organization_internal";
|
|
8973
|
-
const
|
|
8982
|
+
const requestedAppDir = options.appDir ?? catalogApplication?.appDir ?? (target === "platform" ? `Topolo${toPascalCase(id)}` : `topolo-${slug}`);
|
|
8983
|
+
const appDir = target === "platform" ? normalizeFirstPartyAppDir(requestedAppDir) : requestedAppDir;
|
|
8974
8984
|
const name = options.name ?? catalogApplication?.name ?? `topolo-${slug}`;
|
|
8975
8985
|
const packageName = options.packageName ?? catalogApplication?.packageName ?? `topolo-${slug}`;
|
|
8976
8986
|
const experience = {
|
|
@@ -10407,7 +10417,7 @@ function registerPlatformCommand(program2) {
|
|
|
10407
10417
|
const platformApps = platform3.command("apps").description("Scaffold and operate first-party Topolo platform and personal applications");
|
|
10408
10418
|
platformApps.command("scaffold <application>").description(
|
|
10409
10419
|
"Generate a first-party Topolo scaffold for the platform or personal portfolio."
|
|
10410
|
-
).option("--json", "Output JSON").option("--no-json", "Output human-readable checklist").option("--app-dir <path>", "Application
|
|
10420
|
+
).option("--json", "Output JSON").option("--no-json", "Output human-readable checklist").option("--app-dir <path>", "Application repo name or apps/<repo> path").option("--name <name>", "Application display/package source name").option("--package-name <name>", "package.json name").option("--production-url <url>", "Production browser URL").option("--service <id>", "Stable SDK/Auth app id for API-backed apps").option("--portfolio <portfolio>", "First-party portfolio: platform or personal").option(
|
|
10411
10421
|
"--surface-model <surfaceModel>",
|
|
10412
10422
|
"First-party surface model: web_app, mobile_container, mobile_module, or messaging_surface"
|
|
10413
10423
|
).option("--container-app-id <appId>", "Container app id when --surface-model mobile_module is used").option("--profile <profile>", "First-party scaffold profile such as spatial-assets").option("--with-d1", "Declare a D1 binding in the first-party scaffold").option("--with-r2", "Declare an R2 binding in the first-party scaffold").option("--with-queue", "Declare a Queue binding in the first-party scaffold").option("--with-workflow", "Declare a Workflow binding in the first-party scaffold").option("--with-container-processing", "Declare container-processing metadata in CloudControl").option("--home-path <path>", "Authenticated home route (default: /dashboard)").option("--home-label <label>", "Home navigation label (default: Dashboard)").option("--navigation-mode <mode>", "Product navigation: sidebar, topbar, or none").option("--workspace-switcher <mode>", "Workspace context selector: required, optional, or off").option("--tagline <text>", "Product-facing landing and home description").option("--write", "Write the generated scaffold files to disk").option("--repo-root <path>", "Directory where scaffold files should be written").option("--force", "Overwrite existing scaffold files when --write is set").option("--with-api", "Include the API/service baseline").option("--no-api", "Do not include API/service requirements").option("--no-browser", "Do not include browser-shell requirements").option(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topolo/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "Command-line interface for Topolo developers, operators, and agents, with internal first-party scaffolding available under the topolo platform namespace.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|