zylaris 1.0.2
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/LICENSE +21 -0
- package/README.md +558 -0
- package/Zylaris.js.png +0 -0
- package/examples/default/index.html +13 -0
- package/examples/default/package.json +23 -0
- package/examples/default/src/app/about/page.tsx +18 -0
- package/examples/default/src/app/counter/page.tsx +22 -0
- package/examples/default/src/app/global.css +225 -0
- package/examples/default/src/app/layout.tsx +33 -0
- package/examples/default/src/app/page.tsx +14 -0
- package/examples/default/src/entry-client.tsx +87 -0
- package/examples/default/src/entry-server.tsx +52 -0
- package/examples/default/src/router.ts +60 -0
- package/examples/default/tsconfig.json +28 -0
- package/examples/default/zylaris.config.ts +24 -0
- package/package.json +34 -0
- package/packages/adapter/package.json +59 -0
- package/packages/adapter/src/adapters/bun.ts +215 -0
- package/packages/adapter/src/adapters/cloudflare.ts +278 -0
- package/packages/adapter/src/adapters/deno.ts +219 -0
- package/packages/adapter/src/adapters/netlify.ts +274 -0
- package/packages/adapter/src/adapters/node.ts +155 -0
- package/packages/adapter/src/adapters/static.ts +134 -0
- package/packages/adapter/src/adapters/vercel.ts +239 -0
- package/packages/adapter/src/index.ts +115 -0
- package/packages/adapter/src/lib/builder.ts +361 -0
- package/packages/adapter/src/types.ts +191 -0
- package/packages/adapter/tsconfig.json +8 -0
- package/packages/cli/package.json +43 -0
- package/packages/cli/src/bin.ts +107 -0
- package/packages/cli/src/commands/build.ts +197 -0
- package/packages/cli/src/commands/create.ts +222 -0
- package/packages/cli/src/commands/deploy.ts +90 -0
- package/packages/cli/src/commands/dev.ts +108 -0
- package/packages/cli/src/index.ts +6 -0
- package/packages/cli/tsconfig.json +9 -0
- package/packages/compiler/package.json +39 -0
- package/packages/compiler/src/index.ts +210 -0
- package/packages/compiler/src/jit.ts +187 -0
- package/packages/compiler/tsconfig.json +9 -0
- package/packages/core/package.json +55 -0
- package/packages/core/src/components.test.ts +125 -0
- package/packages/core/src/components.ts +181 -0
- package/packages/core/src/config.ts +204 -0
- package/packages/core/src/hooks.ts +142 -0
- package/packages/core/src/index.ts +59 -0
- package/packages/core/src/jsx-runtime.ts +46 -0
- package/packages/core/tsconfig.json +16 -0
- package/packages/dev-server/package.json +51 -0
- package/packages/dev-server/src/index.ts +306 -0
- package/packages/dev-server/src/jit-middleware.ts +78 -0
- package/packages/dev-server/tsconfig.json +9 -0
- package/packages/plugins/package.json +44 -0
- package/packages/plugins/src/cdn/loader.ts +275 -0
- package/packages/plugins/src/index.ts +238 -0
- package/packages/plugins/src/loaders/auto-import.ts +219 -0
- package/packages/plugins/src/loaders/external.ts +332 -0
- package/packages/plugins/src/transforms/index.ts +407 -0
- package/packages/plugins/src/types.ts +296 -0
- package/packages/plugins/tsconfig.json +8 -0
- package/packages/reactivity/package.json +36 -0
- package/packages/reactivity/src/computed.d.ts +3 -0
- package/packages/reactivity/src/computed.d.ts.map +1 -0
- package/packages/reactivity/src/computed.js +64 -0
- package/packages/reactivity/src/computed.js.map +1 -0
- package/packages/reactivity/src/computed.test.ts +83 -0
- package/packages/reactivity/src/computed.ts +69 -0
- package/packages/reactivity/src/index.d.ts +6 -0
- package/packages/reactivity/src/index.d.ts.map +1 -0
- package/packages/reactivity/src/index.js +7 -0
- package/packages/reactivity/src/index.js.map +1 -0
- package/packages/reactivity/src/index.ts +18 -0
- package/packages/reactivity/src/resource.d.ts +6 -0
- package/packages/reactivity/src/resource.d.ts.map +1 -0
- package/packages/reactivity/src/resource.js +43 -0
- package/packages/reactivity/src/resource.js.map +1 -0
- package/packages/reactivity/src/resource.test.ts +70 -0
- package/packages/reactivity/src/resource.ts +59 -0
- package/packages/reactivity/src/signal.d.ts +7 -0
- package/packages/reactivity/src/signal.d.ts.map +1 -0
- package/packages/reactivity/src/signal.js +145 -0
- package/packages/reactivity/src/signal.js.map +1 -0
- package/packages/reactivity/src/signal.test.ts +130 -0
- package/packages/reactivity/src/signal.ts +207 -0
- package/packages/reactivity/src/store.d.ts +4 -0
- package/packages/reactivity/src/store.d.ts.map +1 -0
- package/packages/reactivity/src/store.js +62 -0
- package/packages/reactivity/src/store.js.map +1 -0
- package/packages/reactivity/src/store.test.ts +38 -0
- package/packages/reactivity/src/store.ts +111 -0
- package/packages/reactivity/src/types.d.ts +43 -0
- package/packages/reactivity/src/types.d.ts.map +1 -0
- package/packages/reactivity/src/types.js +3 -0
- package/packages/reactivity/src/types.js.map +1 -0
- package/packages/reactivity/src/types.ts +43 -0
- package/packages/reactivity/tsconfig.json +9 -0
- package/packages/router/package.json +44 -0
- package/packages/router/src/components.tsx +150 -0
- package/packages/router/src/fs-router.ts +163 -0
- package/packages/router/src/index.ts +22 -0
- package/packages/router/src/router.test.ts +111 -0
- package/packages/router/src/router.ts +112 -0
- package/packages/router/src/types.ts +69 -0
- package/packages/router/tsconfig.json +10 -0
- package/packages/server/package.json +41 -0
- package/packages/server/src/action.test.ts +102 -0
- package/packages/server/src/action.ts +201 -0
- package/packages/server/src/api.ts +143 -0
- package/packages/server/src/index.ts +18 -0
- package/packages/server/src/types.ts +72 -0
- package/packages/server/tsconfig.json +9 -0
- package/pnpm-workspace.yaml +4 -0
- package/scripts/publish.ps1 +138 -0
- package/scripts/publish.sh +142 -0
- package/tsconfig.json +28 -0
- package/turbo.json +24 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Zylaris NPM Publish Script (PowerShell)
|
|
2
|
+
# Usage: .\scripts\publish.ps1 [version] [-DryRun]
|
|
3
|
+
|
|
4
|
+
param(
|
|
5
|
+
[string]$Version = "patch",
|
|
6
|
+
[switch]$DryRun
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
# Colors
|
|
10
|
+
$Red = "`e[31m"
|
|
11
|
+
$Green = "`e[32m"
|
|
12
|
+
$Yellow = "`e[33m"
|
|
13
|
+
$Blue = "`e[34m"
|
|
14
|
+
$Reset = "`e[0m"
|
|
15
|
+
|
|
16
|
+
# Check if npm is logged in
|
|
17
|
+
try {
|
|
18
|
+
$npmUser = npm whoami 2>$null
|
|
19
|
+
} catch {
|
|
20
|
+
Write-Host "${Red}Error: Not logged in to npm${Reset}"
|
|
21
|
+
Write-Host "Please run: npm login"
|
|
22
|
+
exit 1
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Write-Host "${Blue}🚀 Zylaris NPM Publish Script${Reset}"
|
|
26
|
+
Write-Host ""
|
|
27
|
+
Write-Host "${Blue}📦 NPM User:${Reset} $npmUser"
|
|
28
|
+
Write-Host ""
|
|
29
|
+
|
|
30
|
+
# Function to publish package
|
|
31
|
+
function Publish-Package {
|
|
32
|
+
param(
|
|
33
|
+
[string]$PackageName,
|
|
34
|
+
[string]$PackagePath
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
if (-not (Test-Path $PackagePath)) {
|
|
38
|
+
Write-Host "${Yellow}⚠ Skipping $PackageName (not found)${Reset}"
|
|
39
|
+
return
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
Write-Host "${Blue}📦 Publishing @zylaris/$PackageName...${Reset}"
|
|
43
|
+
|
|
44
|
+
Push-Location $PackagePath
|
|
45
|
+
|
|
46
|
+
if ($DryRun) {
|
|
47
|
+
npm publish --dry-run --access public
|
|
48
|
+
} else {
|
|
49
|
+
npm publish --access public
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
Pop-Location
|
|
53
|
+
|
|
54
|
+
Write-Host "${Green}✅ Published @zylaris/$PackageName${Reset}"
|
|
55
|
+
Write-Host ""
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
# Build all packages first
|
|
59
|
+
Write-Host "${Blue}🔨 Building all packages...${Reset}"
|
|
60
|
+
pnpm run build
|
|
61
|
+
Write-Host ""
|
|
62
|
+
|
|
63
|
+
# Update versions (if not dry run)
|
|
64
|
+
if (-not $DryRun -and $Version -ne "--dry-run") {
|
|
65
|
+
Write-Host "${Blue}📝 Bumping versions ($Version)...${Reset}"
|
|
66
|
+
|
|
67
|
+
$packages = @("core", "cli", "compiler", "dev-server", "reactivity", "router", "server", "adapter", "plugins")
|
|
68
|
+
foreach ($pkg in $packages) {
|
|
69
|
+
$pkgPath = "packages/$pkg"
|
|
70
|
+
if (Test-Path $pkgPath) {
|
|
71
|
+
Push-Location $pkgPath
|
|
72
|
+
npm version $Version --no-git-tag-version
|
|
73
|
+
Pop-Location
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
Write-Host "${Green}✅ Versions updated${Reset}"
|
|
78
|
+
Write-Host ""
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
# Publish order (dependencies first)
|
|
82
|
+
Write-Host "${Yellow}📤 Publishing packages in order...${Reset}"
|
|
83
|
+
Write-Host ""
|
|
84
|
+
|
|
85
|
+
# 1. Reactivity (no dependencies)
|
|
86
|
+
Publish-Package -PackageName "reactivity" -PackagePath "packages/reactivity"
|
|
87
|
+
|
|
88
|
+
# 2. Router (depends on reactivity)
|
|
89
|
+
Publish-Package -PackageName "router" -PackagePath "packages/router"
|
|
90
|
+
|
|
91
|
+
# 3. Server (no internal deps)
|
|
92
|
+
Publish-Package -PackageName "server" -PackagePath "packages/server"
|
|
93
|
+
|
|
94
|
+
# 4. Compiler (no internal deps)
|
|
95
|
+
Publish-Package -PackageName "compiler" -PackagePath "packages/compiler"
|
|
96
|
+
|
|
97
|
+
# 5. Dev Server (depends on compiler)
|
|
98
|
+
Publish-Package -PackageName "dev-server" -PackagePath "packages/dev-server"
|
|
99
|
+
|
|
100
|
+
# 6. Adapter (depends on server)
|
|
101
|
+
Publish-Package -PackageName "adapter" -PackagePath "packages/adapter"
|
|
102
|
+
|
|
103
|
+
# 7. Plugins (depends on compiler)
|
|
104
|
+
Publish-Package -PackageName "plugins" -PackagePath "packages/plugins"
|
|
105
|
+
|
|
106
|
+
# 8. CLI (depends on dev-server, adapter)
|
|
107
|
+
Publish-Package -PackageName "cli" -PackagePath "packages/cli"
|
|
108
|
+
|
|
109
|
+
# 9. Core (zylaris) - depends on reactivity, router
|
|
110
|
+
Write-Host "${Blue}📦 Publishing zylaris (core)...${Reset}"
|
|
111
|
+
Push-Location "packages/core"
|
|
112
|
+
if ($DryRun) {
|
|
113
|
+
npm publish --dry-run --access public
|
|
114
|
+
} else {
|
|
115
|
+
npm publish --access public
|
|
116
|
+
}
|
|
117
|
+
Pop-Location
|
|
118
|
+
Write-Host "${Green}✅ Published zylaris${Reset}"
|
|
119
|
+
Write-Host ""
|
|
120
|
+
|
|
121
|
+
# Summary
|
|
122
|
+
Write-Host "${Green}🎉 All packages published successfully!${Reset}"
|
|
123
|
+
Write-Host ""
|
|
124
|
+
Write-Host "${Blue}Published packages:${Reset}"
|
|
125
|
+
Write-Host " - zylaris"
|
|
126
|
+
Write-Host " - @zylaris/cli"
|
|
127
|
+
Write-Host " - @zylaris/compiler"
|
|
128
|
+
Write-Host " - @zylaris/dev-server"
|
|
129
|
+
Write-Host " - @zylaris/reactivity"
|
|
130
|
+
Write-Host " - @zylaris/router"
|
|
131
|
+
Write-Host " - @zylaris/server"
|
|
132
|
+
Write-Host " - @zylaris/adapter"
|
|
133
|
+
Write-Host " - @zylaris/plugins"
|
|
134
|
+
Write-Host ""
|
|
135
|
+
Write-Host "${Blue}Install with:${Reset}"
|
|
136
|
+
Write-Host " npm install zylaris"
|
|
137
|
+
Write-Host " # or"
|
|
138
|
+
Write-Host " npm install -g @zylaris/cli"
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Zylaris NPM Publish Script
|
|
4
|
+
# Usage: ./scripts/publish.sh [version] [--dry-run]
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
# Colors
|
|
9
|
+
RED='\033[0;31m'
|
|
10
|
+
GREEN='\033[0;32m'
|
|
11
|
+
YELLOW='\033[1;33m'
|
|
12
|
+
BLUE='\033[0;34m'
|
|
13
|
+
NC='\033[0m' # No Color
|
|
14
|
+
|
|
15
|
+
# Check if npm is logged in
|
|
16
|
+
if ! npm whoami &> /dev/null; then
|
|
17
|
+
echo -e "${RED}Error: Not logged in to npm${NC}"
|
|
18
|
+
echo "Please run: npm login"
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# Get version bump type
|
|
23
|
+
VERSION_TYPE=${1:-patch}
|
|
24
|
+
DRY_RUN=false
|
|
25
|
+
|
|
26
|
+
if [ "$2" = "--dry-run" ]; then
|
|
27
|
+
DRY_RUN=true
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
echo -e "${BLUE}🚀 Zylaris NPM Publish Script${NC}"
|
|
31
|
+
echo ""
|
|
32
|
+
|
|
33
|
+
# Check current npm user
|
|
34
|
+
echo -e "${BLUE}📦 NPM User:${NC} $(npm whoami)"
|
|
35
|
+
echo ""
|
|
36
|
+
|
|
37
|
+
# Function to publish package
|
|
38
|
+
publish_package() {
|
|
39
|
+
local pkg=$1
|
|
40
|
+
local pkg_path="packages/$pkg"
|
|
41
|
+
|
|
42
|
+
if [ ! -d "$pkg_path" ]; then
|
|
43
|
+
echo -e "${YELLOW}⚠ Skipping $pkg (not found)${NC}"
|
|
44
|
+
return
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
echo -e "${BLUE}📦 Publishing @zylaris/$pkg...${NC}"
|
|
48
|
+
|
|
49
|
+
cd "$pkg_path"
|
|
50
|
+
|
|
51
|
+
if [ "$DRY_RUN" = true ]; then
|
|
52
|
+
npm publish --dry-run --access public
|
|
53
|
+
else
|
|
54
|
+
npm publish --access public
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
cd - > /dev/null
|
|
58
|
+
|
|
59
|
+
echo -e "${GREEN}✅ Published @zylaris/$pkg${NC}"
|
|
60
|
+
echo ""
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# Build all packages first
|
|
64
|
+
echo -e "${BLUE}🔨 Building all packages...${NC}"
|
|
65
|
+
pnpm run build
|
|
66
|
+
echo ""
|
|
67
|
+
|
|
68
|
+
# Update versions (if not dry run)
|
|
69
|
+
if [ "$DRY_RUN" = false ] && [ "$VERSION_TYPE" != "--dry-run" ]; then
|
|
70
|
+
echo -e "${BLUE}📝 Bumping versions ($VERSION_TYPE)...${NC}"
|
|
71
|
+
|
|
72
|
+
# Update all package versions
|
|
73
|
+
for pkg in core cli compiler dev-server reactivity router server adapter plugins; do
|
|
74
|
+
if [ -d "packages/$pkg" ]; then
|
|
75
|
+
cd "packages/$pkg"
|
|
76
|
+
npm version $VERSION_TYPE --no-git-tag-version
|
|
77
|
+
cd - > /dev/null
|
|
78
|
+
fi
|
|
79
|
+
done
|
|
80
|
+
|
|
81
|
+
echo -e "${GREEN}✅ Versions updated${NC}"
|
|
82
|
+
echo ""
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
# Publish order (dependencies first)
|
|
86
|
+
echo -e "${YELLOW}📤 Publishing packages in order...${NC}"
|
|
87
|
+
echo ""
|
|
88
|
+
|
|
89
|
+
# 1. Reactivity (no dependencies)
|
|
90
|
+
publish_package "reactivity"
|
|
91
|
+
|
|
92
|
+
# 2. Router (depends on reactivity)
|
|
93
|
+
publish_package "router"
|
|
94
|
+
|
|
95
|
+
# 3. Server (no internal deps)
|
|
96
|
+
publish_package "server"
|
|
97
|
+
|
|
98
|
+
# 4. Compiler (no internal deps)
|
|
99
|
+
publish_package "compiler"
|
|
100
|
+
|
|
101
|
+
# 5. Dev Server (depends on compiler)
|
|
102
|
+
publish_package "dev-server"
|
|
103
|
+
|
|
104
|
+
# 6. Adapter (depends on server)
|
|
105
|
+
publish_package "adapter"
|
|
106
|
+
|
|
107
|
+
# 7. Plugins (depends on compiler)
|
|
108
|
+
publish_package "plugins"
|
|
109
|
+
|
|
110
|
+
# 8. CLI (depends on dev-server, adapter)
|
|
111
|
+
publish_package "cli"
|
|
112
|
+
|
|
113
|
+
# 9. Core (zylaris) - depends on reactivity, router
|
|
114
|
+
echo -e "${BLUE}📦 Publishing zylaris (core)...${NC}"
|
|
115
|
+
cd "packages/core"
|
|
116
|
+
if [ "$DRY_RUN" = true ]; then
|
|
117
|
+
npm publish --dry-run --access public
|
|
118
|
+
else
|
|
119
|
+
npm publish --access public
|
|
120
|
+
fi
|
|
121
|
+
cd - > /dev/null
|
|
122
|
+
echo -e "${GREEN}✅ Published zylaris${NC}"
|
|
123
|
+
echo ""
|
|
124
|
+
|
|
125
|
+
# Summary
|
|
126
|
+
echo -e "${GREEN}🎉 All packages published successfully!${NC}"
|
|
127
|
+
echo ""
|
|
128
|
+
echo -e "${BLUE}Published packages:${NC}"
|
|
129
|
+
echo " - zylaris"
|
|
130
|
+
echo " - @zylaris/cli"
|
|
131
|
+
echo " - @zylaris/compiler"
|
|
132
|
+
echo " - @zylaris/dev-server"
|
|
133
|
+
echo " - @zylaris/reactivity"
|
|
134
|
+
echo " - @zylaris/router"
|
|
135
|
+
echo " - @zylaris/server"
|
|
136
|
+
echo " - @zylaris/adapter"
|
|
137
|
+
echo " - @zylaris/plugins"
|
|
138
|
+
echo ""
|
|
139
|
+
echo -e "${BLUE}Install with:${NC}"
|
|
140
|
+
echo " npm install zylaris"
|
|
141
|
+
echo " # or"
|
|
142
|
+
echo " npm install -g @zylaris/cli"
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"resolveJsonModule": true,
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"checkJs": false,
|
|
10
|
+
"declaration": true,
|
|
11
|
+
"declarationMap": true,
|
|
12
|
+
"sourceMap": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"noUnusedLocals": true,
|
|
15
|
+
"noUnusedParameters": true,
|
|
16
|
+
"noFallthroughCasesInSwitch": true,
|
|
17
|
+
"esModuleInterop": true,
|
|
18
|
+
"skipLibCheck": true,
|
|
19
|
+
"forceConsistentCasingInFileNames": true,
|
|
20
|
+
"jsx": "react-jsx",
|
|
21
|
+
"jsxImportSource": "zylaris",
|
|
22
|
+
"baseUrl": ".",
|
|
23
|
+
"paths": {
|
|
24
|
+
"@zylaris/*": ["packages/*/dist"]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"exclude": ["node_modules", "dist", ".zylaris"]
|
|
28
|
+
}
|
package/turbo.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://turbo.build/schema.json",
|
|
3
|
+
"globalDependencies": ["**/.env.*local"],
|
|
4
|
+
"pipeline": {
|
|
5
|
+
"build": {
|
|
6
|
+
"dependsOn": ["^build"],
|
|
7
|
+
"outputs": ["dist/**", ".next/**", "!.next/cache/**"]
|
|
8
|
+
},
|
|
9
|
+
"test": {
|
|
10
|
+
"dependsOn": ["build"]
|
|
11
|
+
},
|
|
12
|
+
"lint": {},
|
|
13
|
+
"typecheck": {
|
|
14
|
+
"dependsOn": ["^build"]
|
|
15
|
+
},
|
|
16
|
+
"dev": {
|
|
17
|
+
"cache": false,
|
|
18
|
+
"persistent": true
|
|
19
|
+
},
|
|
20
|
+
"clean": {
|
|
21
|
+
"cache": false
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|