@playdrop/playdrop-cli 0.6.4 → 0.6.5
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/config/client-meta.json +4 -4
- package/dist/commands/create.js +17 -3
- package/node_modules/@playdrop/config/client-meta.json +4 -4
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/node_modules/@playdrop/boxel-core/dist/test/entity-utils.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/entity-utils.test.js +0 -92
- package/node_modules/@playdrop/boxel-core/dist/test/entity-utils.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/greedy-mesher.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/greedy-mesher.test.js +0 -48
- package/node_modules/@playdrop/boxel-core/dist/test/greedy-mesher.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/humanoid/humanoid-builders.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/humanoid/humanoid-builders.test.js +0 -270
- package/node_modules/@playdrop/boxel-core/dist/test/humanoid/humanoid-builders.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/index.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/index.test.js +0 -48
- package/node_modules/@playdrop/boxel-core/dist/test/index.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/layer-mode.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/layer-mode.test.js +0 -67
- package/node_modules/@playdrop/boxel-core/dist/test/layer-mode.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/materials.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/materials.test.js +0 -55
- package/node_modules/@playdrop/boxel-core/dist/test/materials.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/palette-tools.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/palette-tools.test.js +0 -124
- package/node_modules/@playdrop/boxel-core/dist/test/palette-tools.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/serialization.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/serialization.test.js +0 -35
- package/node_modules/@playdrop/boxel-core/dist/test/serialization.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/textures.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/textures.test.js +0 -120
- package/node_modules/@playdrop/boxel-core/dist/test/textures.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/types.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/types.test.js +0 -32
- package/node_modules/@playdrop/boxel-core/dist/test/types.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/upscale.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/upscale.test.js +0 -100
- package/node_modules/@playdrop/boxel-core/dist/test/upscale.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/validation.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/validation.test.js +0 -61
- package/node_modules/@playdrop/boxel-core/dist/test/validation.test.js.map +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/voxels.test.d.ts +0 -1
- package/node_modules/@playdrop/boxel-core/dist/test/voxels.test.js +0 -51
- package/node_modules/@playdrop/boxel-core/dist/test/voxels.test.js.map +0 -1
- package/node_modules/@playdrop/config/dist/src/creator-docs.d.ts +0 -24
- package/node_modules/@playdrop/config/dist/src/creator-docs.d.ts.map +0 -1
- package/node_modules/@playdrop/config/dist/src/creator-docs.js +0 -253
- package/node_modules/@playdrop/config/dist/src/creator-faq.d.ts +0 -17
- package/node_modules/@playdrop/config/dist/src/creator-faq.d.ts.map +0 -1
- package/node_modules/@playdrop/config/dist/src/creator-faq.js +0 -141
- package/node_modules/@playdrop/config/dist/test/creator-docs.test.d.ts +0 -2
- package/node_modules/@playdrop/config/dist/test/creator-docs.test.d.ts.map +0 -1
- package/node_modules/@playdrop/config/dist/test/creator-docs.test.js +0 -36
package/config/client-meta.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.6.
|
|
2
|
+
"version": "0.6.5",
|
|
3
3
|
"build": 1,
|
|
4
4
|
"platforms": {
|
|
5
5
|
"ios": {
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"clients": {
|
|
28
28
|
"web": {
|
|
29
|
-
"minimumVersion": "0.6.
|
|
29
|
+
"minimumVersion": "0.6.5",
|
|
30
30
|
"minimumBuild": 1
|
|
31
31
|
},
|
|
32
32
|
"admin": {
|
|
33
|
-
"minimumVersion": "0.6.
|
|
33
|
+
"minimumVersion": "0.6.5",
|
|
34
34
|
"minimumBuild": 1
|
|
35
35
|
},
|
|
36
36
|
"apple": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"minimumBuild": 1
|
|
47
47
|
},
|
|
48
48
|
"cli": {
|
|
49
|
-
"minimumVersion": "0.6.
|
|
49
|
+
"minimumVersion": "0.6.5"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
package/dist/commands/create.js
CHANGED
|
@@ -19,11 +19,25 @@ const init_1 = require("./init");
|
|
|
19
19
|
const app_1 = require("@playdrop/types/app");
|
|
20
20
|
const catalogue_utils_1 = require("../catalogue-utils");
|
|
21
21
|
const catalogue_1 = require("../catalogue");
|
|
22
|
+
const clientInfo_1 = require("../clientInfo");
|
|
22
23
|
const CATALOGUE_FILENAME = 'catalogue.json';
|
|
23
24
|
const LEGACY_CATALOGUE_VERSION_KEY = ['schema', 'Version'].join('');
|
|
24
25
|
const ALLOWED_CATALOGUE_TOP_LEVEL_KEYS = new Set(['apps', 'assetSpecs', 'assets', 'assetPacks']);
|
|
25
|
-
|
|
26
|
-
const
|
|
26
|
+
function buildArchiveDownloadHeaders(url, apiBase, token) {
|
|
27
|
+
const targetUrl = new URL(url, apiBase);
|
|
28
|
+
const apiOrigin = new URL(apiBase).origin;
|
|
29
|
+
if (targetUrl.origin !== apiOrigin) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
const headers = new Headers((0, clientInfo_1.createClientHeaders)());
|
|
33
|
+
if (token.trim().length > 0) {
|
|
34
|
+
headers.set('authorization', `Bearer ${token}`);
|
|
35
|
+
}
|
|
36
|
+
return headers;
|
|
37
|
+
}
|
|
38
|
+
async function downloadArchive(url, apiBase, token) {
|
|
39
|
+
const headers = buildArchiveDownloadHeaders(url, apiBase, token);
|
|
40
|
+
const response = await fetch(url, headers ? { headers } : undefined);
|
|
27
41
|
if (!response.ok) {
|
|
28
42
|
throw new Error(`Failed to download project archive (${response.status})`);
|
|
29
43
|
}
|
|
@@ -1179,7 +1193,7 @@ async function create(name, options = {}) {
|
|
|
1179
1193
|
try {
|
|
1180
1194
|
const archiveBuffer = remixSourceTarget
|
|
1181
1195
|
? new Uint8Array(await (await client.downloadAppSource(remixSourceTarget.creator, remixSourceTarget.name, remixSourceTarget.version)).blob.arrayBuffer())
|
|
1182
|
-
: await downloadArchive(resolveArchiveDownloadUrl(scaffold.archiveUrl, ctx.envConfig.apiBase));
|
|
1196
|
+
: await downloadArchive(resolveArchiveDownloadUrl(scaffold.archiveUrl, ctx.envConfig.apiBase), ctx.envConfig.apiBase, ctx.token);
|
|
1183
1197
|
const extraction = extractProjectArchive(archiveBuffer, projectDir);
|
|
1184
1198
|
const extractedCatalogue = (0, node_path_1.resolve)(projectDir, CATALOGUE_FILENAME);
|
|
1185
1199
|
projectCataloguePath = (0, node_fs_1.existsSync)(extractedCatalogue) ? extractedCatalogue : null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.6.
|
|
2
|
+
"version": "0.6.5",
|
|
3
3
|
"build": 1,
|
|
4
4
|
"platforms": {
|
|
5
5
|
"ios": {
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"clients": {
|
|
28
28
|
"web": {
|
|
29
|
-
"minimumVersion": "0.6.
|
|
29
|
+
"minimumVersion": "0.6.5",
|
|
30
30
|
"minimumBuild": 1
|
|
31
31
|
},
|
|
32
32
|
"admin": {
|
|
33
|
-
"minimumVersion": "0.6.
|
|
33
|
+
"minimumVersion": "0.6.5",
|
|
34
34
|
"minimumBuild": 1
|
|
35
35
|
},
|
|
36
36
|
"apple": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"minimumBuild": 1
|
|
47
47
|
},
|
|
48
48
|
"cli": {
|
|
49
|
-
"minimumVersion": "0.6.
|
|
49
|
+
"minimumVersion": "0.6.5"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|