@tscircuit/cli 0.1.1439 → 0.1.1440
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/dist/cli/main.js +12 -1
- package/dist/lib/index.js +12 -1
- package/package.json +1 -1
package/dist/cli/main.js
CHANGED
|
@@ -250926,6 +250926,7 @@ Publish completed with ${uploadResults.succeeded.length} files uploaded and ${up
|
|
|
250926
250926
|
// lib/dev/DevServer.ts
|
|
250927
250927
|
var debug13 = Debug3("tscircuit:devserver");
|
|
250928
250928
|
var BINARY_FILE_EXTENSIONS2 = new Set([".glb", ".png", ".jpeg", ".jpg"]);
|
|
250929
|
+
var CONFIG_MODULE_FILENAMES2 = ["tscircuit.config.ts", "tscircuit.config.js"];
|
|
250929
250930
|
|
|
250930
250931
|
class DevServer {
|
|
250931
250932
|
port;
|
|
@@ -251120,7 +251121,7 @@ class DevServer {
|
|
|
251120
251121
|
async uploadInitialNodeModules() {
|
|
251121
251122
|
try {
|
|
251122
251123
|
console.log(kleur_default.blue("Analyzing node_modules dependencies..."));
|
|
251123
|
-
const nodeModuleFiles =
|
|
251124
|
+
const nodeModuleFiles = Array.from(new Set(this.getInitialNodeModuleDependencyEntryFiles().flatMap((entryFilePath) => getAllNodeModuleFilePaths(entryFilePath, this.projectDir))));
|
|
251124
251125
|
console.log(kleur_default.blue(`Found ${nodeModuleFiles.length} node_modules files to upload`));
|
|
251125
251126
|
if (nodeModuleFiles.length > 0) {
|
|
251126
251127
|
await this.uploadNodeModuleFiles(nodeModuleFiles);
|
|
@@ -251168,6 +251169,16 @@ class DevServer {
|
|
|
251168
251169
|
throw error;
|
|
251169
251170
|
}
|
|
251170
251171
|
}
|
|
251172
|
+
getInitialNodeModuleDependencyEntryFiles() {
|
|
251173
|
+
const entryFiles = [this.componentFilePath];
|
|
251174
|
+
for (const configFileName of CONFIG_MODULE_FILENAMES2) {
|
|
251175
|
+
const configPath = path56.join(this.projectDir, configFileName);
|
|
251176
|
+
if (fs52.existsSync(configPath)) {
|
|
251177
|
+
entryFiles.push(configPath);
|
|
251178
|
+
}
|
|
251179
|
+
}
|
|
251180
|
+
return entryFiles;
|
|
251181
|
+
}
|
|
251171
251182
|
async postBinaryFileUpsertMultipart({
|
|
251172
251183
|
filePath,
|
|
251173
251184
|
initiator,
|
package/dist/lib/index.js
CHANGED
|
@@ -78809,6 +78809,7 @@ Publish completed with ${uploadResults.succeeded.length} files uploaded and ${up
|
|
|
78809
78809
|
// lib/dev/DevServer.ts
|
|
78810
78810
|
var debug2 = Debug2("tscircuit:devserver");
|
|
78811
78811
|
var BINARY_FILE_EXTENSIONS2 = new Set([".glb", ".png", ".jpeg", ".jpg"]);
|
|
78812
|
+
var CONFIG_MODULE_FILENAMES2 = ["tscircuit.config.ts", "tscircuit.config.js"];
|
|
78812
78813
|
|
|
78813
78814
|
class DevServer {
|
|
78814
78815
|
port;
|
|
@@ -79003,7 +79004,7 @@ class DevServer {
|
|
|
79003
79004
|
async uploadInitialNodeModules() {
|
|
79004
79005
|
try {
|
|
79005
79006
|
console.log(kleur_default.blue("Analyzing node_modules dependencies..."));
|
|
79006
|
-
const nodeModuleFiles =
|
|
79007
|
+
const nodeModuleFiles = Array.from(new Set(this.getInitialNodeModuleDependencyEntryFiles().flatMap((entryFilePath) => getAllNodeModuleFilePaths(entryFilePath, this.projectDir))));
|
|
79007
79008
|
console.log(kleur_default.blue(`Found ${nodeModuleFiles.length} node_modules files to upload`));
|
|
79008
79009
|
if (nodeModuleFiles.length > 0) {
|
|
79009
79010
|
await this.uploadNodeModuleFiles(nodeModuleFiles);
|
|
@@ -79051,6 +79052,16 @@ class DevServer {
|
|
|
79051
79052
|
throw error;
|
|
79052
79053
|
}
|
|
79053
79054
|
}
|
|
79055
|
+
getInitialNodeModuleDependencyEntryFiles() {
|
|
79056
|
+
const entryFiles = [this.componentFilePath];
|
|
79057
|
+
for (const configFileName of CONFIG_MODULE_FILENAMES2) {
|
|
79058
|
+
const configPath = path26.join(this.projectDir, configFileName);
|
|
79059
|
+
if (fs25.existsSync(configPath)) {
|
|
79060
|
+
entryFiles.push(configPath);
|
|
79061
|
+
}
|
|
79062
|
+
}
|
|
79063
|
+
return entryFiles;
|
|
79064
|
+
}
|
|
79054
79065
|
async postBinaryFileUpsertMultipart({
|
|
79055
79066
|
filePath,
|
|
79056
79067
|
initiator,
|