@hot-updater/standalone 1.0.0-rc.39 → 1.0.0-rc.41
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.cjs +12 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +12 -3
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -229,8 +229,8 @@ const createStandaloneCoreApi = (config) => {
|
|
|
229
229
|
//#region src/standaloneRepository.ts
|
|
230
230
|
/**
|
|
231
231
|
* A self-hosted server's database for the CLI and console: core's API over
|
|
232
|
-
* the server's admin API protocol 2, and
|
|
233
|
-
* routes core does not cover, which its plugins serve. Plugins' tables belong
|
|
232
|
+
* the server's admin API protocol 2, and requests to its admin handler for
|
|
233
|
+
* the routes core does not cover, which its plugins serve. Plugins' tables belong
|
|
234
234
|
* to the server's own database.
|
|
235
235
|
*/
|
|
236
236
|
const standaloneRepository = (config) => {
|
|
@@ -238,7 +238,16 @@ const standaloneRepository = (config) => {
|
|
|
238
238
|
return Object.freeze({
|
|
239
239
|
name: "standalone-repository",
|
|
240
240
|
core: createStandaloneCoreApi(config),
|
|
241
|
-
fetchAdmin: (path
|
|
241
|
+
fetchAdmin: (path, init = {}) => {
|
|
242
|
+
const headers = new Headers(http.headers({ "Cache-Control": "no-cache" }));
|
|
243
|
+
new Headers(init.headers).forEach((value, name) => {
|
|
244
|
+
headers.set(name, value);
|
|
245
|
+
});
|
|
246
|
+
return fetch(http.buildUrl(path), {
|
|
247
|
+
...init,
|
|
248
|
+
headers
|
|
249
|
+
});
|
|
250
|
+
}
|
|
242
251
|
});
|
|
243
252
|
};
|
|
244
253
|
//#endregion
|
package/dist/index.d.cts
CHANGED
|
@@ -31,8 +31,8 @@ declare class StandaloneDatabaseError extends Error {
|
|
|
31
31
|
type StandaloneRepository = RemoteDatabase;
|
|
32
32
|
/**
|
|
33
33
|
* A self-hosted server's database for the CLI and console: core's API over
|
|
34
|
-
* the server's admin API protocol 2, and
|
|
35
|
-
* routes core does not cover, which its plugins serve. Plugins' tables belong
|
|
34
|
+
* the server's admin API protocol 2, and requests to its admin handler for
|
|
35
|
+
* the routes core does not cover, which its plugins serve. Plugins' tables belong
|
|
36
36
|
* to the server's own database.
|
|
37
37
|
*/
|
|
38
38
|
declare const standaloneRepository: (config: StandaloneRepositoryConfig) => StandaloneRepository;
|
package/dist/index.d.mts
CHANGED
|
@@ -31,8 +31,8 @@ declare class StandaloneDatabaseError extends Error {
|
|
|
31
31
|
type StandaloneRepository = RemoteDatabase;
|
|
32
32
|
/**
|
|
33
33
|
* A self-hosted server's database for the CLI and console: core's API over
|
|
34
|
-
* the server's admin API protocol 2, and
|
|
35
|
-
* routes core does not cover, which its plugins serve. Plugins' tables belong
|
|
34
|
+
* the server's admin API protocol 2, and requests to its admin handler for
|
|
35
|
+
* the routes core does not cover, which its plugins serve. Plugins' tables belong
|
|
36
36
|
* to the server's own database.
|
|
37
37
|
*/
|
|
38
38
|
declare const standaloneRepository: (config: StandaloneRepositoryConfig) => StandaloneRepository;
|
package/dist/index.mjs
CHANGED
|
@@ -228,8 +228,8 @@ const createStandaloneCoreApi = (config) => {
|
|
|
228
228
|
//#region src/standaloneRepository.ts
|
|
229
229
|
/**
|
|
230
230
|
* A self-hosted server's database for the CLI and console: core's API over
|
|
231
|
-
* the server's admin API protocol 2, and
|
|
232
|
-
* routes core does not cover, which its plugins serve. Plugins' tables belong
|
|
231
|
+
* the server's admin API protocol 2, and requests to its admin handler for
|
|
232
|
+
* the routes core does not cover, which its plugins serve. Plugins' tables belong
|
|
233
233
|
* to the server's own database.
|
|
234
234
|
*/
|
|
235
235
|
const standaloneRepository = (config) => {
|
|
@@ -237,7 +237,16 @@ const standaloneRepository = (config) => {
|
|
|
237
237
|
return Object.freeze({
|
|
238
238
|
name: "standalone-repository",
|
|
239
239
|
core: createStandaloneCoreApi(config),
|
|
240
|
-
fetchAdmin: (path
|
|
240
|
+
fetchAdmin: (path, init = {}) => {
|
|
241
|
+
const headers = new Headers(http.headers({ "Cache-Control": "no-cache" }));
|
|
242
|
+
new Headers(init.headers).forEach((value, name) => {
|
|
243
|
+
headers.set(name, value);
|
|
244
|
+
});
|
|
245
|
+
return fetch(http.buildUrl(path), {
|
|
246
|
+
...init,
|
|
247
|
+
headers
|
|
248
|
+
});
|
|
249
|
+
}
|
|
241
250
|
});
|
|
242
251
|
};
|
|
243
252
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/standalone",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.41",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@hot-updater/
|
|
46
|
-
"@hot-updater/
|
|
45
|
+
"@hot-updater/protocol": "1.0.0-rc.41",
|
|
46
|
+
"@hot-updater/plugin-core": "1.0.0-rc.41"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"mime": "2.6.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"msw": "^2.7.0",
|
|
53
53
|
"verkit": "0.4.0",
|
|
54
54
|
"vitest": "4.1.4",
|
|
55
|
-
"@hot-updater/test-utils": "1.0.0-rc.
|
|
55
|
+
"@hot-updater/test-utils": "1.0.0-rc.41"
|
|
56
56
|
},
|
|
57
57
|
"nx": {
|
|
58
58
|
"implicitDependencies": [
|