Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ EDIT_RUNTIME_URL=http://localhost:8002
DISPLAY_RUNTIME_URL=http://localhost:8003
SERVER_RUNTIME_URL=http://localhost:8004

# AI service configuration
# If AI_UI_ENABLED is set to true, the AI service will be enabled and model id
# and secret key must be provided.
AI_UI_ENABLED=
AI_MODEL_ID=
AI_SECRET_KEY=

# Content Element env variables; TCE_ prefix is required
# Will be loaded to the server runtime
TCE_TEST=123
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ runs:
- name: Setup node to enable caching
uses: actions/setup-node@v4
with:
node-version: 22.12
node-version: 24
cache: 'pnpm'
cache-dependency-path: './pnpm-lock.yaml'
- name: Install dependencies
Expand Down
27 changes: 13 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,21 @@
"build": "pnpm -r run build",
"lint": "pnpm -r run lint && eslint .",
"lint:fix": "pnpm -r run lint --fix && eslint . --fix",
"nuke:dist": "pnpm -r run nuke:dist",
"nuke": "pnpm -r run nuke && pnpm dlx del-cli node_modules",
"test": "pnpm playwright test --config ./test/playwright.config.ts"
},
"bin": {
"@tailor-cms/tce-template": "bin/index.cjs"
},
"devDependencies": {
"@changesets/cli": "^2.27.12",
"@playwright/test": "1.50.1",
"@tailor-cms/eslint-config": "0.0.3",
"@tailor-cms/tce-boot": "1.1.0",
"@types/node": "^22.13.1",
"concurrently": "^9.1.2",
"dotenv": "^16.4.7",
"eslint": "^9.28.0",
"prettier": "3.5.0",
"typescript": "^5.7.3"
"@changesets/cli": "^2.29.5",
"@playwright/test": "1.53.2",
"@tailor-cms/cek-e2e": "^1.3.2",
"@tailor-cms/eslint-config": "1.1.2",
"@tailor-cms/tce-boot": "1.3.2",
"@types/node": "^24.0.12",
"dotenv": "^17.1.0",
"eslint": "^9.30.1",
"prettier": "^3.6.2",
"typescript": "^5.8.3"
},
"packageManager": "pnpm@9.0.6+sha512.f6d863130973207cb7a336d6b439a242a26ac8068077df530d6a86069419853dc1ffe64029ec594a9c505a3a410d19643c870aba6776330f5cfddcf10a9c1617"
"packageManager": "pnpm@10.12.3"
}
4 changes: 0 additions & 4 deletions packages/display/.prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions packages/display/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @tailor-cms/ce-file-display

## 0.1.0

### Minor Changes

