@evitcastudio/kit 3.2.1 → 3.3.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.
@@ -1,180 +1,180 @@
1
- dist/
2
- lib/
3
- **/resource.json
4
- tests/temp/
5
-
6
- # Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
7
-
8
- # Logs
9
-
10
- logs
11
- _.log
12
- npm-debug.log_
13
- yarn-debug.log*
14
- yarn-error.log*
15
- lerna-debug.log*
16
- .pnpm-debug.log*
17
-
18
- # Caches
19
-
20
- .cache
21
-
22
- # Diagnostic reports (https://nodejs.org/api/report.html)
23
-
24
- report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
25
-
26
- # Runtime data
27
-
28
- pids
29
- _.pid
30
- _.seed
31
- *.pid.lock
32
-
33
- # Directory for instrumented libs generated by jscoverage/JSCover
34
-
35
- lib-cov
36
-
37
- # Coverage directory used by tools like istanbul
38
-
39
- coverage
40
- *.lcov
41
-
42
- # nyc test coverage
43
-
44
- .nyc_output
45
-
46
- # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
47
-
48
- .grunt
49
-
50
- # Bower dependency directory (https://bower.io/)
51
-
52
- bower_components
53
-
54
- # node-waf configuration
55
-
56
- .lock-wscript
57
-
58
- # Compiled binary addons (https://nodejs.org/api/addons.html)
59
-
60
- build/Release
61
-
62
- # Dependency directories
63
-
64
- node_modules/
65
- jspm_packages/
66
-
67
- # Snowpack dependency directory (https://snowpack.dev/)
68
-
69
- web_modules/
70
-
71
- # TypeScript cache
72
-
73
- *.tsbuildinfo
74
-
75
- # Optional npm cache directory
76
-
77
- .npm
78
-
79
- # Optional eslint cache
80
-
81
- .eslintcache
82
-
83
- # Optional stylelint cache
84
-
85
- .stylelintcache
86
-
87
- # Microbundle cache
88
-
89
- .rpt2_cache/
90
- .rts2_cache_cjs/
91
- .rts2_cache_es/
92
- .rts2_cache_umd/
93
-
94
- # Optional REPL history
95
-
96
- .node_repl_history
97
-
98
- # Output of 'npm pack'
99
-
100
- *.tgz
101
-
102
- # Yarn Integrity file
103
-
104
- .yarn-integrity
105
-
106
- # dotenv environment variable files
107
-
108
- .env
109
- .env.development.local
110
- .env.test.local
111
- .env.production.local
112
- .env.local
113
-
114
- # parcel-bundler cache (https://parceljs.org/)
115
-
116
- .parcel-cache
117
-
118
- # Next.js build output
119
-
120
- .next
121
- out
122
-
123
- # Nuxt.js build / generate output
124
-
125
- .nuxt
126
- dist
127
-
128
- # Gatsby files
129
-
130
- # Comment in the public line in if your project uses Gatsby and not Next.js
131
-
132
- # https://nextjs.org/blog/next-9-1#public-directory-support
133
-
134
- # public
135
-
136
- # vuepress build output
137
-
138
- .vuepress/dist
139
-
140
- # vuepress v2.x temp and cache directory
141
-
142
- .temp
143
-
144
- # Docusaurus cache and generated files
145
-
146
- .docusaurus
147
-
148
- # Serverless directories
149
-
150
- .serverless/
151
-
152
- # FuseBox cache
153
-
154
- .fusebox/
155
-
156
- # DynamoDB Local files
157
-
158
- .dynamodb/
159
-
160
- # TernJS port file
161
-
162
- .tern-port
163
-
164
- # Stores VSCode versions used for testing VSCode extensions
165
-
166
- .vscode-test
167
-
168
- # yarn v2
169
-
170
- .yarn/cache
171
- .yarn/unplugged
172
- .yarn/build-state.yml
173
- .yarn/install-state.gz
174
- .pnp.*
175
-
176
- # IntelliJ based IDEs
177
- .idea
178
-
179
- # Finder (MacOS) folder config
180
- .DS_Store
1
+ dist/
2
+ lib/
3
+ **/resource.json
4
+ tests/temp/
5
+
6
+ # Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
7
+
8
+ # Logs
9
+
10
+ logs
11
+ _.log
12
+ npm-debug.log_
13
+ yarn-debug.log*
14
+ yarn-error.log*
15
+ lerna-debug.log*
16
+ .pnpm-debug.log*
17
+
18
+ # Caches
19
+
20
+ .cache
21
+
22
+ # Diagnostic reports (https://nodejs.org/api/report.html)
23
+
24
+ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
25
+
26
+ # Runtime data
27
+
28
+ pids
29
+ _.pid
30
+ _.seed
31
+ *.pid.lock
32
+
33
+ # Directory for instrumented libs generated by jscoverage/JSCover
34
+
35
+ lib-cov
36
+
37
+ # Coverage directory used by tools like istanbul
38
+
39
+ coverage
40
+ *.lcov
41
+
42
+ # nyc test coverage
43
+
44
+ .nyc_output
45
+
46
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
47
+
48
+ .grunt
49
+
50
+ # Bower dependency directory (https://bower.io/)
51
+
52
+ bower_components
53
+
54
+ # node-waf configuration
55
+
56
+ .lock-wscript
57
+
58
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
59
+
60
+ build/Release
61
+
62
+ # Dependency directories
63
+
64
+ node_modules/
65
+ jspm_packages/
66
+
67
+ # Snowpack dependency directory (https://snowpack.dev/)
68
+
69
+ web_modules/
70
+
71
+ # TypeScript cache
72
+
73
+ *.tsbuildinfo
74
+
75
+ # Optional npm cache directory
76
+
77
+ .npm
78
+
79
+ # Optional eslint cache
80
+
81
+ .eslintcache
82
+
83
+ # Optional stylelint cache
84
+
85
+ .stylelintcache
86
+
87
+ # Microbundle cache
88
+
89
+ .rpt2_cache/
90
+ .rts2_cache_cjs/
91
+ .rts2_cache_es/
92
+ .rts2_cache_umd/
93
+
94
+ # Optional REPL history
95
+
96
+ .node_repl_history
97
+
98
+ # Output of 'npm pack'
99
+
100
+ *.tgz
101
+
102
+ # Yarn Integrity file
103
+
104
+ .yarn-integrity
105
+
106
+ # dotenv environment variable files
107
+
108
+ .env
109
+ .env.development.local
110
+ .env.test.local
111
+ .env.production.local
112
+ .env.local
113
+
114
+ # parcel-bundler cache (https://parceljs.org/)
115
+
116
+ .parcel-cache
117
+
118
+ # Next.js build output
119
+
120
+ .next
121
+ out
122
+
123
+ # Nuxt.js build / generate output
124
+
125
+ .nuxt
126
+ dist
127
+
128
+ # Gatsby files
129
+
130
+ # Comment in the public line in if your project uses Gatsby and not Next.js
131
+
132
+ # https://nextjs.org/blog/next-9-1#public-directory-support
133
+
134
+ # public
135
+
136
+ # vuepress build output
137
+
138
+ .vuepress/dist
139
+
140
+ # vuepress v2.x temp and cache directory
141
+
142
+ .temp
143
+
144
+ # Docusaurus cache and generated files
145
+
146
+ .docusaurus
147
+
148
+ # Serverless directories
149
+
150
+ .serverless/
151
+
152
+ # FuseBox cache
153
+
154
+ .fusebox/
155
+
156
+ # DynamoDB Local files
157
+
158
+ .dynamodb/
159
+
160
+ # TernJS port file
161
+
162
+ .tern-port
163
+
164
+ # Stores VSCode versions used for testing VSCode extensions
165
+
166
+ .vscode-test
167
+
168
+ # yarn v2
169
+
170
+ .yarn/cache
171
+ .yarn/unplugged
172
+ .yarn/build-state.yml
173
+ .yarn/install-state.gz
174
+ .pnp.*
175
+
176
+ # IntelliJ based IDEs
177
+ .idea
178
+
179
+ # Finder (MacOS) folder config
180
+ .DS_Store
@@ -10,8 +10,14 @@
10
10
  },
