Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Misc cleanup and updates #6

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules/
build/

.DS_Store
5 changes: 0 additions & 5 deletions examples/hmplugin1/assembly/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export function getRandomPerson(): string {
return JSON.stringify(results.data.people[0]);
}

// @ts-ignore
@json
class Person {
id: string | null = null;
Expand All @@ -134,25 +133,21 @@ class Person {
}
}

// @ts-ignore
@json
class PeopleData {
people!: Person[];
}

// @ts-ignore
@json
class AddPersonPayload {
addPerson!: PeopleData;
}

// @ts-ignore
@json
class AggregatePersonResult {
aggregatePerson!: GQLAggregateValues;
}

// @ts-ignore
@json
class GQLAggregateValues {
count: u32 = 0;
Expand Down
28 changes: 14 additions & 14 deletions examples/hmplugin1/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/hmplugin1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
},
"dependencies": {
"hypermode-as": "file:../../src",
"json-as": "^0.7.1"
"json-as": "^0.7.2"
},
"devDependencies": {
"@assemblyscript/wasi-shim": "^0.1.0",
"assemblyscript": "^0.27.22",
"assemblyscript": "^0.27.23",
"visitor-as": "^0.11.4"
},
"overrides": {
Expand Down
2 changes: 0 additions & 2 deletions src/assembly/dqltypes.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// @ts-ignore
@json
export class DQLResponse<T> {
data!: T;
// TODO: errors, extensions
}

// @ts-ignore
@json
export class DQLMutationResponse {
code!: string;
Expand Down
6 changes: 0 additions & 6 deletions src/assembly/gqltypes.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
// @ts-ignore
@json
export class GQLResponse<T> {
data!: T;
extensions: GQLExtensions | null = null;
// TODO: errors
}

// @ts-ignore
@json
class GQLExtensions {
touched_uids: u32 = 0;
tracing!: GQLTracing;
}

// @ts-ignore
@json
class GQLTracing {
version!: u32;
Expand All @@ -23,13 +20,11 @@ class GQLTracing {
execution: GQLExecution | null = null;
}

// @ts-ignore
@json
class GQLExecution {
resolvers!: GQLResolver[];
}

// @ts-ignore
@json
class GQLResolver {
path!: string[];
Expand All @@ -41,7 +36,6 @@ class GQLResolver {
dgraph!: GQLDgraph[];
}

// @ts-ignore
@json
class GQLDgraph {
label!: string;
Expand Down
2 changes: 0 additions & 2 deletions src/assembly/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,12 @@ export abstract class classifier {
}
}

// @ts-ignore
@json
export class ClassificationProbability { // must be defined in the library
label!: string;
probability!: f32;
};

// @ts-ignore
@json
class ClassificationResult { // must be defined in the library
probabilities!: ClassificationProbability[]
Expand Down
24 changes: 12 additions & 12 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"license": "MIT",
"type": "module",
"dependencies": {
"json-as": "^0.7.1"
"json-as": "^0.7.2"
},
"devDependencies": {
"assemblyscript": "^0.27.22",
"assemblyscript": "^0.27.23",
"visitor-as": "^0.11.4"
},
"overrides": {
Expand Down