- Migrates package to the latest tce-boot version, adds AI config and devcontainers. Updates dependencies to the latest versions.
21 changes: 12 additions & 9 deletions packages/display/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Tailor CMS file end-user component",
"author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
"type": "module",
"version": "0.0.1",
"version": "0.1.0",
"exports": {
".": {
"import": "./dist/index.js",
Expand All @@ -17,20 +17,23 @@
],
"scripts": {
"dev": "vite build --watch",
"build": "vue-tsc && vite build",
"lint": "eslint --ext .js,.ts,.vue ./src",
"lint:fix": "pnpm lint --fix"
"build": "pnpm nuke:dist && vue-tsc && vite build",
"lint": "eslint ./src",
"lint:fix": "pnpm lint --fix",
"nuke": "pnpm dlx del-cli dist node_modules",
"nuke:dist": "pnpm dlx del-cli dist",
"prepublish": "pnpm build"
},
"peerDependencies": {
"vue": "^3.5.13"
},
"devDependencies": {
"@tailor-cms/ce-file-manifest": "workspace:*",
"@tailor-cms/eslint-config": "0.0.3",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "^5.7.3",
"vite": "^6.1.0",
"vue-tsc": "^2.2.0"
"@tailor-cms/eslint-config": "1.1.2",
"@vitejs/plugin-vue": "^6.0.0",
"typescript": "^5.8.3",
"vite": "^7.0.3",
"vue-tsc": "^3.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 4 additions & 4 deletions packages/display/src/components/Display.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@

<script setup lang="ts">
import { computed } from 'vue';
import { ElementData } from '@tailor-cms/ce-file-manifest';
import { Element } from '@tailor-cms/ce-file-manifest';

const props = defineProps<{ id: number; data: ElementData; userState: any }>();
const props = defineProps<{ element: Element; userState: any }>();

const label = computed(() => {
const { data } = props;
const { data } = props.element;
return data.label || 'Download file';
});

const downloadFile = async () => {
const { data } = props;
const { data } = props.element;
const { url } = data;
if (!url) return;
const res = await fetch(url);
Expand Down
4 changes: 0 additions & 4 deletions packages/edit/.prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions packages/edit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @tailor-cms/ce-file-edit

## 0.1.0

### Minor Changes

- Migrates package to the latest tce-boot version, adds AI config and devcontainers. Updates dependencies to the latest versions.
27 changes: 15 additions & 12 deletions packages/edit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Tailor CMS file authoring component",
"author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
"type": "module",
"version": "0.0.1",
"version": "0.1.0",
"exports": {
".": {
"import": "./dist/index.js",
Expand All @@ -17,25 +17,28 @@
],
"scripts": {
"dev": "vite build --watch",
"build": "vue-tsc && vite build",
"lint": "eslint --ext .js,.ts,.vue ./src",
"lint:fix": "pnpm lint --fix"
"build": "pnpm nuke:dist && vue-tsc && vite build",
"lint": "eslint ./src",
"lint:fix": "pnpm lint --fix",
"nuke": "pnpm dlx del-cli dist node_modules",
"nuke:dist": "pnpm dlx del-cli dist",
"prepublish": "pnpm build"
},
"peerDependencies": {
"vue": "^3.5.13"
},
"devDependencies": {
"@tailor-cms/ce-file-manifest": "workspace:*",
"@tailor-cms/eslint-config": "0.0.3",
"@types/lodash": "^4.17.6",
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "^5.7.3",
"vite": "^6.1.0",
"vue-tsc": "^2.2.0"
"@tailor-cms/eslint-config": "1.1.2",
"@types/lodash-es": "^4.17.12",
"@vitejs/plugin-vue": "^6.0.0",
"typescript": "^5.8.3",
"vite": "^7.0.3",
"vue-tsc": "^3.0.1"
},
"dependencies": {
"@tailor-cms/core-components": "^1.0.35",
"lodash": "^4.17.21"
"@tailor-cms/core-components": "^1.2.0",
"lodash-es": "^4.17.21"
},
"publishConfig": {
"access": "public"
Expand Down
5 changes: 3 additions & 2 deletions packages/edit/src/components/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ElementPlaceholder
v-if="!element.data.url"
:icon="manifest.ui.icon"
:is-disabled="isDisabled"
:is-disabled="isReadonly"
:is-focused="isFocused"
:name="`${manifest.name} component`"
active-icon="mdi-arrow-up"
Expand All @@ -30,8 +30,9 @@ import manifest from '@tailor-cms/ce-file-manifest';

const props = defineProps<{
element: Element;
isDragged: boolean;
isFocused: boolean;
isDisabled: boolean;
isReadonly: boolean;
}>();

const downloadFile = async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/edit/src/components/TopToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script setup lang="ts">
import { defineEmits, defineProps } from 'vue';
import { AssetInput } from '@tailor-cms/core-components';
import cloneDeep from 'lodash/cloneDeep';
import { cloneDeep } from 'lodash-es';
import type { Element } from '@tailor-cms/ce-file-manifest';

const props = defineProps<{ element: Element }>();
Expand Down
4 changes: 0 additions & 4 deletions packages/manifest/.prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions packages/manifest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @tailor-cms/ce-file-manifest

## 0.1.0

### Minor Changes

- Migrates package to the latest tce-boot version, adds AI config and devcontainers. Updates dependencies to the latest versions.
18 changes: 11 additions & 7 deletions packages/manifest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Tailor CMS file manifest",
"author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
"type": "module",
"version": "0.0.1",
"version": "0.1.0",
"exports": {
".": {
"import": "./dist/index.js",
Expand All @@ -17,14 +17,18 @@
],
"scripts": {
"dev": "tsup --watch",
"build": "tsup",
"lint": "eslint --ext .js,.ts .",
"lint:fix": "pnpm lint --fix"
"build": "pnpm nuke:dist && tsup",
"lint": "eslint .",
"lint:fix": "pnpm lint --fix",
"nuke": "pnpm dlx del-cli dist node_modules",
"nuke:dist": "pnpm dlx del-cli dist",
"prepublish": "pnpm build"
},
"devDependencies": {
"@tailor-cms/eslint-config": "0.0.3",
"tsup": "^8.3.6",
"typescript": "^5.7.3"
"@tailor-cms/cek-common": "^1.3.2",
"@tailor-cms/eslint-config": "1.1.2",
"tsup": "^8.5.0",
"typescript": "^5.8.3"
},
"tsup": {
"entry": [
Expand Down
46 changes: 6 additions & 40 deletions packages/manifest/src/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,46 +1,12 @@
export interface ElementData {
import type * as common from '@tailor-cms/cek-common';

export interface ElementData extends common.ElementConfig {
url: string | null;
name: string | null;
label: string | null;
assets: { url?: string };
}

export interface Element {
id: number;
uid: string;
activityId: number;
repositoryId: number;
contentId: string;
contentSignature: string;
type: string;
position: number;
data: ElementData;
meta: { [key: string]: unknown };
refs: { [key: string]: unknown };
linked: boolean;
detached: boolean;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
}

export type DataInitializer = () => ElementData;

export interface ElementManifest {
type: string;
version: string;
name: string;
ssr: boolean;
initState: DataInitializer;
Edit?: object;
TopToolbar?: object;
SideToolbar?: object;
Display?: object;
ui: {
icon: string;
forceFullWidth: boolean;
};
mocks?: {
displayContexts: Array<{ name: string; data: any }>;
};
}
export type DataInitializer = common.DataInitializer<ElementData>;
export type Element = common.Element<ElementData>;
export type ElementManifest = common.ElementManifest<ElementData>;
4 changes: 0 additions & 4 deletions packages/server/.prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions packages/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @tailor-cms/ce-file-server

## 0.1.0

### Minor Changes

- Migrates package to the latest tce-boot version, adds AI config and devcontainers. Updates dependencies to the latest versions.
19 changes: 11 additions & 8 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Tailor CMS file server component",
"author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
"type": "module",
"version": "0.0.1",
"version": "0.1.0",
"exports": {
".": {
"import": "./dist/index.js",
Expand All @@ -17,16 +17,19 @@
],
"scripts": {
"dev": "tsup --watch src --watch ../manifest/dist",
"build": "tsup",
"lint": "eslint --ext .js,.ts .",
"lint:fix": "pnpm lint --fix"
"build": "pnpm nuke:dist && tsup",
"lint": "eslint .",
"lint:fix": "pnpm lint --fix",
"nuke": "pnpm dlx del-cli dist node_modules",
"nuke:dist": "pnpm dlx del-cli dist",
"prepublish": "pnpm build"
},
"devDependencies": {
"@tailor-cms/ce-file-manifest": "workspace:*",
"@tailor-cms/cek-common": "^0.0.4",
"@tailor-cms/eslint-config": "0.0.3",
"tsup": "^8.3.6",
"typescript": "^5.7.3"
"@tailor-cms/cek-common": "^1.3.2",
"@tailor-cms/eslint-config": "1.1.2",
"tsup": "^8.5.0",
"typescript": "^5.8.3"
},
"tsup": {
"entry": [
Expand Down
Loading
Loading