@playcademy/sdk 0.1.15 → 0.1.16
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.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/types.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -4116,7 +4116,7 @@ declare class PlaycademyClient {
|
|
|
4116
4116
|
}) => void) | (() => void) | ((isVisible: boolean) => void)) => void;
|
|
4117
4117
|
removeAllListeners: () => void;
|
|
4118
4118
|
getListenerCounts: () => Record<string, number>;
|
|
4119
|
-
|
|
4119
|
+
assets: {
|
|
4120
4120
|
url(pathOrStrings: string | TemplateStringsArray, ...values: unknown[]): string;
|
|
4121
4121
|
fetch: (path: string, options?: RequestInit) => Promise<Response>;
|
|
4122
4122
|
json: <T = unknown>(path: string) => Promise<T>;
|
package/dist/index.js
CHANGED
|
@@ -1099,7 +1099,7 @@ function createRuntimeNamespace(client) {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
return counts;
|
|
1101
1101
|
},
|
|
1102
|
-
|
|
1102
|
+
assets: {
|
|
1103
1103
|
url(pathOrStrings, ...values) {
|
|
1104
1104
|
const gameUrl = client["initPayload"]?.gameUrl;
|
|
1105
1105
|
let path;
|
|
@@ -1127,19 +1127,19 @@ function createRuntimeNamespace(client) {
|
|
|
1127
1127
|
return fetch(gameUrl + cleanPath, options);
|
|
1128
1128
|
},
|
|
1129
1129
|
json: async (path) => {
|
|
1130
|
-
const response = await client.runtime.
|
|
1130
|
+
const response = await client.runtime.assets.fetch(path);
|
|
1131
1131
|
return response.json();
|
|
1132
1132
|
},
|
|
1133
1133
|
blob: async (path) => {
|
|
1134
|
-
const response = await client.runtime.
|
|
1134
|
+
const response = await client.runtime.assets.fetch(path);
|
|
1135
1135
|
return response.blob();
|
|
1136
1136
|
},
|
|
1137
1137
|
text: async (path) => {
|
|
1138
|
-
const response = await client.runtime.
|
|
1138
|
+
const response = await client.runtime.assets.fetch(path);
|
|
1139
1139
|
return response.text();
|
|
1140
1140
|
},
|
|
1141
1141
|
arrayBuffer: async (path) => {
|
|
1142
|
-
const response = await client.runtime.
|
|
1142
|
+
const response = await client.runtime.assets.fetch(path);
|
|
1143
1143
|
return response.arrayBuffer();
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -4791,7 +4791,7 @@ declare class PlaycademyClient {
|
|
|
4791
4791
|
}) => void) | (() => void) | ((isVisible: boolean) => void)) => void;
|
|
4792
4792
|
removeAllListeners: () => void;
|
|
4793
4793
|
getListenerCounts: () => Record<string, number>;
|
|
4794
|
-
|
|
4794
|
+
assets: {
|
|
4795
4795
|
url(pathOrStrings: string | TemplateStringsArray, ...values: unknown[]): string;
|
|
4796
4796
|
fetch: (path: string, options?: RequestInit) => Promise<Response>;
|
|
4797
4797
|
json: <T = unknown>(path: string) => Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcademy/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@playcademy/timeback": "0.0.1",
|
|
43
43
|
"@playcademy/utils": "0.0.1",
|
|
44
44
|
"@types/bun": "latest",
|
|
45
|
-
"playcademy": "0.14.
|
|
45
|
+
"playcademy": "0.14.6",
|
|
46
46
|
"rollup": "^4.50.2",
|
|
47
47
|
"rollup-plugin-dts": "^6.2.3",
|
|
48
48
|
"typescript": "^5.7.2"
|