@devvit/runtimes 0.11.0-next-2024-07-10-de536ed67.0 → 0.11.0-next-2024-07-10-85ade0a81.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -58,7 +58,7 @@ export class BootstrapActor {
|
|
58
58
|
// dispatcher routes the requests to the upstream envelope port where they
|
59
59
|
// leave the worker and are observed by the central dispatcher.
|
60
60
|
const clients = new LinkedBundleClientFactory(__classPrivateFieldGet(this, _BootstrapActor_dispatcher, "f"), bundle, __classPrivateFieldGet(this, _BootstrapActor_logger, "f"));
|
61
|
-
const cfg = new Config(clients, bundle.actor, bundle.assets);
|
61
|
+
const cfg = new Config(clients, bundle.actor, bundle.assets, bundle.webviewAssets);
|
62
62
|
globalThis.devvit ?? (globalThis.devvit = {});
|
63
63
|
globalThis.devvit.config = cfg;
|
64
64
|
const svc = new ActorClass(cfg);
|
@@ -7,8 +7,9 @@ import type { ClientFactory } from '../../lib/Types.js';
|
|
7
7
|
export declare class Config implements ConfigInterface {
|
8
8
|
#private;
|
9
9
|
get assets(): Readonly<AssetMap>;
|
10
|
+
get webviewAssets(): Readonly<AssetMap>;
|
10
11
|
get providedDefinitions(): Readonly<Definition>[];
|
11
|
-
constructor(factory: ClientFactory, actorSpec: ActorSpec, assets: AssetMap);
|
12
|
+
constructor(factory: ClientFactory, actorSpec: ActorSpec, assets: AssetMap, webviewAssets: AssetMap);
|
12
13
|
export(namespace: Readonly<Namespace>): DependencySpec;
|
13
14
|
provides(definition: Readonly<Definition>): void;
|
14
15
|
use<T>(definition: Readonly<Definition>, options?: Readonly<DeepPartial<PackageQuery>>): T;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../src/common/bundle/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAe,MAAM,gBAAgB,CAAC;AAClG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,KA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AU,CAAC,EAAE,OAAO,GAAE,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,CAAM,GAAG,CAAC;IAY9F,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,OAAO;CAWhD"}
|
package/common/bundle/Config.js
CHANGED
@@ -9,7 +9,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
11
11
|
};
|
12
|
-
var _Config_instances, _Config_factory, _Config_name, _Config_owner, _Config_provides, _Config_useQueries, _Config_version, _Config_assets, _Config_newActorSpec;
|
12
|
+
var _Config_instances, _Config_factory, _Config_name, _Config_owner, _Config_provides, _Config_useQueries, _Config_version, _Config_assets, _Config_webviewAssets, _Config_newActorSpec;
|
13
13
|
import { ActorSpec, Definition, DependencySpec, PackageQuery, PackageSpec } from '@devvit/protos';
|
14
14
|
import { NonNull } from '@devvit/shared-types/NonNull.js';
|
15
15
|
import { PLUGIN_NAME, resolveActorHostname } from '../../lib/HostnameUtil.js';
|
@@ -17,10 +17,13 @@ export class Config {
|
|
17
17
|
get assets() {
|
18
18
|
return __classPrivateFieldGet(this, _Config_assets, "f");
|
19
19
|
}
|
20
|
+
get webviewAssets() {
|
21
|
+
return __classPrivateFieldGet(this, _Config_webviewAssets, "f");
|
22
|
+
}
|
20
23
|
get providedDefinitions() {
|
21
24
|
return __classPrivateFieldGet(this, _Config_provides, "f");
|
22
25
|
}
|
23
|
-
constructor(factory, actorSpec, assets) {
|
26
|
+
constructor(factory, actorSpec, assets, webviewAssets) {
|
24
27
|
_Config_instances.add(this);
|
25
28
|
_Config_factory.set(this, void 0);
|
26
29
|
_Config_name.set(this, void 0);
|
@@ -29,11 +32,13 @@ export class Config {
|
|
29
32
|
_Config_useQueries.set(this, []);
|
30
33
|
_Config_version.set(this, void 0);
|
31
34
|
_Config_assets.set(this, void 0);
|
35
|
+
_Config_webviewAssets.set(this, void 0);
|
32
36
|
__classPrivateFieldSet(this, _Config_factory, factory, "f");
|
33
37
|
__classPrivateFieldSet(this, _Config_name, actorSpec.name, "f");
|
34
38
|
__classPrivateFieldSet(this, _Config_owner, actorSpec.owner, "f");
|
35
39
|
__classPrivateFieldSet(this, _Config_version, actorSpec.version, "f");
|
36
40
|
__classPrivateFieldSet(this, _Config_assets, Object.freeze(assets), "f");
|
41
|
+
__classPrivateFieldSet(this, _Config_webviewAssets, Object.freeze(webviewAssets), "f");
|
37
42
|
}
|
38
43
|
export(namespace) {
|
39
44
|
return DependencySpec.fromPartial({
|
@@ -66,7 +71,7 @@ export class Config {
|
|
66
71
|
return __classPrivateFieldGet(this, _Config_useQueries, "f").some((query) => query.typeName === definition.fullName);
|
67
72
|
}
|
68
73
|
}
|
69
|
-
_Config_factory = new WeakMap(), _Config_name = new WeakMap(), _Config_owner = new WeakMap(), _Config_provides = new WeakMap(), _Config_useQueries = new WeakMap(), _Config_version = new WeakMap(), _Config_assets = new WeakMap(), _Config_instances = new WeakSet(), _Config_newActorSpec = function _Config_newActorSpec() {
|
74
|
+
_Config_factory = new WeakMap(), _Config_name = new WeakMap(), _Config_owner = new WeakMap(), _Config_provides = new WeakMap(), _Config_useQueries = new WeakMap(), _Config_version = new WeakMap(), _Config_assets = new WeakMap(), _Config_webviewAssets = new WeakMap(), _Config_instances = new WeakSet(), _Config_newActorSpec = function _Config_newActorSpec() {
|
70
75
|
return ActorSpec.fromPartial({
|
71
76
|
name: __classPrivateFieldGet(this, _Config_name, "f") ?? '',
|
72
77
|
owner: __classPrivateFieldGet(this, _Config_owner, "f") ?? '',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@devvit/runtimes",
|
3
|
-
"version": "0.11.0-next-2024-07-10-
|
3
|
+
"version": "0.11.0-next-2024-07-10-85ade0a81.0",
|
4
4
|
"license": "BSD-3-Clause",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -26,9 +26,9 @@
|
|
26
26
|
},
|
27
27
|
"types": "./index.d.ts",
|
28
28
|
"dependencies": {
|
29
|
-
"@devvit/protos": "0.11.0-next-2024-07-10-
|
30
|
-
"@devvit/shared-types": "0.11.0-next-2024-07-10-
|
31
|
-
"@devvit/web-worker": "0.11.0-next-2024-07-10-
|
29
|
+
"@devvit/protos": "0.11.0-next-2024-07-10-85ade0a81.0",
|
30
|
+
"@devvit/shared-types": "0.11.0-next-2024-07-10-85ade0a81.0",
|
31
|
+
"@devvit/web-worker": "0.11.0-next-2024-07-10-85ade0a81.0",
|
32
32
|
"base64-js": "1.5.1",
|
33
33
|
"buffer": "6.0.3",
|
34
34
|
"cron-parser": "4.7.1",
|
@@ -39,9 +39,9 @@
|
|
39
39
|
"uuid": "9.0.0"
|
40
40
|
},
|
41
41
|
"devDependencies": {
|
42
|
-
"@devvit/eslint-config": "0.11.0-next-2024-07-10-
|
43
|
-
"@devvit/repo-tools": "0.11.0-next-2024-07-10-
|
44
|
-
"@devvit/tsconfig": "0.11.0-next-2024-07-10-
|
42
|
+
"@devvit/eslint-config": "0.11.0-next-2024-07-10-85ade0a81.0",
|
43
|
+
"@devvit/repo-tools": "0.11.0-next-2024-07-10-85ade0a81.0",
|
44
|
+
"@devvit/tsconfig": "0.11.0-next-2024-07-10-85ade0a81.0",
|
45
45
|
"@types/node-localstorage": "1.3.0",
|
46
46
|
"@types/uuid": "9.0.0",
|
47
47
|
"concurrently": "7.5.0",
|
@@ -55,5 +55,5 @@
|
|
55
55
|
"directory": "dist"
|
56
56
|
},
|
57
57
|
"source": "./src/index.ts",
|
58
|
-
"gitHead": "
|
58
|
+
"gitHead": "54200ca6b8754acacbe1c9a76b82ec96d309b0de"
|
59
59
|
}
|
package/worker.bootstrap.cjs
CHANGED
@@ -115674,9 +115674,9 @@ var ConcreteActor = class extends Actor {
|
|
115674
115674
|
};
|
115675
115675
|
|
115676
115676
|
// src/common/bundle/Config.ts
|
115677
|
-
var _factory, _name, _owner, _provides, _useQueries, _version, _assets, _newActorSpec, newActorSpec_fn;
|
115677
|
+
var _factory, _name, _owner, _provides, _useQueries, _version, _assets, _webviewAssets, _newActorSpec, newActorSpec_fn;
|
115678
115678
|
var Config = class {
|
115679
|
-
constructor(factory, actorSpec, assets) {
|
115679
|
+
constructor(factory, actorSpec, assets, webviewAssets) {
|
115680
115680
|
__privateAdd(this, _newActorSpec);
|
115681
115681
|
__privateAdd(this, _factory, void 0);
|
115682
115682
|
__privateAdd(this, _name, void 0);
|
@@ -115685,15 +115685,20 @@ var Config = class {
|
|
115685
115685
|
__privateAdd(this, _useQueries, []);
|
115686
115686
|
__privateAdd(this, _version, void 0);
|
115687
115687
|
__privateAdd(this, _assets, void 0);
|
115688
|
+
__privateAdd(this, _webviewAssets, void 0);
|
115688
115689
|
__privateSet(this, _factory, factory);
|
115689
115690
|
__privateSet(this, _name, actorSpec.name);
|
115690
115691
|
__privateSet(this, _owner, actorSpec.owner);
|
115691
115692
|
__privateSet(this, _version, actorSpec.version);
|
115692
115693
|
__privateSet(this, _assets, Object.freeze(assets));
|
115694
|
+
__privateSet(this, _webviewAssets, Object.freeze(webviewAssets));
|
115693
115695
|
}
|
115694
115696
|
get assets() {
|
115695
115697
|
return __privateGet(this, _assets);
|
115696
115698
|
}
|
115699
|
+
get webviewAssets() {
|
115700
|
+
return __privateGet(this, _webviewAssets);
|
115701
|
+
}
|
115697
115702
|
get providedDefinitions() {
|
115698
115703
|
return __privateGet(this, _provides);
|
115699
115704
|
}
|
@@ -115735,6 +115740,7 @@ _provides = new WeakMap();
|
|
115735
115740
|
_useQueries = new WeakMap();
|
115736
115741
|
_version = new WeakMap();
|
115737
115742
|
_assets = new WeakMap();
|
115743
|
+
_webviewAssets = new WeakMap();
|
115738
115744
|
_newActorSpec = new WeakSet();
|
115739
115745
|
newActorSpec_fn = function() {
|
115740
115746
|
return ActorSpec.fromPartial({
|
@@ -116465,7 +116471,7 @@ var BootstrapActor = class {
|
|
116465
116471
|
try {
|
116466
116472
|
const ActorClass = await dangerouslyGetBundleActor(bundle.code);
|
116467
116473
|
const clients = new LinkedBundleClientFactory(__privateGet(this, _dispatcher4), bundle, __privateGet(this, _logger6));
|
116468
|
-
const cfg = new Config(clients, bundle.actor, bundle.assets);
|
116474
|
+
const cfg = new Config(clients, bundle.actor, bundle.assets, bundle.webviewAssets);
|
116469
116475
|
globalThis.devvit ?? (globalThis.devvit = {});
|
116470
116476
|
globalThis.devvit.config = cfg;
|
116471
116477
|
const svc = new ActorClass(cfg);
|