11
11
  "scripts": {
12
12
  "build": "kit build",
13
+ "build:prod": "kit build --prod",
13
14
  "watch": "kit build --watch",
14
- "host": "kit host -b"
15
+ "dev": "kit host -b",
16
+ "start": "kit host",
17
+ "host": "kit host -b",
18
+ "host:prod": "kit host -b --prod",
19
+ "doctor": "kit doctor",
20
+ "create:plugin": "kit create plugin"
15
21
  },
16
22
  "keywords": [],
17
23
  "dependencies": {
@@ -1 +1,7 @@
1
- {}
1
+ {
2
+ "interface": [],
3
+ "icon": [],
4
+ "map": [],
5
+ "sound": [],
6
+ "macros": []
7
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"app-bundler.d.ts","sourceRoot":"","sources":["../../src/cli/app-bundler.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9D,MAAM,WAAW,gBAAgB;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CA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YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CAyLhI"}
@@ -65,6 +65,14 @@ async function copyStaticWebFiles(pSourceDir, pDestDir, pBaseDir) {
65
65
  const targetPath = join(pDestDir, relativePath);
66
66
  await fs.mkdir(dirname(targetPath), { recursive: true });
67
67
  await fs.copyFile(fullPath, targetPath);
68
+ // If the asset is located in a nested directory, also provide a copy at destination root
69
+ // to support projects where root HTML references sub-folder styles directly
70
+ if (['.css', '.ico'].includes(ext)) {
71
+ const rootTargetPath = join(pDestDir, entry.name);
72
+ if (targetPath !== rootTargetPath && !existsSync(rootTargetPath)) {
73
+ await fs.copyFile(fullPath, rootTargetPath);
74
+ }
75
+ }
68
76
  }
69
77
  }
70
78
  }
