Skip to content

Commit 808a4dd

Browse files
menduzgonpombo8
andauthored
update @dcl/protocol@next (#540)
* update protocol * Update bundle.ts Signed-off-by: menduz <[email protected]> --------- Signed-off-by: menduz <[email protected]> Co-authored-by: Gon Pombo <[email protected]>
1 parent c0e370e commit 808a4dd

32 files changed

+198
-110
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ tmp
3030
scene
3131
test-scene
3232
test/snapshots/bin
33-
34-
test/snapshots/tsconfig.tsbuildinfo
33+
**/*.tsbuildinfo
3534

3635
test/build-ecs/fixtures/ecs7-scene/aCaseSensitiveReadme.md

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ install:
3434
update-protocol:
3535
npm i --save-exact @dcl/protocol@next
3636
cd packages/@dcl/sdk-commands; npm i --save-exact @dcl/protocol@next
37-
$(MAKE) sync-deps
37+
$(MAKE) sync-deps compile_apis
3838

3939
lint:
4040
node_modules/.bin/eslint . --ext .ts

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"bugs": "https://github.com/decentraland/js-sdk-toolchain/issues",
77
"dependencies": {
88
"@actions/core": "^1.10.0",
9-
"@dcl/protocol": "1.0.0-4747376947.commit-d770e0d",
9+
"@dcl/protocol": "1.0.0-4799189990.commit-8494b7b",
1010
"@dcl/quickjs-emscripten": "^0.21.0-3680274614.commit-1808aa1",
1111
"@types/fs-extra": "^9.0.12",
1212
"@types/jest": "^28.1.8",

packages/@dcl/inspector/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"declarationDir": "dist",
2222
"jsx": "react-jsx",
2323
"sourceMap": true,
24-
"rootDir": "src/"
24+
"rootDir": "src/",
25+
"incremental": true
2526
},
2627
"exclude": ["**/*.spec.ts"],
2728
"include": [

packages/@dcl/playground-assets/etc/playground-assets.api.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,9 @@ export const componentDefinitionByName: {
484484
"core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
485485
"core::CameraMode": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
486486
"core::CameraModeArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
487+
"core::EngineInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
487488
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
489+
"core::GltfContainerLoadingState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
488490
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
489491
"core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
490492
"core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
@@ -745,6 +747,9 @@ export type EngineEvent<T extends IEventNames = IEventNames, V = IEvents[T]> = {
745747
data: Readonly<V>;
746748
};
747749

750+
// @public (undocumented)
751+
export const EngineInfo: LastWriteWinElementSetComponentDefinition<PBEngineInfo>;
752+
748753
// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
749754
// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
750755
// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
@@ -913,6 +918,9 @@ export type GlobalTargetRaycastSystemOptions = {
913918
// @public (undocumented)
914919
export const GltfContainer: LastWriteWinElementSetComponentDefinition<PBGltfContainer>;
915920

921+
// @public (undocumented)
922+
export const GltfContainerLoadingState: LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>;
923+
916924
// @public (undocumented)
917925
export interface GrowOnlyValueSetComponentDefinition<T> extends BaseComponent<T> {
918926
addValue(entity: Entity, val: DeepReadonly<T>): DeepReadonlySet<T>;
@@ -1323,6 +1331,20 @@ export type Listeners = {
13231331
onMouseUp?: Callback;
13241332
};
13251333

1334+
// @public (undocumented)
1335+
export const enum LoadingState {
1336+
// (undocumented)
1337+
FINISHED = 4,
1338+
// (undocumented)
1339+
FINISHED_WITH_ERROR = 3,
1340+
// (undocumented)
1341+
LOADING = 1,
1342+
// (undocumented)
1343+
NOT_FOUND = 2,
1344+
// (undocumented)
1345+
UNKNOWN = 0
1346+
}
1347+
13261348
// Warning: (ae-missing-release-tag) "LocalDirectionRaycastOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
13271349
//
13281350
// @public (undocumented)
@@ -1891,11 +1913,26 @@ export interface PBColor4 {
18911913
r: number;
18921914
}
18931915

1916+
// @public (undocumented)
1917+
export interface PBEngineInfo {
1918+
frameNumber: number;
1919+
tickNumber: number;
1920+
totalRuntime: number;
1921+
}
1922+
18941923
// @public (undocumented)
18951924
export interface PBGltfContainer {
1925+
createPointerColliders?: boolean | undefined;
1926+
disablePhysicsColliders?: boolean | undefined;
18961927
src: string;
18971928
}
18981929

1930+
// @public (undocumented)
1931+
export interface PBGltfContainerLoadingState {
1932+
// (undocumented)
1933+
currentState: LoadingState;
1934+
}
1935+
18991936
// @public (undocumented)
19001937
export interface PBMaterial {
19011938
// (undocumented)
@@ -2045,6 +2082,7 @@ export interface PBPointerEventsResult {
20452082
hit: RaycastHit | undefined;
20462083
// (undocumented)
20472084
state: PointerEventType;
2085+
tickNumber: number;
20482086
timestamp: number;
20492087
}
20502088

@@ -2092,6 +2130,7 @@ export interface PBRaycastResult {
20922130
direction: PBVector3 | undefined;
20932131
globalOrigin: PBVector3 | undefined;
20942132
hits: RaycastHit[];
2133+
tickNumber: number;
20952134
timestamp?: number | undefined;
20962135
}
20972136

packages/@dcl/sdk-commands/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@dcl/sdk-commands/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@dcl/inspector": "file:../inspector",
1212
"@dcl/linker-dapp": "0.7.0",
1313
"@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be",
14-
"@dcl/protocol": "1.0.0-4747376947.commit-d770e0d",
14+
"@dcl/protocol": "1.0.0-4799189990.commit-8494b7b",
1515
"@dcl/rpc": "^1.1.1",
1616
"@dcl/schemas": "^6.11.1",
1717
"@segment/analytics-node": "^1.0.0-beta.22",

packages/@dcl/sdk-commands/src/logic/bundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export async function bundleProject(components: BundleComponents, options: Compi
8282
metafile: true,
8383
absWorkingDir: options.workingDirectory,
8484
target: 'es2020',
85-
external: ['~system/*'],
85+
external: ['~system/*', '@dcl/inspector', '@dcl/inspector/*' /* ban importing the inspector from the SDK */],
8686
// convert filesystem paths into file:// to enable VSCode debugger
8787
sourceRoot: pathToFileURL(dirname(outfile)).toString(),
8888
define: {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Engine, components } from '../../../packages/@dcl/ecs/src'
2+
import { testComponentSerialization } from './assertion'
3+
4+
describe('Generated EngineInfo ProtoBuf', () => {
5+
it('should serialize/deserialize EngineInfo', () => {
6+
const newEngine = Engine()
7+
const EngineInfo = components.EngineInfo(newEngine)
8+
9+
testComponentSerialization(EngineInfo, {
10+
frameNumber: 0,
11+
tickNumber: 0,
12+
totalRuntime: 0
13+
})
14+
})
15+
})

test/ecs/components/GltfContainer.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ describe('Generated GltfContainer ProtoBuf', () => {
77
const GltfContainer = components.GltfContainer(newEngine)
88

99
testComponentSerialization(GltfContainer, {
10-
src: 'test/src'
10+
src: 'test/src',
11+
createPointerColliders: undefined,
12+
disablePhysicsColliders: undefined
1113
})
1214
})
1315
})
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Engine, components } from '../../../packages/@dcl/ecs/src'
2+
import { testComponentSerialization } from './assertion'
3+
4+
describe('Generated GltfContainerLoadingState ProtoBuf', () => {
5+
it('should serialize/deserialize GltfContainer', () => {
6+
const newEngine = Engine()
7+
const GltfContainerLoadingState = components.GltfContainerLoadingState(newEngine)
8+
9+
testComponentSerialization(GltfContainerLoadingState, {
10+
currentState: 1
11+
})
12+
})
13+
})

test/ecs/components/PointerEvents.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ describe('Generated OnPointerDown ProtoBuf', () => {
7272
globalOrigin: { x: 1, y: 2, z: 3 },
7373
meshName: 'mesh'
7474
},
75-
state: PointerEventType.PET_DOWN
75+
state: PointerEventType.PET_DOWN,
76+
tickNumber: 0
7677
})
7778

7879
expect(PointerEventsResult.has(entity))

test/ecs/components/PointerEventsResult.spec.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ describe('Generated PointerEventsResult ProtoBuf', () => {
1818
entityId: 515
1919
},
2020
state: PointerEventType.PET_DOWN,
21-
analog: 5
21+
analog: 5,
22+
tickNumber: 0
2223
})
2324

2425
testSchemaSerializationIdentity(PointerEventsResult.schema, {
@@ -34,7 +35,8 @@ describe('Generated PointerEventsResult ProtoBuf', () => {
3435
entityId: 5154
3536
},
3637
state: PointerEventType.PET_UP,
37-
analog: 55
38+
analog: 55,
39+
tickNumber: 0
3840
})
3941

4042
testSchemaSerializationIdentity(PointerEventsResult.schema, {
@@ -50,7 +52,8 @@ describe('Generated PointerEventsResult ProtoBuf', () => {
5052
meshName: 'meshNew'
5153
},
5254
state: PointerEventType.PET_UP,
53-
analog: 523
55+
analog: 523,
56+
tickNumber: 0
5457
})
5558
})
5659
})

test/ecs/components/RaycastResult.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ describe('Generated RaycastResult ProtoBuf', () => {
2020
length: 2,
2121
direction: { x: 1, z: 2, y: 3 }
2222
}
23-
]
23+
],
24+
tickNumber: 0
2425
})
2526

2627
testComponentSerialization(RaycastResult, {
2728
timestamp: 0,
2829
globalOrigin: undefined,
2930
direction: undefined,
30-
hits: []
31+
hits: [],
32+
tickNumber: 0
3133
})
3234
})
3335
})

test/ecs/events/isPressed.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ function createTestPointerDownCommand(
134134
entityId: entity as number
135135
},
136136
state: state,
137-
analog: 5
137+
analog: 5,
138+
tickNumber: 0
138139
}
139140
}

test/ecs/events/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export function createTestPointerDownCommand(
1919
entityId: entity as number
2020
},
2121
state: state,
22-
analog: 5
22+
analog: 5,
23+
tickNumber: 0
2324
}
2425
}

0 commit comments

Comments
 (0)