@topolo/cli 0.6.6 → 0.6.7

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 (2) hide show
  1. package/dist/index.js +54 -13
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -618,7 +618,9 @@ var APPLICATIONS = {
618
618
  "domains": [
619
619
  "compose.topolo.app"
620
620
  ],
621
- "routes": [],
621
+ "routes": [
622
+ "compose.topolo.app"
623
+ ],
622
624
  "appId": "compose"
623
625
  },
624
626
  {
@@ -648,7 +650,9 @@ var APPLICATIONS = {
648
650
  "domains": [
649
651
  "consent.topolo.app"
650
652
  ],
651
- "routes": [],
653
+ "routes": [
654
+ "consent.topolo.app"
655
+ ],
652
656
  "appId": "consent"
653
657
  },
654
658
  {
@@ -780,7 +784,9 @@ var APPLICATIONS = {
780
784
  "domains": [
781
785
  "director.topolo.app"
782
786
  ],
783
- "routes": [],
787
+ "routes": [
788
+ "director.topolo.app"
789
+ ],
784
790
  "appId": "director"
785
791
  },
786
792
  {
@@ -888,7 +894,9 @@ var APPLICATIONS = {
888
894
  "domains": [
889
895
  "flow.topolo.app"
890
896
  ],
891
- "routes": [],
897
+ "routes": [
898
+ "flow.topolo.app"
899
+ ],
892
900
  "appId": "flow"
893
901
  },
894
902
  {
@@ -918,7 +926,9 @@ var APPLICATIONS = {
918
926
  "domains": [
919
927
  "forecast.topolo.app"
920
928
  ],
921
- "routes": [],
929
+ "routes": [
930
+ "forecast.topolo.app"
931
+ ],
922
932
  "appId": "forecast"
923
933
  },
924
934
  {
@@ -1044,7 +1054,9 @@ var APPLICATIONS = {
1044
1054
  "domains": [
1045
1055
  "inventory.topolo.app"
1046
1056
  ],
1047
- "routes": [],
1057
+ "routes": [
1058
+ "inventory.topolo.app"
1059
+ ],
1048
1060
  "appId": "inventory"
1049
1061
  },
1050
1062
  {
@@ -7289,6 +7301,10 @@ function envDts(api) {
7289
7301
  "interface ImportMetaEnv {",
7290
7302
  " readonly VITE_TOPOLO_AUTH_URL?: string;",
7291
7303
  " readonly VITE_TOPOLO_APP_ID?: string;",
7304
+ " readonly VITE_TOPOLO_INSIGHTS_SITE_KEY?: string;",
7305
+ " readonly VITE_TOPOLO_INSIGHTS_ENDPOINT?: string;",
7306
+ " readonly VITE_TOPOLO_CONSENT_BASE_URL?: string;",
7307
+ " readonly VITE_TOPOLO_CONSENT_SDK_KEY?: string;",
7292
7308
  " readonly VITE_TOPOLO_CLIENT_ID?: string;",
7293
7309
  " readonly VITE_TOPOLO_REDIRECT_URI?: string;",
7294
7310
  " readonly VITE_TOPOLO_SCOPES?: string;"
@@ -8959,6 +8975,13 @@ function topoloAppManifestJson(application, options) {
8959
8975
  production: "cd ../.. && DEPLOY_ENVIRONMENT=production VITE_TOPOLO_AUTH_URL=https://auth.topolo.app pnpm run build"
8960
8976
  },
8961
8977
  healthcheckPath: options.api ? "/api/health" : "/",
8978
+ vars: {
8979
+ INSIGHTS_SITE_KEY: {
8980
+ development: "",
8981
+ staging: "",
8982
+ production: ""
8983
+ }
8984
+ },
8962
8985
  ...options.api ? {
8963
8986
  bindings: {
8964
8987
  services: [
@@ -9017,6 +9040,7 @@ function topoloAppManifestJson(application, options) {
9017
9040
  version: "1.0.0",
9018
9041
  pricing: { type: "free", monthlyPrice: null },
9019
9042
  supportEmail: "support@topolo.io",
9043
+ repoUrl: `https://github.com/Topolo-io/${application.appDir}`,
9020
9044
  auth: {
9021
9045
  callbackPath: "/auth/callback",
9022
9046
  requestedScopes: unique3([
@@ -9030,7 +9054,7 @@ function topoloAppManifestJson(application, options) {
9030
9054
  },
9031
9055
  capabilities: options.payload.capabilities,
9032
9056
  marketplace: {
9033
- intent: options.payload.distributionModel === "marketplace" ? "submit_when_ready" : "not_requested",
9057
+ intent: options.payload.distributionModel === "marketplace" ? "publish" : "not_requested",
9034
9058
  status: "preview",
9035
9059
  shortBlurb: options.payload.experience.tagline,
9036
9060
  tagline: options.payload.experience.tagline,
@@ -9823,7 +9847,7 @@ function applicationScaffoldPayload(application, options = {}) {
9823
9847
  const containerAppId = normalizeContainerAppId(options.containerAppId, surfaceModel);
9824
9848
  const profile = normalizeScaffoldProfile(options.profile);
9825
9849
  const ownerType = target === "platform" ? "topolo_first_party" : "third_party";
9826
- const distributionModel = target === "platform" ? "marketplace" : "organization_internal";
9850
+ const distributionModel = target === "platform" ? "marketplace" : options.distributionModel ?? "organization_internal";
9827
9851
  const capabilityComposition = resolveApplicationCapabilities({
9828
9852
  target,
9829
9853
  browser,
@@ -10716,7 +10740,7 @@ function buildProvisioningRequest(payload, supportEmail) {
10716
10740
  ...payload.application.appId ? [`${payload.application.id}:read`] : []
10717
10741
  ])),
10718
10742
  marketplace: {
10719
- intent: payload.distributionModel === "marketplace" ? "submit_when_ready" : "not_requested",
10743
+ intent: payload.target === "platform" && payload.distributionModel === "marketplace" ? "publish" : payload.distributionModel === "marketplace" ? "submit_when_ready" : "not_requested",
10720
10744
  status: "preview",
10721
10745
  shortBlurb: payload.experience.tagline,
10722
10746
  tagline: payload.experience.tagline,
@@ -10732,7 +10756,7 @@ function buildProvisioningRequest(payload, supportEmail) {
10732
10756
  pricingType: "free",
10733
10757
  monthlyPrice: null,
10734
10758
  demoUrl: payload.application.productionUrl,
10735
- repoUrl: null,
10759
+ repoUrl: payload.target === "platform" ? `https://github.com/Topolo-io/${payload.application.appDir}` : null,
10736
10760
  supportEmail,
10737
10761
  tags: [],
10738
10762
  screenshots: [],
@@ -10833,13 +10857,15 @@ async function reconcileApplicationCapabilitySource(options) {
10833
10857
  const target = options.ownerType === "topolo_first_party" ? "platform" : "developer";
10834
10858
  const surfaces = resolveManifestSurfaces(manifest, registration);
10835
10859
  const existing = Array.isArray(registration.capabilities) ? registration.capabilities.filter((value) => typeof value === "string") : [];
10860
+ const declaredNotificationRole = record(manifest.notifications)?.role;
10861
+ const inferredCapabilities = declaredNotificationRole === "producer" ? ["notification_producer"] : [];
10836
10862
  const capabilities = resolveApplicationCapabilities({
10837
10863
  target,
10838
10864
  browser: surfaces.browser,
10839
10865
  api: surfaces.api,
10840
10866
  mobile: surfaces.mobile,
10841
10867
  distributionModel: registration.distributionModel === "marketplace" ? "marketplace" : "organization_internal",
10842
- requested: [...existing, ...options.additions ?? []]
10868
+ requested: [...existing, ...inferredCapabilities, ...options.additions ?? []]
10843
10869
  });
10844
10870
  const marketplace = record(registration.marketplace);
10845
10871
  const unlistedNativeArtifact = options.ownerType === "topolo_first_party" && registration.surfaceModel === "mobile_container" && registration.distributionModel === "organization_internal" && marketplace?.intent === "unlisted";
@@ -11213,7 +11239,7 @@ async function completeApplicationRegistrationInteractively(options) {
11213
11239
  },
11214
11240
  capabilities: Array.isArray(existing.capabilities) ? existing.capabilities : ["login", "launcher"],
11215
11241
  marketplace: record2(existing.marketplace) || {
11216
- intent: options.expectedOwnerType === "topolo_first_party" ? "submit_when_ready" : "not_requested",
11242
+ intent: options.expectedOwnerType === "topolo_first_party" ? "publish" : "not_requested",
11217
11243
  status: "preview",
11218
11244
  shortBlurb: description,
11219
11245
  tagline: description,
@@ -11290,7 +11316,8 @@ async function loadApplicationReconcileRequest(options) {
11290
11316
  requestedScopes: registration.auth?.requestedScopes ?? [],
11291
11317
  capabilities: registration.capabilities,
11292
11318
  marketplace: { ...registration.marketplace, appUrl: productionUrl },
11293
- notifications: manifest.notifications ?? null
11319
+ notifications: manifest.notifications ?? null,
11320
+ actions: manifest.actions ?? []
11294
11321
  }
11295
11322
  };
11296
11323
  }
@@ -11542,6 +11569,9 @@ function registerAppsCommand(program2) {
11542
11569
  apps.command("scaffold <application>").description(
11543
11570
  "Generate a third-party Topolo application scaffold for business or personal/household use."
11544
11571
  ).option("--json", "Output JSON").option("--no-json", "Output human-readable checklist").option("--app-dir <path>", "Application directory under the scaffold root").option("--name <name>", "Application display/package source name").option("--package-name <name>", "package.json name").option("--production-url <url>", "Production browser URL").option("--app-id <id>", "Stable SDK/Auth app id for API-backed apps").option("--audience <audience>", "Developer app audience: business or personal").option("--tenancy <tenancy>", "Developer app tenancy: organization or household").option(
11572
+ "--distribution-model <model>",
11573
+ "Developer app distribution: organization_internal or marketplace (marketplace requires approval)"
11574
+ ).option(
11545
11575
  "--surface-model <surfaceModel>",
11546
11576
  "Developer app surface model: web_app, mobile_container, mobile_module, or messaging_surface"
11547
11577
  ).option("--container-app-id <appId>", "Container app id when --surface-model mobile_module is used").option("--capability <id...>", "Compose one or more approved Topolo capabilities").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 API/service files for developer scaffolds").option("--no-api", "Do not include API/service requirements").option("--no-browser", "Do not include browser-shell requirements").option(
@@ -11562,6 +11592,7 @@ function registerAppsCommand(program2) {
11562
11592
  target: "developer",
11563
11593
  audience: resolveScaffoldAudience(opts.audience),
11564
11594
  tenancy: resolveScaffoldTenancy(opts.tenancy),
11595
+ distributionModel: resolveScaffoldDistributionModel(opts.distributionModel),
11565
11596
  surfaceModel: resolveScaffoldSurfaceModel(opts.surfaceModel),
11566
11597
  containerAppId: opts.containerAppId,
11567
11598
  capabilities: opts.capability
@@ -11921,6 +11952,16 @@ function resolveScaffoldTenancy(value) {
11921
11952
  }
11922
11953
  throw new Error("Invalid --tenancy value. Use organization or household.");
11923
11954
  }
11955
+ function resolveScaffoldDistributionModel(value) {
11956
+ if (!value) return void 0;
11957
+ const normalized = value.trim().toLowerCase().replace(/-/g, "_");
11958
+ if (normalized === "marketplace" || normalized === "organization_internal") {
11959
+ return normalized;
11960
+ }
11961
+ throw new Error(
11962
+ "Invalid --distribution-model value. Use organization_internal or marketplace."
11963
+ );
11964
+ }
11924
11965
  function resolveScaffoldSurfaceModel(value) {
11925
11966
  if (!value) return void 0;
11926
11967
  const normalized = value.trim().toLowerCase();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@topolo/cli",
3
- "version": "0.6.6",
4
- "topoloPublishedVersion": "0.6.5",
3
+ "version": "0.6.7",
4
+ "topoloPublishedVersion": "0.6.7",
5
5
  "description": "Command-line interface for Topolo developers, operators, and agents, with internal first-party scaffolding available under the topolo platform namespace.",
6
6
  "type": "module",
7
7
  "bin": {