@relyio/cli 0.10.1 → 0.12.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relyio/cli",
3
- "version": "0.10.1",
3
+ "version": "0.12.0",
4
4
  "description": "RelyIO is coming soon — this package is not ready for general use yet.",
5
5
  "bugs": {
6
6
  "email": "team@relyio.com"
@@ -17,8 +17,6 @@
17
17
  "templates"
18
18
  ],
19
19
  "dependencies": {
20
- "axios": "^1.9.0",
21
- "axios-retry": "^4.5.0",
22
20
  "boxen": "^8.0.1",
23
21
  "chalk": "5.6.2",
24
22
  "chokidar": "^4.0.1",
@@ -52,7 +50,7 @@
52
50
  "devDependencies": {
53
51
  "@types/diff": "^8.0.0",
54
52
  "@types/inquirer": "^9.0.7",
55
- "@types/js-yaml": "^4.0.9",
53
+ "@types/js-yaml": "4.0.9",
56
54
  "@types/node": "24.13.3",
57
55
  "@types/react": "19.2.18",
58
56
  "@types/update-notifier": "^6.0.8",
@@ -64,14 +62,15 @@
64
62
  "typescript": "npm:@typescript/typescript6@6.0.2",
65
63
  "typescript-eslint": "8.69.0",
66
64
  "vitest": "4.1.11",
65
+ "@relyio/api-contract": "0.1.0",
67
66
  "@relyio/codegen-core": "1.0.0",
68
67
  "@relyio/codegen-python": "0.1.0",
69
- "@relyio/api-contract": "0.1.0",
70
68
  "@relyio/codegen-typescript": "1.0.0",
71
69
  "@relyio/device-auth": "0.0.0",
72
70
  "@relyio/eslint-config": "0.0.0",
71
+ "@relyio/manifest": "0.0.0",
73
72
  "@relyio/schema": "0.0.1",
74
- "@relyio/sdk": "0.14.0",
73
+ "@relyio/sdk": "0.17.0",
75
74
  "@relyio/tenancy": "0.1.0"
76
75
  },
77
76
  "publishConfig": {
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Your RelyIO schema. `relyio deploy` reads this file — `relyio/schema.ts` — and every module it
3
+ * imports. Add a content type under `contentTypes`; see https://docs.relyio.com/schemas.
4
+ *
5
+ * `@relyio/sdk` provides the `define*` functions: install it with your package manager
6
+ * (`npm install @relyio/sdk`).
7
+ */
8
+
9
+ import { defineLocale, defineSchema } from '@relyio/sdk/schema'
10
+
11
+ export const schema = defineSchema({
12
+ locales: [defineLocale('en', { displayName: 'English', default: true })],
13
+ contentTypes: {},
14
+ })
@@ -0,0 +1,17 @@
1
+ import { defineAssetType, fields } from '@relyio/sdk/schema'
2
+
3
+ export const photo = defineAssetType({
4
+ displayName: 'Photo',
5
+ displayNamePlural: 'Photos',
6
+ displayField: 'altText',
7
+ fields: {
8
+ altText: fields.shortText({ displayName: 'Alt Text' }),
9
+ },
10
+ image: {
11
+ upload: {
12
+ allowedMimeTypes: ['image/jpeg', 'image/png', 'image/webp'],
13
+ maxFileSize: 10_485_760,
14
+ },
15
+ variants: [{ id: 'thumb', width: 400, height: 400, fit: 'cover', format: 'webp' }],
16
+ },
17
+ })
@@ -0,0 +1,11 @@
1
+ import { defineContentType, fields } from '@relyio/sdk/schema'
2
+
3
+ export const author = defineContentType({
4
+ displayName: 'Author',
5
+ description: 'Represents a blog author',
6
+ fields: {
7
+ name: fields.shortText({ required: true, displayName: 'Author Name' }),
8
+ bio: fields.longText({ displayName: 'Biography' }),
9
+ avatar: fields.reference({ to: 'photo', displayName: 'Profile Picture' }),
10
+ },
11
+ })
@@ -0,0 +1,17 @@
1
+ import { defineContentType, fields } from '@relyio/sdk/schema'
2
+
3
+ import { seoMetadata } from '../fieldsets/seo-metadata'
4
+
5
+ export const blogPost = defineContentType({
6
+ displayName: 'Blog Post',
7
+ description: 'Defines the structure for blog articles',
8
+ fields: {
9
+ title: fields.shortText({ required: true, displayName: 'Post Title' }),
10
+ slug: fields.slug({ sourceField: 'title', unique: true, displayName: 'Slug' }),
11
+ body: fields.richText({ displayName: 'Body' }),
12
+ publishedAt: fields.date({ displayName: 'Published Date' }),
13
+ isFeatured: fields.boolean({ defaultValue: false, displayName: 'Featured' }),
14
+ author: fields.reference({ to: 'author', displayName: 'Author' }),
15
+ seo: fields.object({ of: seoMetadata, displayName: 'SEO' }),
16
+ },
17
+ })
@@ -0,0 +1,9 @@
1
+ import { defineContentType, fields } from '@relyio/sdk/schema'
2
+
3
+ export const category = defineContentType({
4
+ displayName: 'Category',
5
+ description: 'Blog categories',
6
+ fields: {
7
+ title: fields.shortText({ required: true, displayName: 'Category Title' }),
8
+ },
9
+ })
@@ -0,0 +1,11 @@
1
+ import { fields, fieldset } from '@relyio/sdk/schema'
2
+
3
+ /** One fieldset, placed wherever a page needs its SEO: on a post and on the blog's index page. */
4
+ export const seoMetadata = fieldset('seoMetadata', {
5
+ displayName: 'SEO Metadata',
6
+ fields: {
7
+ metaTitle: fields.shortText({ displayName: 'Meta Title' }),
8
+ metaDescription: fields.longText({ displayName: 'Meta Description' }),
9
+ openGraphImage: fields.reference({ to: 'photo', displayName: 'Open Graph Image' }),
10
+ },
11
+ })
@@ -0,0 +1,18 @@
1
+ import { defineQuery } from '@relyio/sdk/schema'
2
+
3
+ export const featuredPosts = defineQuery({
4
+ endpoint: '/api/featured-posts',
5
+ description: 'Fetches featured blog posts',
6
+ fetch: {
7
+ contentType: 'blogPost',
8
+ where: { isFeatured: true },
9
+ sort: [{ publishedAt: 'desc' }],
10
+ limit: 5,
11
+ },
12
+ })
13
+
14
+ export const latestPosts = defineQuery({
15
+ endpoint: '/api/latest-posts',
16
+ description: 'Fetches the latest blog posts',
17
+ fetch: { contentType: 'blogPost', sort: [{ publishedAt: 'desc' }], limit: 5 },
18
+ })
@@ -0,0 +1,26 @@
1
+ /**
2
+ * A blog: posts, authors and categories, an index page, a photo asset type and two queries.
3
+ *
4
+ * `relyio deploy` reads this file — `relyio/schema.ts` — and every module it imports, so the schema
5
+ * can live in as many files as you like. See https://docs.relyio.com/schemas.
6
+ *
7
+ * `@relyio/sdk` provides the `define*` functions: install it with your package manager
8
+ * (`npm install @relyio/sdk`).
9
+ */
10
+
11
+ import { defineLocale, defineSchema } from '@relyio/sdk/schema'
12
+
13
+ import { photo } from './asset-types/photo'
14
+ import { author } from './content-types/author'
15
+ import { blogPost } from './content-types/blog-post'
16
+ import { category } from './content-types/category'
17
+ import { featuredPosts, latestPosts } from './queries'
18
+ import { blogIndex } from './singletons/blog-index'
19
+
20
+ export const schema = defineSchema({
21
+ locales: [defineLocale('en', { displayName: 'English', default: true })],
22
+ contentTypes: { author, blogPost, category },
23
+ singletonContentTypes: { blogIndex },
24
+ assetTypes: { photo },
25
+ queries: { featuredPosts, latestPosts },
26
+ })
@@ -0,0 +1,13 @@
1
+ import { defineSingleton, fields } from '@relyio/sdk/schema'
2
+
3
+ import { seoMetadata } from '../fieldsets/seo-metadata'
4
+
5
+ export const blogIndex = defineSingleton({
6
+ displayName: 'Blog Index Page',
7
+ description: 'Landing page for the blog section',
8
+ fields: {
9
+ headline: fields.shortText({ displayName: 'Headline' }),
10
+ description: fields.longText({ displayName: 'Description' }),
11
+ seo: fields.object({ of: seoMetadata, displayName: 'SEO' }),
12
+ },
13
+ })
@@ -1,5 +1,9 @@
1
1
  // next.config.ts
2
- const config = {
2
+ import { withRelyIO } from '@relyio/next/config'
3
+
4
+ // `withRelyIO` inlines the branch a host preview builds, so a pull request's preview deployment reads
5
+ // that pull request's preview: Netlify and Cloudflare give a running site no branch of its own.
6
+ export default withRelyIO({
3
7
  images: {
4
8
  loader: 'custom',
5
9
  loaderFile: './relyio-image-loader.ts',
@@ -8,5 +12,4 @@ const config = {
8
12
  deviceSizes: [600, 800, 1100, 1200, 1900, 2000, 3800],
9
13
  imageSizes: [100, 200, 300, 400],
10
14
  },
11
- }
12
- export default config
15
+ })
@@ -1,4 +0,0 @@
1
- locales:
2
- - code: "en"
3
- displayName: "English"
4
- default: true
@@ -1,11 +0,0 @@
1
- queries:
2
- - id: "featuredPosts"
3
- endpoint: "/api/featured-posts"
4
- description: "Fetches featured blog posts"
5
- fetch:
6
- contentType: "blogPost"
7
- where:
8
- isFeatured: true
9
- sort:
10
- - publishedAt: "desc"
11
- limit: 5
@@ -1,9 +0,0 @@
1
- queries:
2
- - id: "latestPosts"
3
- endpoint: "/api/latest-posts"
4
- description: "Fetches the latest blog posts"
5
- fetch:
6
- contentType: "blogPost"
7
- sort:
8
- - publishedAt: "desc"
9
- limit: 5
@@ -1,20 +0,0 @@
1
- assetTypes:
2
- - id: "photo"
3
- displayName: "Photo"
4
- displayNamePlural: "Photos"
5
- displayField: "altText"
6
- fields:
7
- - id: "altText"
8
- type: "shortText"
9
- ui:
10
- displayName: "Alt Text"
11
- image:
12
- upload:
13
- allowedMimeTypes: ["image/jpeg", "image/png", "image/webp"]
14
- maxFileSize: 10485760
15
- variants:
16
- - id: "thumb"
17
- width: 400
18
- height: 400
19
- fit: "cover"
20
- format: "webp"
@@ -1,21 +0,0 @@
1
- contentTypes:
2
- - id: "author"
3
- displayName: "Author"
4
- description: "Represents a blog author"
5
- fields:
6
- - id: "name"
7
- type: "shortText"
8
- config:
9
- required: true
10
- ui:
11
- displayName: "Author Name"
12
- - id: "bio"
13
- type: "longText"
14
- ui:
15
- displayName: "Biography"
16
- - id: "avatar"
17
- type: "reference"
18
- config:
19
- to: "photo"
20
- ui:
21
- displayName: "Profile Picture"
@@ -1,44 +0,0 @@
1
- contentTypes:
2
- - id: "blogPost"
3
- displayName: "Blog Post"
4
- description: "Defines the structure for blog articles"
5
- fields:
6
- - id: "title"
7
- type: "shortText"
8
- config:
9
- required: true
10
- ui:
11
- displayName: "Post Title"
12
- - id: "slug"
13
- type: "slug"
14
- config:
15
- sourceField: "title"
16
- unique: true
17
- ui:
18
- displayName: "Slug"
19
- - id: "body"
20
- type: "richText"
21
- ui:
22
- displayName: "Body"
23
- - id: "publishedAt"
24
- type: "date"
25
- ui:
26
- displayName: "Published Date"
27
- - id: "isFeatured"
28
- type: "boolean"
29
- config:
30
- defaultValue: false
31
- ui:
32
- displayName: "Featured"
33
- - id: "author"
34
- type: "reference"
35
- config:
36
- to: "author"
37
- ui:
38
- displayName: "Author"
39
- - id: "seo"
40
- type: "object"
41
- config:
42
- of: "seoMetadata"
43
- ui:
44
- displayName: "SEO"
@@ -1,11 +0,0 @@
1
- contentTypes:
2
- - id: "category"
3
- displayName: "Category"
4
- description: "Blog categories"
5
- fields:
6
- - id: "title"
7
- type: "shortText"
8
- config:
9
- required: true
10
- ui:
11
- displayName: "Category Title"
@@ -1,18 +0,0 @@
1
- fieldsets:
2
- - id: "seoMetadata"
3
- displayName: "SEO Metadata"
4
- fields:
5
- - id: "metaTitle"
6
- type: "shortText"
7
- ui:
8
- displayName: "Meta Title"
9
- - id: "metaDescription"
10
- type: "longText"
11
- ui:
12
- displayName: "Meta Description"
13
- - id: "openGraphImage"
14
- type: "reference"
15
- config:
16
- to: "photo"
17
- ui:
18
- displayName: "Open Graph Image"
@@ -1,4 +0,0 @@
1
- locales:
2
- - code: "en"
3
- displayName: "English"
4
- default: true
@@ -1,19 +0,0 @@
1
- singletonContentTypes:
2
- - id: "blogIndex"
3
- displayName: "Blog Index Page"
4
- description: "Landing page for the blog section"
5
- fields:
6
- - id: "headline"
7
- type: "shortText"
8
- ui:
9
- displayName: "Headline"
10
- - id: "description"
11
- type: "longText"
12
- ui:
13
- displayName: "Description"
14
- - id: "seo"
15
- type: "object"
16
- config:
17
- of: "seoMetadata"
18
- ui:
19
- displayName: "SEO"