@a-company/atelier 0.27.2 → 0.27.3

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.cjs CHANGED
@@ -3973,13 +3973,19 @@ function studioCommand(program2) {
3973
3973
  }
3974
3974
  const cwd = process.cwd();
3975
3975
  const cliPackageDir = (0, import_node_path9.resolve)((0, import_node_path9.dirname)(new URL(import_meta.url).pathname), "..");
3976
- const packagesDir = (0, import_node_path9.resolve)(cliPackageDir, "..");
3977
3976
  const tmpId = (0, import_node_crypto.randomBytes)(4).toString("hex");
3978
3977
  const tmpDirRaw = (0, import_node_path9.join)((0, import_node_os.tmpdir)(), `atelier-studio-${tmpId}`);
3979
3978
  (0, import_node_fs9.mkdirSync)(tmpDirRaw, { recursive: true });
3980
3979
  const tmpDir = (0, import_node_fs9.realpathSync)(tmpDirRaw);
3981
3980
  (0, import_node_fs9.writeFileSync)((0, import_node_path9.join)(tmpDir, "index.html"), getInlineHTML());
3982
3981
  (0, import_node_fs9.writeFileSync)((0, import_node_path9.join)(tmpDir, "main.ts"), getInlineApp(file ?? null));
3982
+ const cliNodeModules = (0, import_node_path9.join)(cliPackageDir, "node_modules");
3983
+ if ((0, import_node_fs9.existsSync)(cliNodeModules)) {
3984
+ try {
3985
+ (0, import_node_fs9.symlinkSync)(cliNodeModules, (0, import_node_path9.join)(tmpDir, "node_modules"), "dir");
3986
+ } catch {
3987
+ }
3988
+ }
3983
3989
  console.log(`Starting Atelier Studio...`);
3984
3990
  console.log(` Working directory: ${cwd}`);
3985
3991
  let vite;
@@ -3997,18 +4003,7 @@ function studioCommand(program2) {
3997
4003
  port,
3998
4004
  strictPort: false,
3999
4005
  fs: {
4000
- allow: [tmpDir, packagesDir, cwd]
4001
- }
4002
- },
4003
- resolve: {
4004
- alias: {
4005
- "@a-company/atelier-studio/styles.css": (0, import_node_path9.resolve)(packagesDir, "studio/dist/index.css"),
4006
- "@a-company/atelier-studio": (0, import_node_path9.resolve)(packagesDir, "studio/src/index.ts"),
4007
- "@a-company/atelier-schema": (0, import_node_path9.resolve)(packagesDir, "schema/src/index.ts"),
4008
- "@a-company/atelier-types": (0, import_node_path9.resolve)(packagesDir, "types/src/index.ts"),
4009
- "@a-company/atelier-math": (0, import_node_path9.resolve)(packagesDir, "math/src/index.ts"),
4010
- "@a-company/atelier-core": (0, import_node_path9.resolve)(packagesDir, "core/src/index.ts"),
4011
- "@a-company/atelier-canvas": (0, import_node_path9.resolve)(packagesDir, "canvas/src/index.ts")
4006
+ strict: false
4012
4007
  }
4013
4008
  },
4014
4009
  plugins: [