@@ -115,7 +123,11 @@ export async function bundleApp(pProjectRoot, pOutDir, pOptions = {}) {
115
123
  const startStamp = Date.now();
116
124
  const clientResult = await Bun.build({
117
125
  entrypoints: [join(srcDir, 'index.ts')],
118
- naming: 'index.js',
126
+ naming: {
127
+ entry: 'index.[ext]',
128
+ chunk: '[name]-[hash].[ext]',
129
+ asset: '[name].[ext]'
130
+ },
119
131
  outdir: pOutDir,
120
132
  target: 'browser',
121
133
  banner,
@@ -154,7 +166,11 @@ export async function bundleApp(pProjectRoot, pOutDir, pOptions = {}) {
154
166
  const clientStart = Date.now();
155
167
  const clientResult = await Bun.build({
156
168
  entrypoints: [clientEntry],
157
- naming: 'index.js',
169
+ naming: {
170
+ entry: 'index.[ext]',
171
+ chunk: '[name]-[hash].[ext]',
172
+ asset: '[name].[ext]'
173
+ },
158
174
  outdir: pOutDir,
159
175
  target: 'browser',
160
176
  banner,
@@ -181,7 +197,11 @@ export async function bundleApp(pProjectRoot, pOutDir, pOptions = {}) {
181
197
  const serverStart = Date.now();
182
198
  const serverResult = await Bun.build({
183
199
  entrypoints: [serverEntry],
184
- naming: 'server.js',
200
+ naming: {
201
+ entry: 'server.[ext]',
202
+ chunk: '[name]-[hash].[ext]',
203
+ asset: '[name].[ext]'
204
+ },
185
205
  outdir: pOutDir,
186
206
  target: 'node',
187
207
  banner,
package/lib/cli/host.js CHANGED
@@ -46,7 +46,7 @@ export async function processHost(pOptions = {}) {
46
46
  console.error(chalk.red(`\n[Kit Host] ${message}\n`));
47
47
  return { success: false, message };
48
48
  }
49
- console.log(chalk.cyan(`\nšŸŽ® Starting Multiplayer Server from ${chalk.bold(distDir)}...\n`));
49
+ console.log(chalk.cyan(`\nStarting Multiplayer Server from ${chalk.bold(distDir)}...\n`));
50
50
  let serverSettingsPort = port;
51
51
  const settingsPath = join(distDir, 'settings.json');
52
52
  if (existsSync(settingsPath)) {
@@ -100,7 +100,7 @@ export async function processHost(pOptions = {}) {
100
100
  return new Response(file);
101
101
  }
102
102
  });
103
- console.log(chalk.cyan('\nšŸŽ® Kit Game Host Server\n'));
103
+ console.log(chalk.cyan('\nKit Game Host Server\n'));
104
104
  console.log(` ${chalk.bold('Local:')} ${chalk.green(`http://localhost:${server.port}`)}`);
105
105
  if (lanIp !== 'localhost') {
106
106
  console.log(` ${chalk.bold('Network:')} ${chalk.green(`http://${lanIp}:${server.port}`)}`);
@@ -1 +1 @@
1
- {"version":3,"file":"resource-builder.d.ts","sourceRoot":"","sources":["../../src/cli/resource-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAggB9C;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCvL"}
1
+ {"version":3,"file":"resource-builder.d.ts","sourceRoot":"","sources":["../../src/cli/resource-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA0oB9C;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCvL"}