@platforma-open/milaboratories.top-antibodies.workflow 1.1.0

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.
@@ -0,0 +1,13 @@
1
+  WARN  Issue while reading "/home/runner/work/top-antibodies/top-antibodies/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
+
3
+ > @platforma-open/milaboratories.top-antibodies.workflow@1.1.0 build /home/runner/work/top-antibodies/top-antibodies/workflow
4
+ > rm -rf dist && pl-tengo check && pl-tengo build
5
+
6
+ info: Skipping unknown file type: wf.test.ts
7
+ Processing "src/main.tpl.tengo"...
8
+ No syntax errors found.
9
+ info: Skipping unknown file type: wf.test.ts
10
+ info: Compiling 'dist'...
11
+ info: - writing /home/runner/work/top-antibodies/top-antibodies/workflow/dist/tengo/tpl/main.plj.gz
12
+ info:
13
+ info: Template Pack build done.
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @platforma-open/milaboratories.top-antibodies.workflow
2
+
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 208de2a: First version
package/dist/index.cjs ADDED
@@ -0,0 +1,3 @@
1
+ module.exports = { Templates: {
2
+ 'main': { type: 'from-file', path: require.resolve('./tengo/tpl/main.plj.gz') }
3
+ }};
@@ -0,0 +1,4 @@
1
+ declare type TemplateFromFile = { readonly type: "from-file"; readonly path: string; };
2
+ declare type TplName = "main";
3
+ declare const Templates: Record<TplName, TemplateFromFile>;
4
+ export { Templates };
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import { resolve } from 'node:path';
2
+ export const Templates = {
3
+ 'main': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/main.plj.gz') }
4
+ };
Binary file
package/format.el ADDED
@@ -0,0 +1,43 @@
1
+ ;; This program formats all files inside src directory. Usage: emacs --script ./format.el
2
+
3
+ (defun install-go-mode ()
4
+ "Installs go-mode"
5
+ (require 'package)
6
+ (add-to-list 'package-archives
7
+ '("melpa-stable" . "https://stable.melpa.org/packages/"))
8
+ (package-initialize)
9
+ (unless package-archive-contents
10
+ (package-refresh-contents))
11
+
12
+ (package-install 'go-mode t)
13
+ (require 'go-mode))
14
+
15
+ ;; spaces -> tabs only at the beginning of lines
16
+ (setq tabify-regexp "^\t* [ \t]+")
17
+
18
+ (defun format-file (file)
19
+ "Formats a file according to slightly changed Go rules"
20
+ (message "Format %s" file)
21
+ (save-excursion
22
+ (find-file file)
23
+ (delete-trailing-whitespace) ;; deletes whitespaces
24
+ (go-mode) ;; sets golang rules for indentation
25
+ (tabify (point-min) (point-max)) ;; spaces -> tabs in the whole file
26
+ (indent-region (point-min) (point-max)) ;; indentation in the whole file
27
+ (save-buffer))) ;; save file
28
+
29
+ (install-go-mode)
30
+
31
+ ;; change syntax of a standard go-mode a bit
32
+ (advice-add
33
+ 'go--in-composite-literal-p
34
+ :filter-return
35
+ (lambda (&rest r) t))
36
+
37
+ ;; find all files in src
38
+ (setq files (directory-files-recursively "src" "\\.tengo\\'"))
39
+
40
+ ;; call format on every file.
41
+ (dolist (file files)
42
+ (format-file file))
43
+
package/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ declare type TemplateFromFile = { readonly type: "from-file"; readonly path: string; };
2
+ declare type TplName = "main";
3
+ declare const Templates: Record<TplName, TemplateFromFile>;
4
+ export { Templates };
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ module.exports = { Templates: {
2
+ 'main': { type: 'from-file', path: require.resolve('./dist/tengo/tpl/main.plj.gz') }
3
+ }}
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@platforma-open/milaboratories.top-antibodies.workflow",
3
+ "version": "1.1.0",
4
+ "type": "module",
5
+ "description": "Block Workflow",
6
+ "dependencies": {
7
+ "@platforma-sdk/workflow-tengo": "^4.0.2"
8
+ },
9
+ "devDependencies": {
10
+ "@platforma-sdk/tengo-builder": "^2.0.3",
11
+ "@platforma-sdk/test": "^1.27.10",
12
+ "vitest": "^2.1.8"
13
+ },
14
+ "scripts": {
15
+ "build": "rm -rf dist && pl-tengo check && pl-tengo build",
16
+ "test": "vitest",
17
+ "format": "/usr/bin/env emacs --script ./format.el"
18
+ }
19
+ }
@@ -0,0 +1,11 @@
1
+ // light block with no workflow
2
+ wf := import("@platforma-sdk/workflow-tengo:workflow")
3
+
4
+ wf.body(func(args) {
5
+
6
+ return {
7
+ outputs: {},
8
+ exports: {}
9
+ }
10
+ })
11
+
package/src/wf.test.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { tplTest } from "@platforma-sdk/test";
2
+
3
+ tplTest(
4
+ 'should return a concatenated string',
5
+ async ({ helper, expect }) => {
6
+ const results = await helper.renderWorkflow("main", false, {
7
+ name: 'World'
8
+ });
9
+
10
+ const tengoMessage = results.output("tengoMessage", (a) => a?.getDataAsJson<string>());
11
+ expect(await tengoMessage.awaitStableValue()).eq('Hello from Tengo, World!');
12
+ }
13
+ );
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2022",
4
+ "module": "commonjs",
5
+ "moduleResolution": "node",
6
+ "esModuleInterop": true,
7
+ "strict": true,
8
+ "outDir": "./dist",
9
+ "rootDir": "./src",
10
+ "sourceMap": true,
11
+ "declaration": true
12
+ },
13
+ "types": [],
14
+ "include": ["src/**/*"],
15
+ "exclude": ["node_modules", "dist"]
16
+ }
@@ -0,0 +1,9 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ watch: false,
6
+ maxConcurrency: 3,
7
+ testTimeout: 5000
8
+ }
9
+ });