@kubun/standalone 0.4.2 → 0.4.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../src/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAuC,MAAM,gBAAgB,CAAA;AAElF,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAA;AAGxB,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG;IAC/C,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAoC5D"}
1
+ {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../src/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAuC,MAAM,gBAAgB,CAAA;AAElF,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAA;AAGxB,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG;IAC/C,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAgD5D"}
package/lib/graphql.js CHANGED
@@ -49,6 +49,18 @@ export function createContext(ctx) {
49
49
  issuer: ctx.did
50
50
  });
51
51
  await applyChangeMutation(ctx, mutation);
52
+ },
53
+ async executeSetModelAccessDefaults () {
54
+ throw new Error('Access control mutations are not supported in standalone mode');
55
+ },
56
+ async executeRemoveModelAccessDefaults () {
57
+ throw new Error('Access control mutations are not supported in standalone mode');
58
+ },
59
+ async executeSetDocumentAccessOverride () {
60
+ throw new Error('Access control mutations are not supported in standalone mode');
61
+ },
62
+ async executeRemoveDocumentAccessOverride () {
63
+ throw new Error('Access control mutations are not supported in standalone mode');
52
64
  }
53
65
  };
54
66
  }
@@ -14,7 +14,8 @@ export type DeployParams = {
14
14
  };
15
15
  export type DeployResult = {
16
16
  id: string;
17
- models: DocumentModelsRecord;
17
+ record: DocumentModelsRecord;
18
+ aliases: Record<string, string>;
18
19
  };
19
20
  export type ExecuteParams = {
20
21
  graphID: string;
@@ -1 +1 @@
1
- {"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../src/standalone.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEzF,OAAO,KAAK,EAAiB,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK5E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,OAAO,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,oBAAoB,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,qBAAa,eAAe;;gBAOd,MAAM,EAAE,gBAAgB;IAU9B,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAelD,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,O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AY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,oBAAoB,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,qBAAa,eAAe;;gBAOd,MAAM,EAAE,gBAAgB;IAU9B,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAelD,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAgCpD,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAcnD,OAAO,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1E,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAK3B,SAAS,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5E,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;CAI1E;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,eAAe,CAEpE"}
package/lib/standalone.js CHANGED
@@ -42,7 +42,7 @@ export class KubunStandalone {
42
42
  async getGraphQLSchema(id) {
43
43
  if (this.#schemas[id] == null) {
44
44
  this.#schemas[id] = this.getGraphModel(id).then((model)=>{
45
- const schema = createSchema(model.record, model.aliases);
45
+ const schema = createSchema(model);
46
46
  this.#logger.debug('cached schema for graph {id}', {
47
47
  id
48
48
  });
@@ -77,14 +77,15 @@ export class KubunStandalone {
77
77
  name: params.name,
78
78
  record: model.record
79
79
  });
80
- this.#graphModels[id] = Promise.resolve(model.toJSON());
80
+ const graphModel = model.toJSON();
81
+ this.#graphModels[id] = Promise.resolve(graphModel);
81
82
  delete this.#schemas[id];
82
83
  this.#logger.info('deployed graph {id}', {
83
84
  id
84
85
  });
85
86
  return {
86
87
  id,
87
- models: model.record
88
+ ...graphModel
88
89
  };
89
90
  }
90
91
  async execute(params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubun/standalone",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "license": "see LICENSE.md",
5
5
  "keywords": [],
6
6
  "type": "module",
@@ -16,14 +16,14 @@
16
16
  "sideEffects": false,
17
17
  "dependencies": {
18
18
  "graphql": "^16.12.0",
19
- "@kubun/graphql": "^0.4.4",
20
- "@kubun/protocol": "^0.4.0",
19
+ "@kubun/graphql": "^0.4.5",
21
20
  "@kubun/logger": "^0.4.0",
22
- "@kubun/mutation": "^0.4.0"
21
+ "@kubun/mutation": "^0.4.0",
22
+ "@kubun/protocol": "^0.4.1"
23
23
  },
24
24
  "devDependencies": {
25
- "@kubun/db": "^0.4.0",
26
- "@kubun/test-utils": "^0.4.0"
25
+ "@kubun/test-utils": "^0.4.0",
26
+ "@kubun/db": "^0.4.0"
27
27
  },
28
28
  "scripts": {
29
29
  "build:clean": "del lib",