Skip to content

Commit 48ced6d

Browse files
committed
wip: release and var fixes -d
1 parent 5ab9b2c commit 48ced6d

File tree

16 files changed

+187
-108
lines changed

16 files changed

+187
-108
lines changed

.github/workflows/release.yml

+65-63
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ env:
4545
GH_TOKEN: ${{secrets.GH_TOKEN}}
4646
jobs:
4747
test:
48-
if: 'contains(github.event.head_commit.message, ''-release'') == true'
48+
if: 'contains(github.event.head_commit.message, ''-d'') == true'
4949
env:
5050
REDIS_URL: redis://localhost:6379
5151
CLICKHOUSE_URL: http://default:@localhost:8123
5252
POSTGRES_URL: http://test:test@localhost:5432/test
53-
SHOULD_RELEASE: ${{ contains(github.event.head_commit.message, '-release') }}
53+
SHOULD_RELEASE: ${{ contains(github.event.head_commit.message, '-d') }}
5454
name: build and test
5555
runs-on: ubuntu-latest
5656
steps:
@@ -88,73 +88,75 @@ jobs:
8888
- name: Install Deps
8989
run: pnpm -v && pnpm i && pnpm rebuild --recursive
9090

91+
- name: Install Playwright Browsers
92+
run: npx playwright install
93+
94+
- name: Run Docker Compose (DB)
95+
run: docker-compose -f ./docker/docker-compose.yml pull && docker-compose -f ./docker/docker-compose.yml up --build -d
96+
97+
- name: Create Tables
98+
run: npm -w @fiction/www exec -- fiction run generate
99+
100+
- name: Run Type Check
101+
run: npm run types:ci
102+
103+
- name: BUILD unit tests
104+
env:
105+
NODE_OPTIONS: --max_old_space_size=4096
106+
run: npm exec -- vitest run build -u --no-file-parallelism
107+
108+
- name: SPOT tests
109+
run: npm exec -- vitest run @fiction/core/plugin-user/test/userUpdate.ci.test.ts -u
110+
111+
- name: STABLE unit tests
112+
run: npm exec -- vitest run ci -u
113+
114+
- name: E2E/UI unit tests
115+
run: npm exec -- vitest run e2e -u
116+
117+
- name: Install Build Packages
118+
if: env.SHOULD_RELEASE
119+
run: pnpm add tsup cross-env --global
120+
121+
- name: Build Bundles
122+
if: env.SHOULD_RELEASE
123+
run: npm exec -- fiction run bundle
124+
125+
- name: Render Apps
126+
if: env.SHOULD_RELEASE
127+
run: npm exec -- fiction run render
128+
129+
- name: Install FlyCtl
130+
if: env.SHOULD_RELEASE
131+
uses: superfly/flyctl-actions/setup-flyctl@master
132+
133+
- name: DIST unit tests
134+
if: env.SHOULD_RELEASE
135+
run: npm exec -- vitest run dist -u
136+
91137
- name: Debug Git Config
138+
if: env.SHOULD_RELEASE
92139
run: |
93140
git config --list
94141
git remote -v
95142
96143
- name: Release Code
144+
if: env.SHOULD_RELEASE
97145
run: |
98146
npm run i:lockfile && npm run release
99147
100-
# - name: Install Playwright Browsers
101-
# run: npx playwright install
102-
103-
# - name: Run Docker Compose (DB)
104-
# run: docker-compose -f ./docker/docker-compose.yml pull && docker-compose -f ./docker/docker-compose.yml up --build -d
105-
106-
# - name: Create Tables
107-
# run: npm -w @fiction/www exec -- fiction run generate
108-
109-
# - name: Run Type Check
110-
# run: npm run types:ci
111-
112-
# - name: BUILD unit tests
113-
# env:
114-
# NODE_OPTIONS: --max_old_space_size=4096
115-
# run: npm exec -- vitest run build -u --no-file-parallelism
116-
117-
# - name: SPOT tests
118-
# run: npm exec -- vitest run @fiction/core/plugin-user/test/userUpdate.ci.test.ts -u
119-
120-
# - name: STABLE unit tests
121-
# run: npm exec -- vitest run ci -u
122-
123-
# - name: E2E/UI unit tests
124-
# run: npm exec -- vitest run e2e -u
125-
126-
# - name: Install Build Packages
127-
# if: env.SHOULD_RELEASE
128-
# run: pnpm add tsup cross-env --global
129-
130-
# - name: Build Bundles
131-
# if: env.SHOULD_RELEASE
132-
# run: npm exec -- fiction run bundle
133-
134-
# - name: Render Apps
135-
# if: env.SHOULD_RELEASE
136-
# run: npm exec -- fiction run render
137-
138-
# - name: Install FlyCtl
139-
# if: env.SHOULD_RELEASE
140-
# uses: superfly/flyctl-actions/setup-flyctl@master
141-
142-
# - name: DIST unit tests
143-
# if: env.SHOULD_RELEASE
144-
# run: npm exec -- vitest run dist -u
145-
146-
# - name: Post Notification
147-
# if: failure()
148-
# id: slack
149-
# uses: slackapi/[email protected]
150-
# with:
151-
# # This data can be any valid JSON from a previous step in the GitHub Action
152-
# payload: |
153-
# {
154-
# "icon_emoji": "${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}",
155-
# "username": "supereon",
156-
# "channel": "#notify",
157-
# "text": "Workflow *${{ github.workflow }}* on *${{ github.ref }}* (commit: ${{ github.sha }}) completed with status: *${{ job.status }}*. <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run>"
158-
# }
159-
# env:
160-
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
148+
- name: Post Notification
149+
if: failure()
150+
id: slack
151+
uses: slackapi/[email protected]
152+
with:
153+
# This data can be any valid JSON from a previous step in the GitHub Action
154+
payload: |
155+
{
156+
"icon_emoji": "${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}",
157+
"username": "supereon",
158+
"channel": "#notify",
159+
"text": "Workflow *${{ github.workflow }}* on *${{ github.ref }}* (commit: ${{ github.sha }}) completed with status: *${{ job.status }}*. <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run>"
160+
}
161+
env:
162+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

