@oaysus/cli 0.1.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/README.md +166 -0
- package/bin/oaysus.js +6 -0
- package/dist/cli.d.ts +11 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +174 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/login.d.ts +2 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +75 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +2 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +23 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/whoami.d.ts +2 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +44 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/components/App.d.ts +43 -0
- package/dist/components/App.d.ts.map +1 -0
- package/dist/components/App.js +63 -0
- package/dist/components/App.js.map +1 -0
- package/dist/components/BuildProgress.d.ts +16 -0
- package/dist/components/BuildProgress.d.ts.map +1 -0
- package/dist/components/BuildProgress.js +42 -0
- package/dist/components/BuildProgress.js.map +1 -0
- package/dist/components/ErrorMessage.d.ts +13 -0
- package/dist/components/ErrorMessage.d.ts.map +1 -0
- package/dist/components/ErrorMessage.js +29 -0
- package/dist/components/ErrorMessage.js.map +1 -0
- package/dist/components/FileList.d.ts +13 -0
- package/dist/components/FileList.d.ts.map +1 -0
- package/dist/components/FileList.js +25 -0
- package/dist/components/FileList.js.map +1 -0
- package/dist/components/Header.d.ts +12 -0
- package/dist/components/Header.d.ts.map +1 -0
- package/dist/components/Header.js +18 -0
- package/dist/components/Header.js.map +1 -0
- package/dist/components/LastCommand.d.ts +9 -0
- package/dist/components/LastCommand.d.ts.map +1 -0
- package/dist/components/LastCommand.js +39 -0
- package/dist/components/LastCommand.js.map +1 -0
- package/dist/components/Logo.d.ts +14 -0
- package/dist/components/Logo.d.ts.map +1 -0
- package/dist/components/Logo.js +44 -0
- package/dist/components/Logo.js.map +1 -0
- package/dist/components/ProgressBar.d.ts +13 -0
- package/dist/components/ProgressBar.d.ts.map +1 -0
- package/dist/components/ProgressBar.js +20 -0
- package/dist/components/ProgressBar.js.map +1 -0
- package/dist/components/SlashCommands.d.ts +17 -0
- package/dist/components/SlashCommands.d.ts.map +1 -0
- package/dist/components/SlashCommands.js +59 -0
- package/dist/components/SlashCommands.js.map +1 -0
- package/dist/components/Spinner.d.ts +13 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner.js +16 -0
- package/dist/components/Spinner.js.map +1 -0
- package/dist/components/StatusCard.d.ts +14 -0
- package/dist/components/StatusCard.d.ts.map +1 -0
- package/dist/components/StatusCard.js +40 -0
- package/dist/components/StatusCard.js.map +1 -0
- package/dist/components/SuccessMessage.d.ts +12 -0
- package/dist/components/SuccessMessage.d.ts.map +1 -0
- package/dist/components/SuccessMessage.js +18 -0
- package/dist/components/SuccessMessage.js.map +1 -0
- package/dist/components/UploadProgress.d.ts +13 -0
- package/dist/components/UploadProgress.d.ts.map +1 -0
- package/dist/components/UploadProgress.js +40 -0
- package/dist/components/UploadProgress.js.map +1 -0
- package/dist/components/ValidationProgress.d.ts +12 -0
- package/dist/components/ValidationProgress.d.ts.map +1 -0
- package/dist/components/ValidationProgress.js +44 -0
- package/dist/components/ValidationProgress.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/core/framework-registry.d.ts +27 -0
- package/dist/lib/core/framework-registry.d.ts.map +1 -0
- package/dist/lib/core/framework-registry.js +67 -0
- package/dist/lib/core/framework-registry.js.map +1 -0
- package/dist/lib/core/types.d.ts +124 -0
- package/dist/lib/core/types.d.ts.map +1 -0
- package/dist/lib/core/types.js +6 -0
- package/dist/lib/core/types.js.map +1 -0
- package/dist/lib/project-generator.d.ts +15 -0
- package/dist/lib/project-generator.d.ts.map +1 -0
- package/dist/lib/project-generator.js +286 -0
- package/dist/lib/project-generator.js.map +1 -0
- package/dist/lib/push.d.ts +20 -0
- package/dist/lib/push.d.ts.map +1 -0
- package/dist/lib/push.js +222 -0
- package/dist/lib/push.js.map +1 -0
- package/dist/lib/react/builder.d.ts +45 -0
- package/dist/lib/react/builder.d.ts.map +1 -0
- package/dist/lib/react/builder.js +381 -0
- package/dist/lib/react/builder.js.map +1 -0
- package/dist/lib/react/bundler.d.ts +104 -0
- package/dist/lib/react/bundler.d.ts.map +1 -0
- package/dist/lib/react/bundler.js +654 -0
- package/dist/lib/react/bundler.js.map +1 -0
- package/dist/lib/react/config.d.ts +34 -0
- package/dist/lib/react/config.d.ts.map +1 -0
- package/dist/lib/react/config.js +64 -0
- package/dist/lib/react/config.js.map +1 -0
- package/dist/lib/react/import-map.d.ts +54 -0
- package/dist/lib/react/import-map.d.ts.map +1 -0
- package/dist/lib/react/import-map.js +187 -0
- package/dist/lib/react/import-map.js.map +1 -0
- package/dist/lib/shared/auth-middleware.d.ts +29 -0
- package/dist/lib/shared/auth-middleware.d.ts.map +1 -0
- package/dist/lib/shared/auth-middleware.js +48 -0
- package/dist/lib/shared/auth-middleware.js.map +1 -0
- package/dist/lib/shared/auth.d.ts +50 -0
- package/dist/lib/shared/auth.d.ts.map +1 -0
- package/dist/lib/shared/auth.js +243 -0
- package/dist/lib/shared/auth.js.map +1 -0
- package/dist/lib/shared/cdn-downloader.d.ts +30 -0
- package/dist/lib/shared/cdn-downloader.d.ts.map +1 -0
- package/dist/lib/shared/cdn-downloader.js +126 -0
- package/dist/lib/shared/cdn-downloader.js.map +1 -0
- package/dist/lib/shared/command-history.d.ts +29 -0
- package/dist/lib/shared/command-history.d.ts.map +1 -0
- package/dist/lib/shared/command-history.js +73 -0
- package/dist/lib/shared/command-history.js.map +1 -0
- package/dist/lib/shared/commands.d.ts +24 -0
- package/dist/lib/shared/commands.d.ts.map +1 -0
- package/dist/lib/shared/commands.js +63 -0
- package/dist/lib/shared/commands.js.map +1 -0
- package/dist/lib/shared/config.d.ts +40 -0
- package/dist/lib/shared/config.d.ts.map +1 -0
- package/dist/lib/shared/config.js +69 -0
- package/dist/lib/shared/config.js.map +1 -0
- package/dist/lib/shared/file-utils.d.ts +45 -0
- package/dist/lib/shared/file-utils.d.ts.map +1 -0
- package/dist/lib/shared/file-utils.js +88 -0
- package/dist/lib/shared/file-utils.js.map +1 -0
- package/dist/lib/shared/import-analyzer.d.ts +49 -0
- package/dist/lib/shared/import-analyzer.d.ts.map +1 -0
- package/dist/lib/shared/import-analyzer.js +268 -0
- package/dist/lib/shared/import-analyzer.js.map +1 -0
- package/dist/lib/shared/path-builder.d.ts +55 -0
- package/dist/lib/shared/path-builder.d.ts.map +1 -0
- package/dist/lib/shared/path-builder.js +66 -0
- package/dist/lib/shared/path-builder.js.map +1 -0
- package/dist/lib/shared/uploader.d.ts +79 -0
- package/dist/lib/shared/uploader.d.ts.map +1 -0
- package/dist/lib/shared/uploader.js +340 -0
- package/dist/lib/shared/uploader.js.map +1 -0
- package/dist/lib/shared/zip-creator.d.ts +18 -0
- package/dist/lib/shared/zip-creator.d.ts.map +1 -0
- package/dist/lib/shared/zip-creator.js +131 -0
- package/dist/lib/shared/zip-creator.js.map +1 -0
- package/dist/lib/svelte/builder.d.ts +37 -0
- package/dist/lib/svelte/builder.d.ts.map +1 -0
- package/dist/lib/svelte/builder.js +364 -0
- package/dist/lib/svelte/builder.js.map +1 -0
- package/dist/lib/svelte/bundler.d.ts +92 -0
- package/dist/lib/svelte/bundler.d.ts.map +1 -0
- package/dist/lib/svelte/bundler.js +499 -0
- package/dist/lib/svelte/bundler.js.map +1 -0
- package/dist/lib/svelte/config.d.ts +22 -0
- package/dist/lib/svelte/config.d.ts.map +1 -0
- package/dist/lib/svelte/config.js +65 -0
- package/dist/lib/svelte/config.js.map +1 -0
- package/dist/lib/svelte/import-map.d.ts +42 -0
- package/dist/lib/svelte/import-map.d.ts.map +1 -0
- package/dist/lib/svelte/import-map.js +197 -0
- package/dist/lib/svelte/import-map.js.map +1 -0
- package/dist/lib/template-manager.d.ts +33 -0
- package/dist/lib/template-manager.d.ts.map +1 -0
- package/dist/lib/template-manager.js +69 -0
- package/dist/lib/template-manager.js.map +1 -0
- package/dist/lib/validator.d.ts +10 -0
- package/dist/lib/validator.d.ts.map +1 -0
- package/dist/lib/validator.js +343 -0
- package/dist/lib/validator.js.map +1 -0
- package/dist/lib/vue/builder.d.ts +37 -0
- package/dist/lib/vue/builder.d.ts.map +1 -0
- package/dist/lib/vue/builder.js +366 -0
- package/dist/lib/vue/builder.js.map +1 -0
- package/dist/lib/vue/bundler.d.ts +78 -0
- package/dist/lib/vue/bundler.d.ts.map +1 -0
- package/dist/lib/vue/bundler.js +208 -0
- package/dist/lib/vue/bundler.js.map +1 -0
- package/dist/lib/vue/config.d.ts +18 -0
- package/dist/lib/vue/config.d.ts.map +1 -0
- package/dist/lib/vue/config.js +42 -0
- package/dist/lib/vue/config.js.map +1 -0
- package/dist/lib/vue/import-map.d.ts +42 -0
- package/dist/lib/vue/import-map.d.ts.map +1 -0
- package/dist/lib/vue/import-map.js +156 -0
- package/dist/lib/vue/import-map.js.map +1 -0
- package/dist/screens/BuildScreen.d.ts +8 -0
- package/dist/screens/BuildScreen.d.ts.map +1 -0
- package/dist/screens/BuildScreen.js +158 -0
- package/dist/screens/BuildScreen.js.map +1 -0
- package/dist/screens/CreateScreen.d.ts +12 -0
- package/dist/screens/CreateScreen.d.ts.map +1 -0
- package/dist/screens/CreateScreen.js +305 -0
- package/dist/screens/CreateScreen.js.map +1 -0
- package/dist/screens/InitScreen.d.ts +11 -0
- package/dist/screens/InitScreen.d.ts.map +1 -0
- package/dist/screens/InitScreen.js +339 -0
- package/dist/screens/InitScreen.js.map +1 -0
- package/dist/screens/LoginScreen.d.ts +15 -0
- package/dist/screens/LoginScreen.d.ts.map +1 -0
- package/dist/screens/LoginScreen.js +427 -0
- package/dist/screens/LoginScreen.js.map +1 -0
- package/dist/screens/LogoutScreen.d.ts +15 -0
- package/dist/screens/LogoutScreen.d.ts.map +1 -0
- package/dist/screens/LogoutScreen.js +187 -0
- package/dist/screens/LogoutScreen.js.map +1 -0
- package/dist/screens/PushScreen.d.ts +12 -0
- package/dist/screens/PushScreen.d.ts.map +1 -0
- package/dist/screens/PushScreen.js +546 -0
- package/dist/screens/PushScreen.js.map +1 -0
- package/dist/screens/ValidateScreen.d.ts +12 -0
- package/dist/screens/ValidateScreen.d.ts.map +1 -0
- package/dist/screens/ValidateScreen.js +193 -0
- package/dist/screens/ValidateScreen.js.map +1 -0
- package/dist/screens/WelcomeScreen.d.ts +39 -0
- package/dist/screens/WelcomeScreen.d.ts.map +1 -0
- package/dist/screens/WelcomeScreen.js +297 -0
- package/dist/screens/WelcomeScreen.js.map +1 -0
- package/dist/screens/WhoamiScreen.d.ts +14 -0
- package/dist/screens/WhoamiScreen.d.ts.map +1 -0
- package/dist/screens/WhoamiScreen.js +180 -0
- package/dist/screens/WhoamiScreen.js.map +1 -0
- package/dist/types/index.d.ts +40 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/templates.d.ts +55 -0
- package/dist/types/templates.d.ts.map +1 -0
- package/dist/types/templates.js +6 -0
- package/dist/types/templates.js.map +1 -0
- package/dist/types/validation.d.ts +108 -0
- package/dist/types/validation.d.ts.map +1 -0
- package/dist/types/validation.js +6 -0
- package/dist/types/validation.js.map +1 -0
- package/package.json +94 -0
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte Dependency Bundler
|
|
3
|
+
* Svelte-specific implementation for bundling dependencies
|
|
4
|
+
*/
|
|
5
|
+
import { build } from 'vite';
|
|
6
|
+
import * as path from 'path';
|
|
7
|
+
import * as fs from 'fs';
|
|
8
|
+
// Svelte 5 has additional exports compared to Svelte 4
|
|
9
|
+
// Sub-exports are bundled with no externals, making them self-contained
|
|
10
|
+
// Svelte 5 also requires nested internal paths for proper functionality
|
|
11
|
+
const SVELTE_4_EXPORTS = ['internal', 'store', 'motion', 'transition', 'animate', 'easing'];
|
|
12
|
+
const SVELTE_5_EXPORTS = [
|
|
13
|
+
'internal',
|
|
14
|
+
'store',
|
|
15
|
+
'motion',
|
|
16
|
+
'transition',
|
|
17
|
+
'animate',
|
|
18
|
+
'easing',
|
|
19
|
+
'legacy',
|
|
20
|
+
'internal/client',
|
|
21
|
+
'internal/server',
|
|
22
|
+
'internal/disclose-version',
|
|
23
|
+
'internal/flags/legacy'
|
|
24
|
+
];
|
|
25
|
+
// Svelte-specific export configurations
|
|
26
|
+
const SVELTE_EXPORT_CONFIG = {
|
|
27
|
+
'svelte': {
|
|
28
|
+
exports: SVELTE_4_EXPORTS // Default to v4, will be updated based on version
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
class SvelteBundler {
|
|
32
|
+
/**
|
|
33
|
+
* Get Svelte major version from version string
|
|
34
|
+
*/
|
|
35
|
+
getSvelteMajorVersion(version) {
|
|
36
|
+
const match = version.match(/^(\d+)/);
|
|
37
|
+
return match ? parseInt(match[1], 10) : 4;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get exports configuration for a Svelte package
|
|
41
|
+
*/
|
|
42
|
+
getExportsConfig(packageName, version) {
|
|
43
|
+
const config = SVELTE_EXPORT_CONFIG[packageName];
|
|
44
|
+
if (!config)
|
|
45
|
+
return undefined;
|
|
46
|
+
// Handle Svelte version differences
|
|
47
|
+
if (packageName === 'svelte' && this.getSvelteMajorVersion(version) >= 5) {
|
|
48
|
+
return { ...config, exports: SVELTE_5_EXPORTS };
|
|
49
|
+
}
|
|
50
|
+
return config;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Read bundle file from multiple possible paths
|
|
54
|
+
*/
|
|
55
|
+
readBundleFile(tempDir, distFolder, fileName) {
|
|
56
|
+
const possiblePaths = [
|
|
57
|
+
path.join(tempDir, distFolder, `${fileName}.es.js`),
|
|
58
|
+
path.join(tempDir, distFolder, `${fileName}.mjs`),
|
|
59
|
+
path.join(tempDir, distFolder, `${fileName}.js`)
|
|
60
|
+
];
|
|
61
|
+
for (const bundlePath of possiblePaths) {
|
|
62
|
+
if (fs.existsSync(bundlePath)) {
|
|
63
|
+
return fs.readFileSync(bundlePath, 'utf-8');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Bundle a sub-export (e.g., svelte/store, svelte/motion)
|
|
70
|
+
*/
|
|
71
|
+
async bundleSubExport(packageName, exportName, tempDir, projectRoot, externals) {
|
|
72
|
+
const exportEntry = path.join(tempDir, `${exportName}-entry.js`);
|
|
73
|
+
const outDir = `dist-${exportName.replace(/\//g, '-')}`;
|
|
74
|
+
// Create parent directory if it doesn't exist (for nested paths like internal/disclose-version)
|
|
75
|
+
const entryDir = path.dirname(exportEntry);
|
|
76
|
+
if (!fs.existsSync(entryDir)) {
|
|
77
|
+
fs.mkdirSync(entryDir, { recursive: true });
|
|
78
|
+
}
|
|
79
|
+
// Default: use export *
|
|
80
|
+
const entryContent = `export * from '${packageName}/${exportName}';`;
|
|
81
|
+
fs.writeFileSync(exportEntry, entryContent);
|
|
82
|
+
// Bundle Svelte sub-exports but keep main 'svelte' as external to share runtime state
|
|
83
|
+
// Svelte's internal modules need to share state with the main package
|
|
84
|
+
const externalDeps = packageName === 'svelte'
|
|
85
|
+
? ['svelte'] // Make sub-exports depend on main svelte package
|
|
86
|
+
: externals;
|
|
87
|
+
try {
|
|
88
|
+
await build({
|
|
89
|
+
root: projectRoot,
|
|
90
|
+
logLevel: 'silent',
|
|
91
|
+
build: {
|
|
92
|
+
lib: {
|
|
93
|
+
entry: exportEntry,
|
|
94
|
+
formats: ['es'],
|
|
95
|
+
fileName: exportName.replace(/\//g, '-')
|
|
96
|
+
},
|
|
97
|
+
outDir: path.join(tempDir, outDir),
|
|
98
|
+
emptyOutDir: true,
|
|
99
|
+
minify: false, // Disabled for Svelte to preserve internal structure
|
|
100
|
+
rollupOptions: {
|
|
101
|
+
external: externalDeps,
|
|
102
|
+
output: {
|
|
103
|
+
globals: externalDeps.reduce((acc, ext) => ({ ...acc, [ext]: ext }), {})
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
define: {
|
|
108
|
+
'process.env.NODE_ENV': '"production"'
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
return this.readBundleFile(tempDir, outDir, exportName.replace(/\//g, '-'));
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
console.warn(`[SvelteBundler] Could not bundle ${packageName}/${exportName}: ${err}`);
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Bundle Svelte runtime into a SINGLE unified bundle
|
|
120
|
+
* Svelte 5 requires shared module state for DOM prototype getters.
|
|
121
|
+
* All exports come from one bundle to ensure prototypes are initialized once.
|
|
122
|
+
*/
|
|
123
|
+
async bundleSvelteRuntime(version, options) {
|
|
124
|
+
const { projectRoot, outputDir } = options;
|
|
125
|
+
const depDir = path.join(outputDir, `svelte@${version}`);
|
|
126
|
+
const tempDir = path.join(projectRoot, '.oaysus-temp', `svelte@${version}`);
|
|
127
|
+
const result = {
|
|
128
|
+
name: 'svelte',
|
|
129
|
+
version,
|
|
130
|
+
mainBundle: '',
|
|
131
|
+
additionalExports: {}
|
|
132
|
+
};
|
|
133
|
+
try {
|
|
134
|
+
fs.mkdirSync(tempDir, { recursive: true });
|
|
135
|
+
fs.mkdirSync(depDir, { recursive: true });
|
|
136
|
+
// Create a unified entry that exports EVERYTHING from all Svelte modules
|
|
137
|
+
// This ensures DOM prototype getters are initialized once and shared
|
|
138
|
+
const unifiedEntryFile = path.join(tempDir, 'unified-entry.js');
|
|
139
|
+
const unifiedEntryContent = `
|
|
140
|
+
// Main svelte exports
|
|
141
|
+
export * from 'svelte';
|
|
142
|
+
import * as _svelte from 'svelte';
|
|
143
|
+
export default _svelte;
|
|
144
|
+
|
|
145
|
+
// Re-export internal/client as named exports
|
|
146
|
+
import * as _internalClient from 'svelte/internal/client';
|
|
147
|
+
export const internal_client = _internalClient;
|
|
148
|
+
|
|
149
|
+
// Re-export internal/disclose-version
|
|
150
|
+
import * as _discloseVersion from 'svelte/internal/disclose-version';
|
|
151
|
+
export const internal_disclose_version = _discloseVersion;
|
|
152
|
+
|
|
153
|
+
// Re-export store
|
|
154
|
+
import * as _store from 'svelte/store';
|
|
155
|
+
export const store = _store;
|
|
156
|
+
|
|
157
|
+
// Re-export transition
|
|
158
|
+
import * as _transition from 'svelte/transition';
|
|
159
|
+
export const transition = _transition;
|
|
160
|
+
|
|
161
|
+
// Re-export motion
|
|
162
|
+
import * as _motion from 'svelte/motion';
|
|
163
|
+
export const motion = _motion;
|
|
164
|
+
|
|
165
|
+
// Re-export animate
|
|
166
|
+
import * as _animate from 'svelte/animate';
|
|
167
|
+
export const animate = _animate;
|
|
168
|
+
|
|
169
|
+
// Re-export easing
|
|
170
|
+
import * as _easing from 'svelte/easing';
|
|
171
|
+
export const easing = _easing;
|
|
172
|
+
`;
|
|
173
|
+
fs.writeFileSync(unifiedEntryFile, unifiedEntryContent);
|
|
174
|
+
console.log(' Bundling unified Svelte runtime...');
|
|
175
|
+
await build({
|
|
176
|
+
root: projectRoot,
|
|
177
|
+
logLevel: 'silent',
|
|
178
|
+
resolve: {
|
|
179
|
+
conditions: ['browser', 'production', 'import', 'default']
|
|
180
|
+
},
|
|
181
|
+
build: {
|
|
182
|
+
lib: {
|
|
183
|
+
entry: unifiedEntryFile,
|
|
184
|
+
formats: ['es'],
|
|
185
|
+
fileName: 'svelte-unified'
|
|
186
|
+
},
|
|
187
|
+
outDir: path.join(tempDir, 'dist'),
|
|
188
|
+
emptyOutDir: true,
|
|
189
|
+
minify: 'terser',
|
|
190
|
+
rollupOptions: {
|
|
191
|
+
external: [],
|
|
192
|
+
output: {
|
|
193
|
+
format: 'es',
|
|
194
|
+
entryFileNames: 'svelte-unified.js'
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
define: {
|
|
199
|
+
'process.env.NODE_ENV': '"production"',
|
|
200
|
+
'DEV': 'false',
|
|
201
|
+
'BROWSER': 'true'
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
// Read the unified bundle
|
|
205
|
+
const unifiedBundlePath = path.join(tempDir, 'dist', 'svelte-unified.js');
|
|
206
|
+
if (fs.existsSync(unifiedBundlePath)) {
|
|
207
|
+
let unifiedContent = fs.readFileSync(unifiedBundlePath, 'utf-8');
|
|
208
|
+
// CRITICAL: Svelte 5 requires init_operations() to be called before any DOM operations
|
|
209
|
+
// The DOM prototype getters (first_child_getter, next_sibling_getter) must be initialized
|
|
210
|
+
// before compiled components import from svelte/internal/client
|
|
211
|
+
// We inject this call at the end of the module to ensure all exports are available first
|
|
212
|
+
if (unifiedContent.includes('function init_operations()')) {
|
|
213
|
+
// Find if there's already an init_operations call at module scope
|
|
214
|
+
// If not, add one. This initializes the DOM getters when the module loads.
|
|
215
|
+
const hasModuleScopeInit = /^init_operations\(\);$/m.test(unifiedContent);
|
|
216
|
+
if (!hasModuleScopeInit) {
|
|
217
|
+
// Add init_operations call before the export statement
|
|
218
|
+
unifiedContent = unifiedContent.replace(/^(export\s*\{)/m, '// Initialize DOM prototype getters at module load time\n// This is required for Svelte 5 components that use from_html() at import time\nif (typeof window !== "undefined") { init_operations(); }\n\n$1');
|
|
219
|
+
console.log(' ℹ️ Injected init_operations() call at module scope');
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
result.mainBundle = unifiedContent;
|
|
223
|
+
// Write the unified bundle
|
|
224
|
+
fs.writeFileSync(path.join(depDir, 'svelte-unified.js'), unifiedContent);
|
|
225
|
+
// Create re-export shims for each sub-module that import from the unified bundle
|
|
226
|
+
// This allows import maps to work while keeping everything in one bundle
|
|
227
|
+
const shims = [
|
|
228
|
+
{
|
|
229
|
+
name: 'index.js',
|
|
230
|
+
content: `export * from './svelte-unified.js';\nimport _default from './svelte-unified.js';\nexport default _default;`
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: 'internal-client.js',
|
|
234
|
+
// Re-export ALL internal client functions from the namespace
|
|
235
|
+
// These are used by compiled Svelte components
|
|
236
|
+
content: `import { internal_client as $ } from './svelte-unified.js';
|
|
237
|
+
// Re-export all internal client functions
|
|
238
|
+
// Using Object.assign to export all properties dynamically
|
|
239
|
+
const _exports = {};
|
|
240
|
+
for (const key of Object.keys($)) {
|
|
241
|
+
_exports[key] = $[key];
|
|
242
|
+
}
|
|
243
|
+
export const {
|
|
244
|
+
CLASS, FILENAME, HMR, NAMESPACE_SVG, STYLE, aborted, action, active_effect,
|
|
245
|
+
add_legacy_event_listener, add_locations, add_svelte_meta, animation, append,
|
|
246
|
+
append_styles, apply, assign, assign_and, assign_nullish, assign_or, async,
|
|
247
|
+
async_body, async_derived, attach, attachment, attr, attribute_effect, autofocus,
|
|
248
|
+
await: await_fn, bind_active_element, bind_buffered, bind_checked, bind_content_editable,
|
|
249
|
+
bind_current_time, bind_element_size, bind_ended, bind_files, bind_focused, bind_group,
|
|
250
|
+
bind_muted, bind_online, bind_paused, bind_playback_rate, bind_played, bind_prop,
|
|
251
|
+
bind_property, bind_ready_state, bind_resize_observer, bind_seekable, bind_seeking,
|
|
252
|
+
bind_select_value, bind_this, bind_value, bind_volume, bind_window_scroll, bind_window_size,
|
|
253
|
+
boundary, bubble_event, check_target, child, cleanup_styles, clsx, comment, component,
|
|
254
|
+
create_custom_element, create_ownership_validator, css_props, deep_read, deep_read_state,
|
|
255
|
+
deferred_template_effect, delegate, derived, derived_safe_equal, document: doc,
|
|
256
|
+
each, eager, effect, effect_root, effect_tracking, element, equals, event,
|
|
257
|
+
exclude_from_object, fallback, first_child, flush, for_await_track_reactivity_loss,
|
|
258
|
+
from_html, from_mathml, from_svg, from_tree, get, head, hmr, html, hydrate_template,
|
|
259
|
+
if: if_fn, index, init, init_select, inspect, invalid_default_snippet, invalidate_inner_signals,
|
|
260
|
+
invalidate_store, invoke_error_boundary, key, legacy_api, legacy_pre_effect,
|
|
261
|
+
legacy_pre_effect_reset, legacy_rest_props, log_if_contains_state, mark_store_binding,
|
|
262
|
+
mutable_source, mutate, next, noop, once, pending, pop, preventDefault,
|
|
263
|
+
prevent_snippet_stringification, prop, props_id, proxy, push, raf, reactive_import,
|
|
264
|
+
remove_input_defaults, remove_textarea_child, render_effect, replay_events, reset,
|
|
265
|
+
rest_props, run, run_after_blockers, safe_get, sanitize_slots, save, select_option,
|
|
266
|
+
self, set, set_attribute, set_checked, set_class, set_custom_element_data,
|
|
267
|
+
set_default_checked, set_default_value, set_selected, set_style, set_text, set_value,
|
|
268
|
+
set_xlink_attribute, setup_stores, sibling, slot, snapshot, snippet, spread_props,
|
|
269
|
+
state, stopImmediatePropagation, stopPropagation, store_get, store_mutate, store_set,
|
|
270
|
+
store_unsub, strict_equals, tag, tag_proxy, template_effect, text, tick, to_array,
|
|
271
|
+
trace, track_reactivity_loss, transition, trusted, untrack, update, update_legacy_props,
|
|
272
|
+
update_pre, update_pre_prop, update_pre_store, update_prop, update_store, user_effect,
|
|
273
|
+
user_pre_effect, validate_binding, validate_dynamic_element_tag, validate_each_keys,
|
|
274
|
+
validate_snippet_args, validate_store, validate_void_dynamic_element, window: win, with_script, wrap_snippet
|
|
275
|
+
} = $;
|
|
276
|
+
// Handle reserved words with aliases
|
|
277
|
+
export { await_fn as await, if_fn as if, doc as document, win as window };`
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: 'internal-disclose-version.js',
|
|
281
|
+
content: `import { internal_disclose_version } from './svelte-unified.js';\nexport const BROWSER = internal_disclose_version.BROWSER;\nexport default internal_disclose_version;`
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: 'store.js',
|
|
285
|
+
content: `import { store } from './svelte-unified.js';\nexport const { writable, readable, derived, get } = store;`
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
name: 'transition.js',
|
|
289
|
+
content: `import { transition } from './svelte-unified.js';\nexport const { fade, blur, fly, slide, scale, draw, crossfade } = transition;`
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
name: 'motion.js',
|
|
293
|
+
content: `import { motion } from './svelte-unified.js';\nexport const { tweened, spring } = motion;`
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: 'animate.js',
|
|
297
|
+
content: `import { animate } from './svelte-unified.js';\nexport const { flip } = animate;`
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: 'easing.js',
|
|
301
|
+
content: `import { easing } from './svelte-unified.js';\nexport const { linear, backIn, backOut, backInOut, bounceIn, bounceOut, bounceInOut, circIn, circOut, circInOut, cubicIn, cubicOut, cubicInOut, elasticIn, elasticOut, elasticInOut, expoIn, expoOut, expoInOut, quadIn, quadOut, quadInOut, quartIn, quartOut, quartInOut, quintIn, quintOut, quintInOut, sineIn, sineOut, sineInOut } = easing;`
|
|
302
|
+
}
|
|
303
|
+
];
|
|
304
|
+
for (const shim of shims) {
|
|
305
|
+
fs.writeFileSync(path.join(depDir, shim.name), shim.content);
|
|
306
|
+
result.additionalExports[shim.name.replace('.js', '')] = shim.content;
|
|
307
|
+
}
|
|
308
|
+
console.log(` ✅ Unified bundle: ${(unifiedContent.length / 1024).toFixed(2)} KB`);
|
|
309
|
+
}
|
|
310
|
+
// Cleanup temp directory
|
|
311
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
312
|
+
return result;
|
|
313
|
+
}
|
|
314
|
+
catch (error) {
|
|
315
|
+
if (fs.existsSync(tempDir)) {
|
|
316
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
317
|
+
}
|
|
318
|
+
console.error(`Failed to bundle svelte@${version}:`, error);
|
|
319
|
+
throw error;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Bundle a single dependency
|
|
324
|
+
*/
|
|
325
|
+
async bundleSingleDependency(packageName, version, options) {
|
|
326
|
+
// Special handling for Svelte - use optimized bundling
|
|
327
|
+
if (packageName === 'svelte') {
|
|
328
|
+
console.log(`Bundling Svelte runtime (optimized production bundles)...`);
|
|
329
|
+
return this.bundleSvelteRuntime(version, options);
|
|
330
|
+
}
|
|
331
|
+
const { projectRoot, outputDir } = options;
|
|
332
|
+
const tempDir = path.join(projectRoot, '.oaysus-temp', `${packageName}@${version}`);
|
|
333
|
+
const result = {
|
|
334
|
+
name: packageName,
|
|
335
|
+
version,
|
|
336
|
+
mainBundle: '',
|
|
337
|
+
additionalExports: {}
|
|
338
|
+
};
|
|
339
|
+
try {
|
|
340
|
+
fs.mkdirSync(tempDir, { recursive: true });
|
|
341
|
+
// Get Svelte-specific config
|
|
342
|
+
const config = this.getExportsConfig(packageName, version);
|
|
343
|
+
const externals = config?.externals || [];
|
|
344
|
+
// Build main bundle
|
|
345
|
+
const mainEntry = path.join(tempDir, 'main-entry.js');
|
|
346
|
+
const entryContent = `import * as _pkg from '${packageName}';
|
|
347
|
+
export * from '${packageName}';
|
|
348
|
+
export default _pkg;`;
|
|
349
|
+
fs.writeFileSync(mainEntry, entryContent);
|
|
350
|
+
await build({
|
|
351
|
+
root: projectRoot,
|
|
352
|
+
logLevel: 'silent',
|
|
353
|
+
build: {
|
|
354
|
+
lib: {
|
|
355
|
+
entry: mainEntry,
|
|
356
|
+
formats: ['es'],
|
|
357
|
+
fileName: 'index'
|
|
358
|
+
},
|
|
359
|
+
outDir: path.join(tempDir, 'dist'),
|
|
360
|
+
emptyOutDir: true,
|
|
361
|
+
minify: false, // Disabled for Svelte to preserve internal structure
|
|
362
|
+
rollupOptions: {
|
|
363
|
+
external: externals,
|
|
364
|
+
output: {
|
|
365
|
+
globals: externals.reduce((acc, ext) => ({ ...acc, [ext]: ext }), {})
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
define: {
|
|
370
|
+
'process.env.NODE_ENV': '"production"'
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
// Read main bundle
|
|
374
|
+
result.mainBundle = this.readBundleFile(tempDir, 'dist', 'index') || '';
|
|
375
|
+
if (!result.mainBundle) {
|
|
376
|
+
console.warn(`[SvelteBundler] Could not find main bundle for ${packageName}`);
|
|
377
|
+
}
|
|
378
|
+
// Bundle additional exports
|
|
379
|
+
if (config?.exports && config.exports.length > 0) {
|
|
380
|
+
for (const exportName of config.exports) {
|
|
381
|
+
const exportBundle = await this.bundleSubExport(packageName, exportName, tempDir, projectRoot, externals);
|
|
382
|
+
if (exportBundle) {
|
|
383
|
+
result.additionalExports[exportName] = exportBundle;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
// Save to output directory
|
|
388
|
+
if (outputDir) {
|
|
389
|
+
const depDir = path.join(outputDir, `${packageName}@${version}`);
|
|
390
|
+
fs.mkdirSync(depDir, { recursive: true });
|
|
391
|
+
fs.writeFileSync(path.join(depDir, 'index.js'), result.mainBundle);
|
|
392
|
+
for (const [exportName, content] of Object.entries(result.additionalExports || {})) {
|
|
393
|
+
// Use dashes in filename to match bundler output (e.g., internal-disclose-version.js)
|
|
394
|
+
const fileName = exportName.replace(/\//g, '-');
|
|
395
|
+
const exportPath = path.join(depDir, `${fileName}.js`);
|
|
396
|
+
fs.writeFileSync(exportPath, content);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
// Cleanup temp directory
|
|
400
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
401
|
+
return result;
|
|
402
|
+
}
|
|
403
|
+
catch (error) {
|
|
404
|
+
if (fs.existsSync(tempDir)) {
|
|
405
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
406
|
+
}
|
|
407
|
+
console.error(`Failed to bundle ${packageName}@${version}:`, error);
|
|
408
|
+
throw error;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Bundle multiple dependencies for R2 upload
|
|
413
|
+
*/
|
|
414
|
+
async bundleDependencies(dependencies, options) {
|
|
415
|
+
const results = [];
|
|
416
|
+
for (const dep of dependencies) {
|
|
417
|
+
console.log(`Bundling ${dep.name}@${dep.version}...`);
|
|
418
|
+
const bundled = await this.bundleSingleDependency(dep.name, dep.version, options);
|
|
419
|
+
results.push(bundled);
|
|
420
|
+
}
|
|
421
|
+
return results;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Filter dependencies to only include runtime dependencies
|
|
425
|
+
*/
|
|
426
|
+
filterRuntimeDependencies(dependencies) {
|
|
427
|
+
const devOnlyPatterns = [
|
|
428
|
+
/^@types\//,
|
|
429
|
+
/^typescript$/,
|
|
430
|
+
/^eslint/,
|
|
431
|
+
/^prettier/,
|
|
432
|
+
/^vite$/,
|
|
433
|
+
/^vitest/,
|
|
434
|
+
/^jest/,
|
|
435
|
+
/^@testing-library/,
|
|
436
|
+
/^autoprefixer$/,
|
|
437
|
+
/^postcss$/,
|
|
438
|
+
/^tailwindcss$/,
|
|
439
|
+
/^@vitejs\//,
|
|
440
|
+
/^@sveltejs\/vite-plugin/,
|
|
441
|
+
/^svelte-check$/,
|
|
442
|
+
/^vue-tsc$/
|
|
443
|
+
// Svelte will be bundled to R2
|
|
444
|
+
];
|
|
445
|
+
return dependencies.filter(dep => {
|
|
446
|
+
return !devOnlyPatterns.some(pattern => pattern.test(dep.name));
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Get the size of bundled dependencies in bytes
|
|
451
|
+
*/
|
|
452
|
+
getBundleSize(bundles) {
|
|
453
|
+
let totalSize = 0;
|
|
454
|
+
for (const bundle of bundles) {
|
|
455
|
+
totalSize += Buffer.byteLength(bundle.mainBundle, 'utf8');
|
|
456
|
+
for (const content of Object.values(bundle.additionalExports || {})) {
|
|
457
|
+
totalSize += Buffer.byteLength(content, 'utf8');
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
return totalSize;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Format bundle size for display
|
|
464
|
+
*/
|
|
465
|
+
formatBundleSize(bytes) {
|
|
466
|
+
if (bytes < 1024)
|
|
467
|
+
return `${bytes} B`;
|
|
468
|
+
if (bytes < 1024 * 1024)
|
|
469
|
+
return `${(bytes / 1024).toFixed(2)} KB`;
|
|
470
|
+
return `${(bytes / (1024 * 1024)).toFixed(2)} MB`;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Bundle server-side dependencies for SSR (stub for Svelte)
|
|
474
|
+
* TODO: Implement Svelte SSR bundling when needed
|
|
475
|
+
*/
|
|
476
|
+
async bundleServerDependencies(_dependencies, _options) {
|
|
477
|
+
// Svelte server bundling not yet implemented
|
|
478
|
+
console.log('[SvelteBundler] Server dependency bundling not yet implemented for Svelte');
|
|
479
|
+
return [];
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Bundle detected external dependencies (stub for Svelte)
|
|
483
|
+
* TODO: Implement when Svelte components need third-party libs
|
|
484
|
+
*/
|
|
485
|
+
async bundleDetectedDependencies(_detectedDeps, _options) {
|
|
486
|
+
console.log('[SvelteBundler] External dependency bundling not yet implemented for Svelte');
|
|
487
|
+
return [];
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
// Export singleton instance
|
|
491
|
+
const bundler = new SvelteBundler();
|
|
492
|
+
export default bundler;
|
|
493
|
+
export { bundler };
|
|
494
|
+
// Export individual functions for backward compatibility
|
|
495
|
+
export const bundleDependencies = bundler.bundleDependencies.bind(bundler);
|
|
496
|
+
export const filterRuntimeDependencies = bundler.filterRuntimeDependencies.bind(bundler);
|
|
497
|
+
export const getBundleSize = bundler.getBundleSize.bind(bundler);
|
|
498
|
+
export const formatBundleSize = bundler.formatBundleSize.bind(bundler);
|
|
499
|
+
//# sourceMappingURL=bundler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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AC;IACZ,CAAC;CACF;AAED,4BAA4B;AAC5B,MAAM,OAAO,GAAG,IAAI,aAAa,EAAE,CAAC;AACpC,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC;AAEnB,yDAAyD;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACzF,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte Framework Configuration
|
|
3
|
+
* Svelte-specific externals, plugins, and build settings
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* External dependencies for Svelte
|
|
7
|
+
* These are not bundled - expected to be provided by the runtime environment
|
|
8
|
+
* Matches the bundled outputs from bundler.ts (6-7 optimized files)
|
|
9
|
+
*
|
|
10
|
+
* Note: The builder uses a function-based external configuration to handle
|
|
11
|
+
* ALL svelte/* paths dynamically. This list is for reference.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SVELTE_EXTERNALS: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Get Svelte-specific Vite plugin for client builds
|
|
16
|
+
*/
|
|
17
|
+
export declare function getSveltePlugin(): Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* Get Svelte-specific Vite plugin for server-side rendering builds
|
|
20
|
+
*/
|
|
21
|
+
export declare function getSvelteSSRPlugin(): Promise<any>;
|
|
22
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/lib/svelte/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,UAQ5B,CAAC;AAEF;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,CAepD;AAED;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,GAAG,CAAC,CAkBvD"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte Framework Configuration
|
|
3
|
+
* Svelte-specific externals, plugins, and build settings
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* External dependencies for Svelte
|
|
7
|
+
* These are not bundled - expected to be provided by the runtime environment
|
|
8
|
+
* Matches the bundled outputs from bundler.ts (6-7 optimized files)
|
|
9
|
+
*
|
|
10
|
+
* Note: The builder uses a function-based external configuration to handle
|
|
11
|
+
* ALL svelte/* paths dynamically. This list is for reference.
|
|
12
|
+
*/
|
|
13
|
+
export const SVELTE_EXTERNALS = [
|
|
14
|
+
'svelte',
|
|
15
|
+
'svelte/internal/client',
|
|
16
|
+
'svelte/store',
|
|
17
|
+
'svelte/transition',
|
|
18
|
+
'svelte/motion',
|
|
19
|
+
'svelte/animate',
|
|
20
|
+
'svelte/easing'
|
|
21
|
+
];
|
|
22
|
+
/**
|
|
23
|
+
* Get Svelte-specific Vite plugin for client builds
|
|
24
|
+
*/
|
|
25
|
+
export async function getSveltePlugin() {
|
|
26
|
+
try {
|
|
27
|
+
const { svelte } = await import('@sveltejs/vite-plugin-svelte');
|
|
28
|
+
return svelte({
|
|
29
|
+
compilerOptions: {
|
|
30
|
+
dev: false,
|
|
31
|
+
runes: true,
|
|
32
|
+
customElement: false // Not web components
|
|
33
|
+
},
|
|
34
|
+
emitCss: true // Ensure CSS is emitted
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
console.warn('Failed to load Svelte plugin:', error);
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get Svelte-specific Vite plugin for server-side rendering builds
|
|
44
|
+
*/
|
|
45
|
+
export async function getSvelteSSRPlugin() {
|
|
46
|
+
try {
|
|
47
|
+
const { svelte } = await import('@sveltejs/vite-plugin-svelte');
|
|
48
|
+
return svelte({
|
|
49
|
+
compilerOptions: {
|
|
50
|
+
// @ts-expect-error - generate option is valid for SSR but not in type definitions
|
|
51
|
+
generate: 'ssr', // Server-side rendering mode
|
|
52
|
+
hydratable: true, // Enable client-side hydration support
|
|
53
|
+
dev: false,
|
|
54
|
+
runes: true,
|
|
55
|
+
customElement: false
|
|
56
|
+
},
|
|
57
|
+
emitCss: true // Ensure CSS is emitted for SSR
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
console.warn('Failed to load Svelte SSR plugin:', error);
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/lib/svelte/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ;IACR,wBAAwB;IACxB,cAAc;IACd,mBAAmB;IACnB,eAAe;IACf,gBAAgB;IAChB,eAAe;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,8BAA8B,CAAC,CAAC;QAChE,OAAO,MAAM,CAAC;YACZ,eAAe,EAAE;gBACf,GAAG,EAAE,KAAK;gBACV,KAAK,EAAE,IAAI;gBACX,aAAa,EAAE,KAAK,CAAE,qBAAqB;aAC5C;YACD,OAAO,EAAE,IAAI,CAAE,wBAAwB;SACxC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;QACrD,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,8BAA8B,CAAC,CAAC;QAChE,OAAO,MAAM,CAAC;YACZ,eAAe,EAAE;gBACf,kFAAkF;gBAClF,QAAQ,EAAE,KAAK,EAAM,6BAA6B;gBAClD,UAAU,EAAE,IAAI,EAAK,uCAAuC;gBAC5D,GAAG,EAAE,KAAK;gBACV,KAAK,EAAE,IAAI;gBACX,aAAa,EAAE,KAAK;aACrB;YACD,OAAO,EAAE,IAAI,CAAE,gCAAgC;SAChD,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;QACzD,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte Import Map Generator
|
|
3
|
+
* Svelte-specific implementation for generating import maps
|
|
4
|
+
*/
|
|
5
|
+
import type { IImportMapGenerator, ImportMap, ImportMapWithStylesheets, R2ImportMapOptions } from '../core/types.js';
|
|
6
|
+
declare class SvelteImportMapGenerator implements IImportMapGenerator {
|
|
7
|
+
/**
|
|
8
|
+
* Check if a package is dev-only
|
|
9
|
+
*/
|
|
10
|
+
private isDevOnlyPackage;
|
|
11
|
+
/**
|
|
12
|
+
* Generate import map from package.json dependencies
|
|
13
|
+
* Uses esm.sh CDN for now
|
|
14
|
+
*/
|
|
15
|
+
generateImportMapFromPackageJson(packageJson: any): ImportMap;
|
|
16
|
+
/**
|
|
17
|
+
* Generate import map using R2 URLs
|
|
18
|
+
*/
|
|
19
|
+
generateImportMapWithR2Urls(packageJson: any, options: R2ImportMapOptions): ImportMap;
|
|
20
|
+
/**
|
|
21
|
+
* Generate import map with stylesheets from package.json using R2 URLs
|
|
22
|
+
*/
|
|
23
|
+
generateImportMapWithStylesheets(packageJson: any, options: R2ImportMapOptions): ImportMapWithStylesheets;
|
|
24
|
+
/**
|
|
25
|
+
* Get list of dependencies that need to be bundled
|
|
26
|
+
*/
|
|
27
|
+
getDependenciesToBundle(packageJson: any): Array<{
|
|
28
|
+
name: string;
|
|
29
|
+
version: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
declare const importMapGenerator: SvelteImportMapGenerator;
|
|
33
|
+
export default importMapGenerator;
|
|
34
|
+
export { importMapGenerator };
|
|
35
|
+
export declare const generateImportMapFromPackageJson: (packageJson: any) => ImportMap;
|
|
36
|
+
export declare const generateImportMapWithR2Urls: (packageJson: any, options: R2ImportMapOptions) => ImportMap;
|
|
37
|
+
export declare const generateImportMapWithStylesheets: (packageJson: any, options: R2ImportMapOptions) => ImportMapWithStylesheets;
|
|
38
|
+
export declare const getDependenciesToBundle: (packageJson: any) => {
|
|
39
|
+
name: string;
|
|
40
|
+
version: string;
|
|
41
|
+
}[];
|
|
42
|
+
//# sourceMappingURL=import-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-map.d.ts","sourceRoot":"","sources":["../../../src/lib/svelte/import-map.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAwCrH,cAAM,wBAAyB,YAAW,mBAAmB;IAC3D;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAIxB;;;OAGG;IACH,gCAAgC,CAAC,WAAW,EAAE,GAAG,GAAG,SAAS;IAmD7D;;OAEG;IACH,2BAA2B,CACzB,WAAW,EAAE,GAAG,EAChB,OAAO,EAAE,kBAAkB,GAC1B,SAAS;IA4DZ;;OAEG;IACH,gCAAgC,CAC9B,WAAW,EAAE,GAAG,EAChB,OAAO,EAAE,kBAAkB,GAC1B,wBAAwB;IAqB3B;;OAEG;IACH,uBAAuB,CAAC,WAAW,EAAE,GAAG,GAAG,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAsBpF;AAGD,QAAA,MAAM,kBAAkB,0BAAiC,CAAC;AAC1D,eAAe,kBAAkB,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAG9B,eAAO,MAAM,gCAAgC,GAAI,aAAa,GAAG,cACC,CAAC;AACnE,eAAO,MAAM,2BAA2B,GAAI,aAAa,GAAG,EAAE,SAAS,kBAAkB,cACnB,CAAC;AACvE,eAAO,MAAM,gCAAgC,GAAI,aAAa,GAAG,EAAE,SAAS,kBAAkB,6BACnB,CAAC;AAC5E,eAAO,MAAM,uBAAuB,GAAI,aAAa,GAAG;UApCG,MAAM;aAAW,MAAM;GAqCzB,CAAC"}
|