@plitzi/cli 0.37.4 → 0.37.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # @plitzi/cli
2
2
 
3
+ ## 0.37.6
4
+
5
+ ### Patch Changes
6
+
7
+ - d6c2a21: ## Server code on a private CDN
8
+
9
+ - **A CDN has a visibility**: `public` (the default — its files served at its domain: plugins, images, templates) or
10
+ `private` (no domain, read only by the platform with its credential). The builder's CDN form asks for it, and every
11
+ CDN now has **Settings** in Resources to change its configuration — until now a CDN could not be edited at all.
12
+ - **A space's server code is kept on its private CDN**, not in the platform's database: its functions' source and
13
+ bundle, and its runtime's packed code, named by what they hold. Saving functions or pushing a runtime to a space with
14
+ no private CDN is refused with how to add one (`FunctionsRefusal.limit: 'storage'`). Resources lists them under
15
+ **Server code** with the versions that run each (`Resource.usedBy`, `ResourceType` `server`); one in use cannot be
16
+ removed. A private CDN cannot take a page's file, and `plitzi upload plugin` offers only public CDNs.
17
+ - **A space made from a template** gets the template's functions as an offer (`FunctionsDraft.offer`): the Functions
18
+ panel installs them (`SpaceInstallTemplateFunctions`) once the space has a private CDN.
19
+ - Types: `Cdn.visibility`, `CdnVisibility`; `SpaceAddCdn` / `SpaceUpdateCdn` take `visibility` and a nullable `domain`.
20
+
21
+ - Updated dependencies [d6c2a21]
22
+ - @plitzi/sdk-authoring@0.37.6
23
+
24
+ ## 0.37.5
25
+
26
+ ### Patch Changes
27
+
28
+ - a32a5a2: ## `@plitzi/sdk-shared`'s GraphQL documents are text
29
+
30
+ - **Every document is a plain string marked `/* GraphQL */`**, the builder's as the SDK's already were, and the client
31
+ parses what it sends — the builder with Apollo's `gql`. A server importing the package no longer loads a GraphQL
32
+ parser or parses 115 documents at boot; `graphql` and `graphql-tag` are no longer dependencies.
33
+ - `BuilderQueries` and `BuilderMutations` are typed `Record<keyof …Map, string>`, and every operation is named as its
34
+ file is: `SpacePublish`, `SpaceDeploy`, `SpaceFixIssues`, `SpaceUpdate`, `SpaceUpdateSchema`, `SpaceUpdateElement(s)`,
35
+ `SpaceRemoveElement`, `StyleUpdate` and `SegmentPublish` gain their `Mutation` suffix, and the space's subscription,
36
+ anonymous until now, is `SpaceEventSubscription`.
37
+ - **Breaking:** `BuilderQueries`, `BuilderMutations` and `SpaceEventSubscription` are strings, not `DocumentNode`s —
38
+ pass them through `gql` for Apollo.
39
+
40
+ - Updated dependencies [a32a5a2]
41
+ - @plitzi/sdk-authoring@0.37.5
42
+
3
43
  ## 0.37.4
4
44
 
5
45
  ### Patch Changes
package/dist/index.js CHANGED
@@ -4552,16 +4552,21 @@ var manifestOf = (zip) => {
4552
4552
  return;
4553
4553
  }
4554
4554
  };
4555
- var chooseCdn = async (cdns, given, spaceName) => {
4556
- if (cdns.length === 0) {
4557
- fail(`${spaceName} has no CDN to put a plugin on. Add one in the builder, under the space's settings.`);
4558
- return;
4559
- }
4555
+ var chooseCdn = async (listed, given, spaceName) => {
4556
+ const cdns = listed.filter((cdn) => cdn.visibility !== "private");
4560
4557
  if (given) {
4561
- const named = cdns.find((cdn) => cdn.identifier === given);
4562
- if (!named) fail(`${spaceName} has no CDN "${given}". Its CDNs: ${cdns.map((cdn) => cdn.identifier).join(", ")}.`);
4558
+ const named = listed.find((cdn) => cdn.identifier === given);
4559
+ if (!named) fail(`${spaceName} has no CDN "${given}". Its CDNs: ${listed.map((cdn) => cdn.identifier).join(", ")}.`);
4560
+ else if (named.visibility === "private") {
4561
+ fail(`"${given}" is a private CDN: it keeps ${spaceName}'s server code and has no public address, so no page could load a plugin from it. Use a public one${cdns.length ? `: ${cdns.map((cdn) => cdn.identifier).join(", ")}` : ""}.`);
4562
+ return;
4563
+ }
4563
4564
  return named;
4564
4565
  }
4566
+ if (cdns.length === 0) {
4567
+ fail(`${spaceName} has no public CDN to put a plugin on. Add one in the builder, under Resources${listed.length ? " (its only CDNs are private, for server code)" : ""}.`);
4568
+ return;
4569
+ }
4565
4570
  if (cdns.length === 1) return cdns[0];
4566
4571
  if (!atTerminal()) {
4567
4572
  refuseWithoutTerminal("upload", [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/cli",
3
- "version": "0.37.4",
3
+ "version": "0.37.6",
4
4
  "license": "AGPL-3.0",
5
5
  "description": "Command line for Plitzi: scaffold a project that renders a space, a plugin package, or an element of your own.",
6
6
  "files": [
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "sideEffects": false,
23
23
  "dependencies": {
24
- "@plitzi/sdk-authoring": "0.37.4",
24
+ "@plitzi/sdk-authoring": "0.37.6",
25
25
  "chalk": "^6.0.0",
26
26
  "commander": "^15.0.0",
27
27
  "esbuild": "^0.28.2",
28
28
  "fflate": "^0.8.3"
29
29
  },
30
30
  "devDependencies": {
31
- "@plitzi/sdk-shared": "0.37.4",
31
+ "@plitzi/sdk-shared": "0.37.6",
32
32
  "@types/node": "^26.6.2",
33
33
  "eslint": "^9.39.5",
34
34
  "eslint-plugin-import": "^2.32.0",