You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(apps): make the packages publishable and keep them out of releases
The apps packages were npm workspaces of the repo root, whose only other job is
the semantic-release run in release.yml and prerelease-alpha.yml. Its npm ci
therefore installed every app dependency, cloudflared's 38 MB binary included.
They get their own workspace root at apps/ instead, so the release install drops
from ~490 to ~310 packages and local development is one npm install in apps/.
Publishing fixes:
- Both packages declared 0.0.1-alpha.1, already on npm with different contents
(the newest published is alpha.7). They move to 0.0.1-alpha.8.
- files: ["dist"] with no build hook shipped an empty package from a clean
checkout; both gain prepack.
- Neither declared a license or a repository.
- create-tolgee-app pinned an SDK release that does not export selfRegisterApp
or applyTolgeeTheme, so the scaffold only failed later, as TypeScript errors.
resolveSdk now refuses the registry path outright and names what to do;
PUBLISHED_SDK_RELEASED is the flag to flip once the SDK is published.
- create-tolgee-app's .gitignore did not cover node_modules.
Dependency fixes:
- cloudflared is a local-dev convenience whose postinstall downloads an
unpinned, unverified binary; it moves to devDependencies and the tunnel
script now degrades to a message when it is absent instead of crashing.
- @tginternal/client was a direct dependency of the template and keys-showcase
but imported by neither.
- express 4 -> 5, @clack/prompts 0.11 -> 1, and @types/node aligned with the
Node versions the packages actually claim.
Finally, nothing in CI built, typechecked or tested any of this, which is how
all of the above got in. test.yml gains an apps-check job that installs the
workspace, builds the SDK, typechecks all three packages and runs their tests.
Copy file name to clipboardExpand all lines: apps/create-tolgee-app/README.md
+24-8Lines changed: 24 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,13 @@ to your Tolgee instance.
8
8
npx create-tolgee-app my-app
9
9
```
10
10
11
-
> **Status: alpha, not published.** Inside this repository the package is
12
-
> resolved through npm workspaces, so `npm install` at the repo root links it
13
-
> (and `@tolgee/apps-sdk`) locally. `npx create-tolgee-app` from a clean machine
14
-
> does not work yet. Run from a checkout, it scaffolds anywhere on disk and
15
-
> wires the generated app to the SDK sources — see *Which SDK the generated app
16
-
> gets*.
11
+
> **Status: alpha, needs a checkout.** Inside this repository the package is
12
+
> resolved through npm workspaces, so `npm install` in `apps/` links it (and
13
+
> `@tolgee/apps-sdk`) locally. `npx create-tolgee-app` from a clean machine
14
+
> **exits with an error**: no `@tolgee/apps-sdk` on npm carries the API the
15
+
> template imports, so the scaffold could only produce a project that does not
16
+
> compile. Run from a checkout, it scaffolds anywhere on disk and wires the
17
+
> generated app to the SDK sources — see *Which SDK the generated app gets*.
17
18
18
19
## What it generates
19
20
@@ -89,14 +90,21 @@ summary and again in the next steps.
89
90
90
91
| Mode | What the dependency becomes |
91
92
| --- | --- |
92
-
|`auto` (default) |`*` when the app is generated into this repo's npm workspaces (they link the SDK already), otherwise `file:<abs path>/apps/tolgee-apps-sdk`, and an exact published version when the CLI has no SDK sources next to it|
93
+
|`auto` (default) |`*` when the app is generated into the `apps/` npm workspaces (they link the SDK already), otherwise `file:<abs path>/apps/tolgee-apps-sdk`|
93
94
|`local`| as `auto`, but fails instead of falling back to the registry |
94
95
|`published`| an exact published version, never a range |
95
96
97
+
**`published` currently refuses to run.** Every `@tolgee/apps-sdk` release on npm
98
+
predates `selfRegisterApp` and `applyTolgeeTheme`, which the template imports, so
99
+
the generator exits with that sentence rather than handing you a project full of
100
+
missing-export errors. `PUBLISHED_SDK_RELEASED` in `src/registry.ts` is the flag
101
+
to flip — together with `PUBLISHED_SDK_VERSION` — once the SDK is on npm. `auto`
102
+
hits the same wall only when the CLI has no SDK sources next to it.
103
+
96
104
A `file:` dependency uses the SDK's build output, so the SDK has to be built:
97
105
98
106
```bash
99
-
npm run build --workspace @tolgee/apps-sdk
107
+
npm run build --workspace @tolgee/apps-sdk# from apps/
100
108
```
101
109
102
110
The generator does not build it for you, but it does check and says so in the
@@ -111,6 +119,11 @@ Cloudflare quick tunnel, publishes the public URLs to `.tolgee-dev/tunnel.json`,
111
119
and the server registers the app with *those* URLs. `TOLGEE_DEV_TUNNEL=none`, or
112
120
a localhost `TOLGEE_URL`, keeps everything local.
113
121
122
+
`cloudflared` is a **dev dependency** of the generated app — it downloads a
123
+
platform binary on install, which no deployment of the app needs. A production
124
+
install (`npm ci --omit=dev`) simply has no tunnel; the script says so and lets
125
+
Vite and the app server carry on.
126
+
114
127
## Non-interactive use
115
128
116
129
```bash
@@ -133,6 +146,9 @@ them there to run two apps side by side.
133
146
134
147
## Developing this package
135
148
149
+
It is part of the `apps/` npm workspace, so dependencies come from
0 commit comments