@things-factory/qc 5.0.0-alpha.10

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/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
+ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
+
8
+ <!-- ## [Unreleased] -->
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Hatiolab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ import '@operato/qc' /* to register QC DataItemSpecProvider */
2
+
3
+ export default function bootstrap() {}
File without changes
@@ -0,0 +1,4 @@
1
+ export default function route(page) {
2
+ switch (page) {
3
+ }
4
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QC_DATA_SPEC = void 0;
4
+ exports.QC_DATA_SPEC = {
5
+ name: 'QC',
6
+ description: 'Quality Control Data Spec',
7
+ help: '',
8
+ specItems: [
9
+ {
10
+ type: 'qc-limits' /* A value which seperates acceptability from unacceptability */,
11
+ label: 'pass-limits',
12
+ name: 'passLimits',
13
+ placeholder: '품질 관리를 위해 한계 이내로 관리되어야 하는 이론적 한계기준',
14
+ property: {}
15
+ }
16
+ ]
17
+ };
18
+ //# sourceMappingURL=%08qc-data-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"\bqc-data-spec.js","sourceRoot":"","sources":["../../server/controllers/\bqc-data-spec.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,2BAA2B;IACxC,IAAI,EAAE,EAAE;IACR,SAAS,EAAE;QACT;YACE,IAAI,EAAE,WAAW,CAAC,gEAAgE;YAClF,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,EAAE;SACb;KACF;CACF,CAAA"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ const CCP_UNITS = [
2
+ 'Temperature',
3
+ 'Time',
4
+ 'Viscosity',
5
+ 'pH',
6
+ 'Flow rate',
7
+ 'Available Chlorine',
8
+ 'Titratable acidity',
9
+ 'Water activity',
10
+ 'Preservative concentrations',
11
+ 'Humidity',
12
+ 'Salt concentration',
13
+ 'Sensory information such as aroma and visual appearance',
14
+ 'Moisture level',
15
+ 'Physical dimensions',
16
+ 'Line Speed',
17
+ 'Weight'
18
+ ];
19
+ //# sourceMappingURL=qc-units.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qc-units.js","sourceRoot":"","sources":["../../server/controllers/qc-units.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG;IAChB,aAAa;IACb,MAAM;IACN,WAAW;IACX,IAAI;IACJ,WAAW;IACX,oBAAoB;IACpB,oBAAoB;IACpB,gBAAgB;IAChB,6BAA6B;IAC7B,UAAU;IACV,oBAAoB;IACpB,yDAAyD;IACzD,gBAAgB;IAChB,qBAAqB;IACrB,YAAY;IACZ,QAAQ;CACT,CAAA"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./migrations"), exports);
18
+ __exportStar(require("./middlewares"), exports);
19
+ require("./routes");
20
+ const dataset_1 = require("@things-factory/dataset");
21
+ const _qc_data_spec_1 = require("./controllers/\bqc-data-spec");
22
+ process.on('bootstrap-module-start', async ({ app, config, schema }) => {
23
+ dataset_1.DataSpecManager.registerDataSpec('QC', _qc_data_spec_1.QC_DATA_SPEC);
24
+ });
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,gDAA6B;AAE7B,oBAAiB;AAEjB,qDAAyD;AACzD,gEAA0D;AAE1D,OAAO,CAAC,EAAE,CAAC,wBAA+B,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAO,EAAE,EAAE;IACjF,yBAAe,CAAC,gBAAgB,CAAC,IAAI,EAAE,4BAAY,CAAC,CAAA;AACtD,CAAC,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initMiddlewares = void 0;
4
+ function initMiddlewares(app) {
5
+ /* can add middlewares into app */
6
+ }
7
+ exports.initMiddlewares = initMiddlewares;
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,GAAG;IACjC,kCAAkC;AACpC,CAAC;AAFD,0CAEC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrations = void 0;
4
+ const glob = require('glob');
5
+ const path = require('path');
6
+ exports.migrations = [];
7
+ glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function (file) {
8
+ if (file.indexOf('index.js') !== -1)
9
+ return;
10
+ exports.migrations = exports.migrations.concat(Object.values(require(path.resolve(file))) || []);
11
+ });
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA"}
@@ -0,0 +1,25 @@
1
+ const debug = require('debug')('things-factory:ccp:routes');
2
+ process.on('bootstrap-module-global-public-route', (app, globalPublicRouter) => {
3
+ /*
4
+ * can add global public routes to application (auth not required, tenancy not required)
5
+ *
6
+ * ex) routes.get('/path', async(context, next) => {})
7
+ * ex) routes.post('/path', async(context, next) => {})
8
+ */
9
+ });
10
+ process.on('bootstrap-module-global-private-route', (app, globalPrivateRouter) => {
11
+ /*
12
+ * can add global private routes to application (auth required, tenancy not required)
13
+ */
14
+ });
15
+ process.on('bootstrap-module-domain-public-route', (app, domainPublicRouter) => {
16
+ /*
17
+ * can add domain public routes to application (auth not required, tenancy required)
18
+ */
19
+ });
20
+ process.on('bootstrap-module-domain-private-route', (app, domainPrivateRouter) => {
21
+ /*
22
+ * can add domain private routes to application (auth required, tenancy required)
23
+ */
24
+ });
25
+ //# sourceMappingURL=routes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,2BAA2B,CAAC,CAAA;AAE3D,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;;;;OAKG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@things-factory/qc",
3
+ "version": "5.0.0-alpha.10",
4
+ "main": "dist-server/index.js",
5
+ "browser": "client/index.js",
6
+ "things-factory": true,
7
+ "license": "MIT",
8
+ "author": "heartyoh",
9
+ "description": "module for handling QC (Quality Control)",
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "@things-factory:registry": "https://registry.npmjs.org"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/hatiolab/things-factory.git",
17
+ "directory": "packages/qc"
18
+ },
19
+ "scripts": {
20
+ "build": "tsc --p tsconfig.json",
21
+ "build:server": "npm run clean:server && tsc",
22
+ "clean:server": "rm -rf dist-server",
23
+ "clean": "npm run clean:server",
24
+ "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
+ },
26
+ "dependencies": {
27
+ "@operato/dataset": "^1.0.0-alpha.23",
28
+ "@operato/qc": "^1.0.0-alpha.23",
29
+ "@things-factory/dataset": "^5.0.0-alpha.10",
30
+ "@things-factory/shell": "^5.0.0-alpha.10"
31
+ },
32
+ "gitHead": "24e85b0265d10cb664b8279bb927ea2a86227775"
33
+ }
@@ -0,0 +1,14 @@
1
+ export const QC_DATA_SPEC = {
2
+ name: 'QC',
3
+ description: 'Quality Control Data Spec',
4
+ help: '',
5
+ specItems: [
6
+ {
7
+ type: 'qc-limits' /* A value which seperates acceptability from unacceptability */,
8
+ label: 'pass-limits',
9
+ name: 'passLimits',
10
+ placeholder: '품질 관리를 위해 한계 이내로 관리되어야 하는 이론적 한계기준',
11
+ property: {}
12
+ }
13
+ ]
14
+ }
File without changes
@@ -0,0 +1,18 @@
1
+ const CCP_UNITS = [
2
+ 'Temperature',
3
+ 'Time',
4
+ 'Viscosity',
5
+ 'pH',
6
+ 'Flow rate',
7
+ 'Available Chlorine',
8
+ 'Titratable acidity',
9
+ 'Water activity',
10
+ 'Preservative concentrations',
11
+ 'Humidity',
12
+ 'Salt concentration',
13
+ 'Sensory information such as aroma and visual appearance',
14
+ 'Moisture level',
15
+ 'Physical dimensions',
16
+ 'Line Speed',
17
+ 'Weight'
18
+ ]
@@ -0,0 +1,11 @@
1
+ export * from './migrations'
2
+ export * from './middlewares'
3
+
4
+ import './routes'
5
+
6
+ import { DataSpecManager } from '@things-factory/dataset'
7
+ import { QC_DATA_SPEC } from './controllers/qc-data-spec'
8
+
9
+ process.on('bootstrap-module-start' as any, async ({ app, config, schema }: any) => {
10
+ DataSpecManager.registerDataSpec('QC', QC_DATA_SPEC)
11
+ })
@@ -0,0 +1,3 @@
1
+ export function initMiddlewares(app) {
2
+ /* can add middlewares into app */
3
+ }
@@ -0,0 +1,9 @@
1
+ const glob = require('glob')
2
+ const path = require('path')
3
+
4
+ export var migrations = []
5
+
6
+ glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {
7
+ if (file.indexOf('index.js') !== -1) return
8
+ migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])
9
+ })
@@ -0,0 +1,28 @@
1
+ const debug = require('debug')('things-factory:ccp:routes')
2
+
3
+ process.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {
4
+ /*
5
+ * can add global public routes to application (auth not required, tenancy not required)
6
+ *
7
+ * ex) routes.get('/path', async(context, next) => {})
8
+ * ex) routes.post('/path', async(context, next) => {})
9
+ */
10
+ })
11
+
12
+ process.on('bootstrap-module-global-private-route' as any, (app, globalPrivateRouter) => {
13
+ /*
14
+ * can add global private routes to application (auth required, tenancy not required)
15
+ */
16
+ })
17
+
18
+ process.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {
19
+ /*
20
+ * can add domain public routes to application (auth not required, tenancy required)
21
+ */
22
+ })
23
+
24
+ process.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {
25
+ /*
26
+ * can add domain private routes to application (auth required, tenancy required)
27
+ */
28
+ })
@@ -0,0 +1,13 @@
1
+ import bootstrap from './client/bootstrap'
2
+ import route from './client/route'
3
+
4
+ export default {
5
+ route,
6
+ routes: [
7
+ {
8
+ tagname: 'ccp-main',
9
+ page: 'ccp-main'
10
+ }
11
+ ],
12
+ bootstrap
13
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "label.pass limits": "pass limits",
3
+ "label.minimum value": "minimum value",
4
+ "label.maximum value": "maximum value"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "label.pass limits": "허용 한계",
3
+ "label.minimum value": "최소값",
4
+ "label.maximum value": "최대값"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "label.pass limits": "pass limits",
3
+ "label.minimum value": "minimum value",
4
+ "label.maximum value": "maximum value"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "label.pass limits": "pass limits",
3
+ "label.minimum value": "minimum value",
4
+ "label.maximum value": "maximum value"
5
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../tsconfig-base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist-server",
5
+ "baseUrl": "./"
6
+ },
7
+ "include": ["./server/**/*"],
8
+ "exclude": ["**/*.spec.ts"]
9
+ }