@lowdefy/operators-yaml 4.0.0-alpha.26 → 4.0.0-alpha.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/operators-yaml",
3
- "version": "4.0.0-alpha.26",
3
+ "version": "4.0.0-alpha.29",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -36,15 +36,14 @@
36
36
  "dist/*"
37
37
  ],
38
38
  "scripts": {
39
- "build": "yarn swc",
39
+ "build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
40
40
  "clean": "rm -rf dist",
41
- "prepare": "yarn build",
42
- "swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
41
+ "prepublishOnly": "pnpm build",
43
42
  "test": "jest --coverage"
44
43
  },
45
44
  "dependencies": {
46
- "@lowdefy/helpers": "4.0.0-alpha.26",
47
- "@lowdefy/operators": "4.0.0-alpha.26",
45
+ "@lowdefy/helpers": "4.0.0-alpha.29",
46
+ "@lowdefy/operators": "4.0.0-alpha.29",
48
47
  "yaml": "2.1.1"
49
48
  },
50
49
  "devDependencies": {
@@ -57,5 +56,5 @@
57
56
  "publishConfig": {
58
57
  "access": "public"
59
58
  },
60
- "gitHead": "ef60e34f87b95204d103db4a65e4ba3c54a5a1b5"
59
+ "gitHead": "621a191ebc0a1569ee6669dc74c12f8be5a8c7f3"
61
60
  }
@@ -1,70 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import YAML from 'yaml';
16
- import { serializer, type } from '@lowdefy/helpers';
17
- import { runClass } from '@lowdefy/operators';
18
- // TODO: consider adding replacer and reviver args supported by yaml package.
19
- function parse(input, options) {
20
- if (input === 'undefined') return undefined;
21
- if (!type.isString(input)) {
22
- throw new Error('requires a string type to parse.');
23
- }
24
- const loaded = YAML.parse(input, options);
25
- return serializer.deserialize(loaded);
26
- }
27
- function stringify(input, options) {
28
- if (input === undefined) return '';
29
- // TODO: option sortKeys: true, sort keys was supported by js-yaml and not by yaml.
30
- return YAML.stringify(serializer.serialize(input, {
31
- isoStringDates: true
32
- }), options);
33
- }
34
- const functions = {
35
- parse,
36
- stringify
37
- };
38
- const meta = {
39
- stringify: {
40
- namedArgs: [
41
- 'on',
42
- 'options'
43
- ],
44
- validTypes: [
45
- 'object',
46
- 'array'
47
- ]
48
- },
49
- parse: {
50
- namedArgs: [
51
- 'on',
52
- 'options'
53
- ],
54
- validTypes: [
55
- 'object',
56
- 'array'
57
- ]
58
- }
59
- };
60
- function _yaml({ params , location , methodName }) {
61
- return runClass({
62
- functions,
63
- location,
64
- meta,
65
- methodName,
66
- operator: '_yaml',
67
- params
68
- });
69
- }
70
- export default _yaml;
@@ -1,15 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ export { default as _yaml } from './operators/shared/yaml.js';
@@ -1,15 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ export { default as _yaml } from './operators/shared/yaml.js';
package/dist/types.js DELETED
@@ -1,22 +0,0 @@
1
- /*
2
- Copyright 2020-2022 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import * as client from './operatorsClient.js';
16
- import * as server from './operatorsServer.js';
17
- export default {
18
- operators: {
19
- client: Object.keys(client),
20
- server: Object.keys(server)
21
- }
22
- };