@jtl-software/create-cloud-app 0.6.0 → 0.7.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 (2) hide show
  1. package/dist/index.js +7 -5
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -717,13 +717,14 @@ function environmentFromApi(api) {
717
717
  if (h.includes("api.jtl-cloud.com")) return "prod";
718
718
  return "other";
719
719
  }
720
- function writeFrontendPublicClient(root, authIssuer, publicClientId) {
720
+ function writeFrontendPublicClient(root, authIssuer, publicClientId, apiBase) {
721
721
  const frontendDir = detectFrontend(root);
722
722
  if (!frontendDir) return null;
723
723
  const envFile = path2.join(frontendDir, ".env");
724
724
  upsertEnv(envFile, {
725
725
  VITE_JTL_CLIENT_ID: publicClientId,
726
- VITE_JTL_ISSUER: authIssuer
726
+ VITE_JTL_ISSUER: authIssuer,
727
+ ...apiBase ? { VITE_JTL_API_BASE: apiBase.replace(/\/$/, "") } : {}
727
728
  });
728
729
  return envFile;
729
730
  }
@@ -1039,11 +1040,12 @@ async function applyProvisionResult(root, backend, opts, tenant, appId, provisio
1039
1040
  const written = writeFrontendPublicClient(
1040
1041
  root,
1041
1042
  opts.auth,
1042
- provisioned.publicClientId
1043
+ provisioned.publicClientId,
1044
+ opts.api
1043
1045
  );
1044
1046
  if (written) {
1045
1047
  p2.log.success(
1046
- `Wrote VITE_JTL_CLIENT_ID/VITE_JTL_ISSUER to ${pc2.cyan(path2.relative(root, written))}.`
1048
+ `Wrote VITE_JTL_CLIENT_ID/VITE_JTL_ISSUER/VITE_JTL_API_BASE to ${pc2.cyan(path2.relative(root, written))}.`
1047
1049
  );
1048
1050
  }
1049
1051
  }
@@ -1922,7 +1924,7 @@ import os2 from "os";
1922
1924
  import path6 from "path";
1923
1925
  import { PostHog } from "posthog-node";
1924
1926
  var TOKEN = "phc_SkFAxTIa4RUQxotci1Ftdw7xefZK2Ax0LEIGcl8zuD2";
1925
- var CLI_VERSION = "0.6.0";
1927
+ var CLI_VERSION = "0.7.0";
1926
1928
  var client = TOKEN ? new PostHog(TOKEN, { host: "https://e.jtl-cloud.com" }) : null;
1927
1929
  function telemetryDisabledByEnv() {
1928
1930
  const dnt = process.env.DO_NOT_TRACK;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jtl-software/create-cloud-app",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "description": "CLI tool for scaffolding JTL Platform cloud apps",
6
6
  "bin": {
@@ -19,18 +19,18 @@
19
19
  "dependencies": {
20
20
  "@clack/prompts": "^1.7.0",
21
21
  "@jtl-software/cloud-app-template-backend-dotnet": "0.0.13",
22
- "@jtl-software/cloud-app-template-backend-node": "0.2.0",
22
+ "@jtl-software/cloud-app-template-backend-node": "0.2.1",
23
23
  "@jtl-software/cloud-app-template-backend-php": "0.1.3",
24
- "@jtl-software/cloud-app-template-frontend-react": "0.2.1",
25
- "@jtl-software/cloud-app-template-shared": "0.1.3",
24
+ "@jtl-software/cloud-app-template-frontend-react": "0.3.0",
25
+ "@jtl-software/cloud-app-template-shared": "0.2.0",
26
26
  "picocolors": "^1.1.1",
27
- "posthog-node": "^5.49.1"
27
+ "posthog-node": "^5.51.6"
28
28
  },
29
29
  "devDependencies": {
30
- "@types/node": "^26.2.0",
30
+ "@types/node": "^26.4.0",
31
31
  "msw": "^2.15.0",
32
32
  "tsup": "^8.5.1",
33
- "tsx": "^4.23.12",
33
+ "tsx": "^4.23.13",
34
34
  "typescript": "^6.0.3"
35
35
  },
36
36
  "publishConfig": {