@things-factory/station 10.1.38 → 10.1.40
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-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/station/index.d.ts +1 -1
- package/dist-server/service/station/station-axes.d.ts +1 -1
- package/dist-server/service/station/station-axes.js +3 -1
- package/dist-server/service/station/station-axes.js.map +1 -1
- package/dist-server/service/station/station-flow.d.ts +3 -1
- package/dist-server/service/station/station-flow.js +9 -7
- package/dist-server/service/station/station-flow.js.map +1 -1
- package/dist-server/service/station/station-product.d.ts +19 -2
- package/dist-server/service/station/station-product.js +52 -0
- package/dist-server/service/station/station-product.js.map +1 -1
- package/dist-server/service/station/station-screen-draft-resolver.js +3 -1
- package/dist-server/service/station/station-screen-draft-resolver.js.map +1 -1
- package/dist-server/service/station/station-screen-layout.d.ts +3 -1
- package/dist-server/service/station/station-screen-layout.js +2 -2
- package/dist-server/service/station/station-screen-layout.js.map +1 -1
- package/dist-server/service/station/station-service-resolver.d.ts +9 -0
- package/dist-server/service/station/station-service-resolver.js +18 -0
- package/dist-server/service/station/station-service-resolver.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/shared/station-axes.d.ts +7 -2
- package/shared/station-axes.js +34 -26
|
@@ -79,6 +79,17 @@ let StationServiceResolver = class StationServiceResolver {
|
|
|
79
79
|
}))
|
|
80
80
|
}));
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* The names a screen of this product may read — the machine's and what the product declared (ADR-0083
|
|
84
|
+
* ruling ①). The same union `stationScreenDraft` checks against.
|
|
85
|
+
*
|
|
86
|
+
* ⚠ The browser's field pickers still read the machine's list directly (`stationBindingNames()`), so a
|
|
87
|
+
* product's own axes pass the check but are not offered in the picker until the authoring pages read this
|
|
88
|
+
* (step 3-라). Said here so the gap is not mistaken for the axes not existing.
|
|
89
|
+
*/
|
|
90
|
+
async stationAxes() {
|
|
91
|
+
return (0, station_product_js_1.stationAxesOf)((0, station_product_js_1.stationProduct)());
|
|
92
|
+
}
|
|
82
93
|
};
|
|
83
94
|
exports.StationServiceResolver = StationServiceResolver;
|
|
84
95
|
tslib_1.__decorate([
|
|
@@ -88,6 +99,13 @@ tslib_1.__decorate([
|
|
|
88
99
|
tslib_1.__metadata("design:paramtypes", []),
|
|
89
100
|
tslib_1.__metadata("design:returntype", Promise)
|
|
90
101
|
], StationServiceResolver.prototype, "stationServices", null);
|
|
102
|
+
tslib_1.__decorate([
|
|
103
|
+
(0, type_graphql_1.Directive)('@privilege(category: "station", privilege: "query", domainOwnerGranted: true)'),
|
|
104
|
+
(0, type_graphql_1.Query)(returns => [String], { description: 'context axes a station screen of this product may read' }),
|
|
105
|
+
tslib_1.__metadata("design:type", Function),
|
|
106
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
107
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
108
|
+
], StationServiceResolver.prototype, "stationAxes", null);
|
|
91
109
|
exports.StationServiceResolver = StationServiceResolver = tslib_1.__decorate([
|
|
92
110
|
(0, type_graphql_1.Resolver)(),
|
|
93
111
|
(0, type_graphql_1.UseMiddleware)(shell_1.SpeakRefusals)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"station-service-resolver.js","sourceRoot":"","sources":["../../../server/service/station/station-service-resolver.ts"],"names":[],"mappings":";;;;AAAA,+CAA2F;AAE3F,iDAAmE;AAEnE,+EAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"station-service-resolver.js","sourceRoot":"","sources":["../../../server/service/station/station-service-resolver.ts"],"names":[],"mappings":";;;;AAAA,+CAA2F;AAE3F,iDAAmE;AAEnE,+EAA6D;AAC7D,6DAAqF;AAG9E,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAkBnC,CAAA;AAlBY,0DAAuB;AAElC;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;;q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AC,QAAQ,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC9C,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;gBAC/B,SAAS,EAAE,IAAA,2CAAa,EAAC,KAAK,CAAC,IAAI,CAAwC;aAC5E,CAAC,CAAC;SACJ,CAAC,CAAC,CAAA;IACL,CAAC;IAED;;;;;;;OAOG;IAGG,AAAN,KAAK,CAAC,WAAW;QACf,OAAO,IAAA,kCAAa,EAAC,IAAA,mCAAc,GAAE,CAAC,CAAA;IACxC,CAAC;CACF,CAAA;AA9BY,wDAAsB;AAG3B;IAFL,IAAA,wBAAS,EAAC,+EAA+E,CAAC;IAC1F,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC,kBAAkB,CAAC,EAAE,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;;;;6DAa3F;AAYK;IAFL,IAAA,wBAAS,EAAC,+EAA+E,CAAC;IAC1F,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE,wDAAwD,EAAE,CAAC;;;;yDAGrG;iCA7BU,sBAAsB;IAFlC,IAAA,uBAAQ,GAAE;IACV,IAAA,4BAAa,EAAC,qBAAa,CAAC;GAChB,sBAAsB,CA8BlC","sourcesContent":["import { Directive, Field, ObjectType, Query, Resolver, UseMiddleware } from 'type-graphql'\n\nimport { ScalarObject, SpeakRefusals } from '@things-factory/shell'\n\nimport { suggestSource } from './station-argument-sources.js'\nimport { fieldsOfService, stationAxesOf, stationProduct } from './station-product.js'\n\n@ObjectType({ description: 'one argument a station service takes' })\nexport class StationServiceFieldType {\n @Field({ description: 'the field name, exactly as the schema spells it' })\n name: string\n\n @Field({ description: 'without a value here the call fails' })\n required: boolean\n\n @Field({ nullable: true, description: \"what the field's own owner wrote about it — shown instead of the name\" })\n describes?: string\n\n @Field({ description: 'empty here reads as 「nobody wrote it down」, which is not the same as zero' })\n notable: boolean\n\n @Field(type => ScalarObject, {\n nullable: true,\n description: 'where this would come from if the author says nothing — a suggestion, always overridable'\n })\n suggested?: Record<string, unknown>\n}\n\n@ObjectType({ description: 'something a station step can call' })\nexport class StationServiceType {\n @Field({ description: 'the mutation name' })\n name: string\n\n @Field({ description: 'what the author is doing when they pick this — a copy key' })\n describes: string\n\n @Field(type => [StationServiceFieldType])\n fields: StationServiceFieldType[]\n}\n\n/**\n * What a step can call, and what each call needs.\n *\n * ── Why the server answers this and not introspection in the browser ─────\n * The browser could ask the schema itself. It would get every mutation in the app, and then the\n * composer would have to decide which of them belong at a bench — a judgement, made in a place\n * nobody would think to look. Worse, introspection alone cannot say that `goodCount` is nullable\n * *and* must not be left empty; that is domain knowledge, and it lives beside the declaration.\n *\n * The field names and their nullability still come from the schema's own metadata. Nothing here\n * is a second copy of the input types.\n */\n@Resolver()\n@UseMiddleware(SpeakRefusals)\nexport class StationServiceResolver {\n @Directive('@privilege(category: \"station\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => [StationServiceType], { description: 'services a station step can call' })\n async stationServices(): Promise<StationServiceType[]> {\n return stationProduct().services.map(declared => ({\n name: declared.name,\n describes: declared.describes,\n fields: fieldsOfService(declared).map(field => ({\n name: field.name,\n required: field.required,\n describes: field.describes,\n notable: Boolean(field.notable),\n suggested: suggestSource(field.name) as Record<string, unknown> | undefined\n }))\n }))\n }\n\n /**\n * The names a screen of this product may read — the machine's and what the product declared (ADR-0083\n * ruling ①). The same union `stationScreenDraft` checks against.\n *\n * ⚠ The browser's field pickers still read the machine's list directly (`stationBindingNames()`), so a\n * product's own axes pass the check but are not offered in the picker until the authoring pages read this\n * (step 3-라). Said here so the gap is not mistaken for the axes not existing.\n */\n @Directive('@privilege(category: \"station\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => [String], { description: 'context axes a station screen of this product may read' })\n async stationAxes(): Promise<string[]> {\n return stationAxesOf(stationProduct())\n }\n}\n"]}
|