.gitignore

+41-27
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,60 @@
1+
# General directories and files
12
/xcache
3+
cache/
4+
dist/
5+
rendered/
6+
temp/
7+
*.log
8+
*.retry
9+
coverage/
210

3-
dist
4-
**/dist
5-
**/rendered
11+
# Environment files and directories
12+
.env*
13+
config/*.secret
614

15+
# Node.js related
16+
node_modules/
717
.DS_Store
8-
**/node_modules/**
9-
coverage
10-
temp
11-
temp.*
12-
explorations
13-
TODOs.md
14-
15-
.env
16-
.env*
17-
**/.env
18-
**/.env*
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*
21+
package-lock.json
22+
yarn.lock
1923

20-
# Package Publishing
21-
.publish
24+
# Vite and Vitepress
25+
.vitepress/dist
26+
.vitepress/cache
27+
dist/ # Vite build output
2228

23-
# Vitepress
24-
**/.vitepress/dist
25-
**/.vitepress/cache
29+
# Package Publishing
30+
.publish/
2631

27-
# wireguard/tunnels
32+
# Wireguard/Tunnels
2833
wire.*
2934

30-
# debugging
35+
# Debugging
3136
.ts-node
3237
*.log
38+
chrome_debug.log
3339

34-
# Local .terraform directories
35-
**/.terraform
36-
37-
# .tfstate files
40+
# Terraform
41+
**/.terraform/
3842
*.tfstate
3943
*.tfstate.*
4044

4145
# Ansible/Python
4246
.venv/
43-
.venv*/
44-
*.retry
47+
**/__pycache__/
48+
*.py[cod] # Compiled python files
4549
/___*.yml
4650

51+
# IDEs and editors
52+
/.idea/
53+
/.vscode/
54+
*.sublime-workspace
55+
*.sublime-project
56+
57+
# Operating System generated files
58+
Thumbs.db
59+
ehthumbs.db
60+
Desktop.ini

@fiction/platform/index.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { FictionEnv, FictionPluginSettings } from '@fiction/core'
2+
import { FictionPlugin } from '@fiction/core'
3+
4+
export * from '@fiction/core'
5+
export * from '@fiction/site'
6+
export * from '@fiction/cards'
7+
export * from '@fiction/ui'
8+
9+
export type SitesPluginSettings = {
10+
fictionEnv: FictionEnv
11+
} & FictionPluginSettings
12+
13+
export class FictionPlatform extends FictionPlugin<SitesPluginSettings> {}

