@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.
- package/.turbo/turbo-build.log +13 -0
- package/CHANGELOG.md +7 -0
- package/dist/index.cjs +3 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/tengo/tpl/main.plj.gz +0 -0
- package/format.el +43 -0
- package/index.d.ts +4 -0
- package/index.js +3 -0
- package/package.json +19 -0
- package/src/main.tpl.tengo +11 -0
- package/src/wf.test.ts +13 -0
- package/tsconfig.json +16 -0
- package/vitest.config.mts +9 -0
|
@@ -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
package/dist/index.cjs
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
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
package/index.js
ADDED
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
|
+
}
|
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
|
+
}
|