@viji-dev/sdk 1.0.7 → 1.0.9

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/index.html CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  <!-- Permissions for media access -->
14
14
  <meta http-equiv="Feature-Policy" content="camera 'self'; microphone 'self'; display-capture 'self'" />
15
- <script type="module" crossorigin src="/assets/index-CCbJB3bX.js"></script>
15
+ <script type="module" crossorigin src="/assets/index-CqeSPBKg.js"></script>
16
16
  <link rel="stylesheet" crossorigin href="/assets/index-Cm7ve020.css">
17
17
  </head>
18
18
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viji-dev/sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "description": "Professional toolkit for creating interactive Viji scenes",
6
6
  "keywords": [
@@ -33,7 +33,7 @@
33
33
  "url": "https://github.com/viji-dev/sdk/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@viji-dev/core": "^0.3.32",
36
+ "@viji-dev/core": "^0.3.34",
37
37
  "chokidar": "^4.0.0",
38
38
  "commander": "^12.0.0",
39
39
  "ws": "^8.18.0"
@@ -5,7 +5,7 @@ import { execSync } from 'child_process';
5
5
  import { getSceneTemplate, getGlobalDtsContent, getSceneFileExtension, VALID_RENDERERS } from '../../templates/scene-templates.js';
6
6
  import { validateProjectName } from '../utils/cli-utils.js';
7
7
 
8
- const ROOT_TSCONFIG = JSON.stringify({
8
+ const SCENE_TSCONFIG = JSON.stringify({
9
9
  compilerOptions: {
10
10
  target: 'ESNext',
11
11
  module: 'ESNext',
@@ -14,11 +14,7 @@ const ROOT_TSCONFIG = JSON.stringify({
14
14
  noEmit: true,
15
15
  strict: false,
16
16
  },
17
- }, null, 2) + '\n';
18
-
19
- const SCENE_TSCONFIG = JSON.stringify({
20
- extends: '../../tsconfig.json',
21
- include: ['.', '../../global.d.ts'],
17
+ include: ['.'],
22
18
  }, null, 2) + '\n';
23
19
 
24
20
  function ensureCoreTypes(cwd) {
@@ -67,23 +63,11 @@ export async function createCommand(sceneName, options) {
67
63
  console.log(`Created scene: scenes/${sceneName}/${mainFile} [${renderer} renderer]`);
68
64
 
69
65
  if (renderer !== 'shader' && ensureCoreTypes(cwd)) {
70
- const globalDtsPath = join(cwd, 'global.d.ts');
71
- if (!existsSync(globalDtsPath)) {
72
- const dtsContent = getGlobalDtsContent(renderer);
73
- if (dtsContent) {
74
- await writeFile(globalDtsPath, dtsContent);
75
- }
76
- }
77
-
78
- const rootTsconfigPath = join(cwd, 'tsconfig.json');
79
- if (!existsSync(rootTsconfigPath)) {
80
- await writeFile(rootTsconfigPath, ROOT_TSCONFIG);
81
- }
82
-
83
- const sceneTsconfigPath = join(scenePath, 'tsconfig.json');
84
- if (!existsSync(sceneTsconfigPath)) {
85
- await writeFile(sceneTsconfigPath, SCENE_TSCONFIG);
66
+ const dtsContent = getGlobalDtsContent(renderer);
67
+ if (dtsContent) {
68
+ await writeFile(join(scenePath, 'global.d.ts'), dtsContent);
86
69
  }
70
+ await writeFile(join(scenePath, 'tsconfig.json'), SCENE_TSCONFIG);
87
71
  }
88
72
 
89
73
  console.log('');
@@ -107,8 +107,8 @@ void main() {
107
107
  };
108
108
 
109
109
  const GLOBAL_DTS = {
110
- native: '/// <reference path="node_modules/@viji-dev/core/dist/artist-global.d.ts" />\n',
111
- p5: '/// <reference path="node_modules/@viji-dev/core/dist/artist-global-p5.d.ts" />\n',
110
+ native: '/// <reference path="../../node_modules/@viji-dev/core/dist/artist-global.d.ts" />\n',
111
+ p5: '/// <reference path="../../node_modules/@viji-dev/core/dist/artist-global-p5.d.ts" />\n',
112
112
  shader: null,
113
113
  };
114
114