@fiction/platform/package.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"dependencies": {
3+
"@fiction/cards": "workspace:*",
4+
"@fiction/core": "workspace:*",
5+
"@fiction/site": "workspace:*",
6+
"@fiction/theme-admin": "workspace:*",
7+
"@fiction/theme-fiction": "workspace:*",
8+
"@fiction/theme-minimal": "workspace:*",
9+
"@fiction/ui": "workspace:*"
10+
11+
},
12+
"license": "GPL-2.0-only",
13+
"main": "src/index.ts",
14+
"name": "@fiction/platform",
15+
"publishConfig": {
16+
"access": "public"
17+
},
18+
"type": "module",
19+
"url": "https://www.fiction.com",
20+
"version": "6.0.25"
21+
}

@fiction/plugins/plugin-stripe/test/stripe.test.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ import { createTestUtils } from '@fiction/core/test-utils/init'
88
import { beforeAll, describe, expect, it } from 'vitest'
99
import { FictionStripe } from '../plugin'
1010

11-
let customer: Stripe.Customer | Stripe.DeletedCustomer | undefined
1211
let orgId: string | undefined
13-
let setupIntent: Stripe.SetupIntent | undefined
14-
let subscription: Stripe.Subscription | undefined
15-
const key = (): string => Math.random().toString().slice(2, 8)
1612

1713
// const testUtils: TestUtils | undefined = undefined
1814
let testUtils: TestUtils & { fictionStripe: FictionStripe }
1915
describe('stripe tests', () => {
16+
let _customer: Stripe.Customer | Stripe.DeletedCustomer | undefined
2017
beforeAll(async () => {
2118
const utils = createTestUtils()
2219

@@ -70,7 +67,7 @@ describe('stripe tests', () => {
7067

7168
expect(status).toBe('success')
7269
expect(data?.id).toBeTruthy()
73-
customer = data
70+
_customer = data
7471
})
7572

7673
it('gets the customer', async () => {

@fiction/themes/cards/pricing/ElCard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const colClass = vue.computed(() => {
7272
{{ price.desc }}
7373
</p>
7474
<ul role="list" class="mt-6 space-y-3 text-lg leading-6 text-theme-100">
75-
<li v-for="(feature, i) in price.features" :key="i" class="flex gap-x-3 items-center">
75+
<li v-for="(feature, ii) in price.features" :key="ii" class="flex gap-x-3 items-center">
7676
<svg class="size-6 flex-none dark:text-theme-600 text-primary-500" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
7777
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd" />
7878
</svg>

@fiction/themes/cards/tailwind.config.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import type { Config } from 'tailwindcss'
22

33
export default {
44
content: [],
5-
theme: {
6-
extend: {},
7-
},
5+
theme: { extend: {} },
86
plugins: [],
97
} satisfies Config

@fiction/themes/fiction/developer/el/ElCard.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ defineProps({
1616
required: true,
1717
},
1818
})
19-
const x = 1
19+
20+
const link = 'https://docs.fiction.com'
2021
</script>
2122

2223
<template>
@@ -58,7 +59,7 @@ const x = 1
5859
building personal marketing tools.
5960
</p>
6061
<div class="mt-10 flex items-center gap-x-6">
61-
<ElButton btn="primary" href="https://docs.fiction.com" size="lg">
62+
<ElButton btn="primary" :href="link" size="lg">
6263
View Developer Docs
6364
</ElButton>
6465

@fiction/www/tailwind.config.cjs

-4
This file was deleted.

docs/.vitepress/theme/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import type { Theme } from 'vitepress'
32
import DefaultTheme from 'vitepress/theme'
43
import './vars.css'

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@fiction/ui",
4949
"@fiction/www",
5050
"@fiction/site",
51+
"@fiction/platform",
5152
"@fiction/themes/*",
5253
"@fiction/plugins/*"
5354
],
@@ -85,6 +86,7 @@
8586
"vue-router": "^4.3.0"
8687
},
8788
"devDependencies": {
89+
"tailwindcss": "^3.4.3",
8890
"@antfu/eslint-config": "^2.13.3",
8991
"@benasher44/eslint-plugin-implicit-dependencies": "^1.1.3",
9092
"@codspeed/vitest-plugin": "^3.1.0",

pin.png

-89.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)