@plitzi/plitzi-builder 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 +64 -0
- package/dist/modules/Functions/components/FunctionsOffer/FunctionsOffer.d.ts +12 -0
- package/dist/modules/Functions/components/FunctionsOffer/index.d.ts +3 -0
- package/dist/modules/Functions/useFunctions.d.ts +1 -0
- package/dist/modules/Resources/Models/ResourceCdnForm.d.ts +11 -1
- package/dist/modules/Resources/components/Resource/Resource.d.ts +3 -1
- package/dist/modules/Resources/components/Resource/subTypes/ResourceServerCode/ResourceServerCode.d.ts +17 -0
- package/dist/modules/Resources/components/Resource/subTypes/ResourceServerCode/index.d.ts +3 -0
- package/dist/modules/Resources/components/Resource/subTypes/ResourceServerCode/serverCodeKindOf.d.ts +3 -0
- package/dist/modules/Resources/components/Resource/subTypes/ResourceServerCode/serverCodeKindOf.test.d.ts +1 -0
- package/dist/modules/Resources/components/ResourcesCdn/ResourcesCdn.d.ts +4 -1
- package/dist/package.json.d.ts +1 -1
- package/dist/plitzi-builder.css +1 -1
- package/dist/plitzi-builder.css.gz +0 -0
- package/dist/plitzi-builder.js +1284 -3290
- package/dist/plitzi-builder.js.gz +0 -0
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# @plitzi/plitzi-builder
|
|
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-auth@0.37.6
|
|
23
|
+
- @plitzi/sdk-authoring@0.37.6
|
|
24
|
+
- @plitzi/sdk-dev-tools@0.37.6
|
|
25
|
+
- @plitzi/sdk-elements@0.37.6
|
|
26
|
+
- @plitzi/sdk-event-bridge@0.37.6
|
|
27
|
+
- @plitzi/sdk-interactions@0.37.6
|
|
28
|
+
- @plitzi/sdk-navigation@0.37.6
|
|
29
|
+
- @plitzi/sdk-plugins@0.37.6
|
|
30
|
+
- @plitzi/sdk-schema@0.37.6
|
|
31
|
+
- @plitzi/sdk-shared@0.37.6
|
|
32
|
+
- @plitzi/sdk-style@0.37.6
|
|
33
|
+
- @plitzi/sdk-variables@0.37.6
|
|
34
|
+
- @plitzi/plitzi-sdk@0.37.6
|
|
35
|
+
|
|
36
|
+
## 0.37.5
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- a32a5a2: ## `@plitzi/sdk-shared`'s GraphQL documents are text
|
|
41
|
+
|
|
42
|
+
- **Every document is a plain string marked `/* GraphQL */`**, the builder's as the SDK's already were, and the client
|
|
43
|
+
parses what it sends — the builder with Apollo's `gql`. A server importing the package no longer loads a GraphQL
|
|
44
|
+
parser or parses 115 documents at boot; `graphql` and `graphql-tag` are no longer dependencies.
|
|
45
|
+
- `BuilderQueries` and `BuilderMutations` are typed `Record<keyof …Map, string>`, and every operation is named as its
|
|
46
|
+
file is: `SpacePublish`, `SpaceDeploy`, `SpaceFixIssues`, `SpaceUpdate`, `SpaceUpdateSchema`, `SpaceUpdateElement(s)`,
|
|
47
|
+
`SpaceRemoveElement`, `StyleUpdate` and `SegmentPublish` gain their `Mutation` suffix, and the space's subscription,
|
|
48
|
+
anonymous until now, is `SpaceEventSubscription`.
|
|
49
|
+
- **Breaking:** `BuilderQueries`, `BuilderMutations` and `SpaceEventSubscription` are strings, not `DocumentNode`s —
|
|
50
|
+
pass them through `gql` for Apollo.
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [a32a5a2]
|
|
53
|
+
- @plitzi/sdk-auth@0.37.5
|
|
54
|
+
- @plitzi/sdk-authoring@0.37.5
|
|
55
|
+
- @plitzi/sdk-dev-tools@0.37.5
|
|
56
|
+
- @plitzi/sdk-elements@0.37.5
|
|
57
|
+
- @plitzi/sdk-event-bridge@0.37.5
|
|
58
|
+
- @plitzi/sdk-interactions@0.37.5
|
|
59
|
+
- @plitzi/sdk-navigation@0.37.5
|
|
60
|
+
- @plitzi/sdk-plugins@0.37.5
|
|
61
|
+
- @plitzi/sdk-schema@0.37.5
|
|
62
|
+
- @plitzi/sdk-shared@0.37.5
|
|
63
|
+
- @plitzi/sdk-style@0.37.5
|
|
64
|
+
- @plitzi/sdk-variables@0.37.5
|
|
65
|
+
- @plitzi/plitzi-sdk@0.37.5
|
|
66
|
+
|
|
3
67
|
## 0.37.4
|
|
4
68
|
|
|
5
69
|
### Patch Changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type FunctionsOfferProps = {
|
|
2
|
+
/** The template's name. */
|
|
3
|
+
template: string;
|
|
4
|
+
isInstalling?: boolean;
|
|
5
|
+
onInstall?: () => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The functions the space's template brought, offered to install: a space made from a template has no private CDN to
|
|
9
|
+
* keep server code on at first, so they wait here until it has one. Installing saves them as the space's own.
|
|
10
|
+
*/
|
|
11
|
+
declare const FunctionsOffer: ({ template, isInstalling, onInstall }: FunctionsOfferProps) => import('react').JSX.Element;
|
|
12
|
+
export default FunctionsOffer;
|
|
@@ -8,6 +8,7 @@ declare const useFunctions: () => {
|
|
|
8
8
|
error: string;
|
|
9
9
|
isLoading: boolean;
|
|
10
10
|
save: (files: FunctionsDraft["files"]) => Promise<FunctionsSaveResult | undefined>;
|
|
11
|
+
install: () => Promise<FunctionsSaveResult | undefined>;
|
|
11
12
|
remove: () => Promise<void>;
|
|
12
13
|
tryTask: (task: string, params: Record<string, unknown>) => Promise<ActionRunReport | undefined>;
|
|
13
14
|
};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { CdnVisibility } from '@plitzi/sdk-shared';
|
|
2
3
|
import { MouseEvent } from 'react';
|
|
3
4
|
declare const resourceCdnFormSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
5
|
provider: z.ZodLiteral<"s3">;
|
|
5
6
|
name: z.ZodString;
|
|
7
|
+
visibility: z.ZodEnum<{
|
|
8
|
+
public: "public";
|
|
9
|
+
private: "private";
|
|
10
|
+
}>;
|
|
6
11
|
domain: z.ZodString;
|
|
7
12
|
region: z.ZodString;
|
|
8
13
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -10,6 +15,10 @@ declare const resourceCdnFormSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
10
15
|
}, z.core.$strip>, z.ZodObject<{
|
|
11
16
|
provider: z.ZodLiteral<"r2">;
|
|
12
17
|
name: z.ZodString;
|
|
18
|
+
visibility: z.ZodEnum<{
|
|
19
|
+
public: "public";
|
|
20
|
+
private: "private";
|
|
21
|
+
}>;
|
|
13
22
|
domain: z.ZodString;
|
|
14
23
|
region: z.ZodDefault<z.ZodString>;
|
|
15
24
|
endpoint: z.ZodString;
|
|
@@ -19,6 +28,7 @@ export type ResourceCdnFormProps = {
|
|
|
19
28
|
className?: string;
|
|
20
29
|
name?: string;
|
|
21
30
|
domain?: string;
|
|
31
|
+
visibility?: CdnVisibility;
|
|
22
32
|
provider?: 's3' | 'r2';
|
|
23
33
|
region?: string;
|
|
24
34
|
endpoint?: string;
|
|
@@ -26,5 +36,5 @@ export type ResourceCdnFormProps = {
|
|
|
26
36
|
onClose?: (e?: MouseEvent) => void;
|
|
27
37
|
onSubmit?: (e: MouseEvent | undefined, values: z.infer<typeof resourceCdnFormSchema>) => void;
|
|
28
38
|
};
|
|
29
|
-
declare const ResourceCdnForm: ({ name, domain, provider, region, endpoint, bucketName, onSubmit, onClose }: ResourceCdnFormProps) => import('react').JSX.Element;
|
|
39
|
+
declare const ResourceCdnForm: ({ name, domain, visibility, provider, region, endpoint, bucketName, onSubmit, onClose }: ResourceCdnFormProps) => import('react').JSX.Element;
|
|
30
40
|
export default ResourceCdnForm;
|
|
@@ -7,9 +7,11 @@ export type ResourceProps = {
|
|
|
7
7
|
src?: string;
|
|
8
8
|
title?: string;
|
|
9
9
|
metadata?: PluginManifest;
|
|
10
|
+
/** For server code, the versions of the space that run it. */
|
|
11
|
+
usedBy?: string[];
|
|
10
12
|
directoryName?: string;
|
|
11
13
|
isLoading?: boolean;
|
|
12
14
|
onRemove?: (id: string) => void;
|
|
13
15
|
};
|
|
14
|
-
declare const Resource: ({ className, id, cdnIdentifier, type, src, title, metadata, directoryName, isLoading, onRemove }: ResourceProps) => import('react').JSX.Element;
|
|
16
|
+
declare const Resource: ({ className, id, cdnIdentifier, type, src, title, metadata, usedBy, directoryName, isLoading, onRemove }: ResourceProps) => import('react').JSX.Element;
|
|
15
17
|
export default Resource;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
export type ResourceServerCodeProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
id: string;
|
|
5
|
+
/** The versions of the space that run it: while any does, it cannot be removed. */
|
|
6
|
+
usedBy?: string[];
|
|
7
|
+
removing?: boolean;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
onRemove?: (e: MouseEvent) => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A file of the space's server code on its private CDN — its functions or its runtime, kept by saves and pushes and
|
|
13
|
+
* named by what it holds. No preview and no address: a private CDN serves nothing. What it shows is which versions run
|
|
14
|
+
* it, so what nothing runs any more can be cleared from here.
|
|
15
|
+
*/
|
|
16
|
+
declare const ResourceServerCode: ({ className, id, usedBy, removing, isLoading, onRemove }: ResourceServerCodeProps) => import('react').JSX.Element;
|
|
17
|
+
export default ResourceServerCode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Cdn } from '@plitzi/sdk-shared';
|
|
1
2
|
export type ResourcesCdnProps = {
|
|
3
|
+
/** The CDN as the space's list gives it — what its settings open with. */
|
|
4
|
+
cdn: Cdn;
|
|
2
5
|
identifier: string;
|
|
3
6
|
name: string;
|
|
4
7
|
prefix: string;
|
|
@@ -8,5 +11,5 @@ export type ResourcesCdnProps = {
|
|
|
8
11
|
onChange?: (identifier: string) => void;
|
|
9
12
|
onRemove?: (identifier: string) => void;
|
|
10
13
|
};
|
|
11
|
-
declare const ResourcesCdn: ({ identifier, name, prefix, credentialIdentifier, isCollapsed, onCollapse, onChange, onRemove }: ResourcesCdnProps) => import('react').JSX.Element;
|
|
14
|
+
declare const ResourcesCdn: ({ cdn, identifier, name, prefix, credentialIdentifier, isCollapsed, onCollapse, onChange, onRemove }: ResourcesCdnProps) => import('react').JSX.Element;
|
|
12
15
|
export default ResourcesCdn;
|