mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-17 14:30:34 +08:00
Merge pull request #1002 from lowdefy/plugins-operators
Plugins operators for change-case, diff, mql, uuid and yaml
This commit is contained in:
commit
f157181d2f
@ -19,7 +19,6 @@ _ref:
|
||||
pageId: _diff
|
||||
pageTitle: _diff
|
||||
filePath: operators/_diff.yaml
|
||||
env: Server Only
|
||||
methods:
|
||||
- name: deep
|
||||
types: |
|
||||
|
@ -0,0 +1,3 @@
|
||||
# Lowdefy Operators Change Case
|
||||
|
||||
Change Case Lowdefy operators
|
@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['src/**/*.js'],
|
||||
coverageDirectory: 'coverage',
|
||||
coveragePathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test', '<rootDir>/src/index.js'],
|
||||
coverageReporters: [['lcov', { projectRoot: '../../../..' }], 'text', 'clover'],
|
||||
errorOnDeprecated: true,
|
||||
testEnvironment: 'jsdom',
|
||||
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test'],
|
||||
transform: {
|
||||
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '../../../../.swcrc.test' }],
|
||||
},
|
||||
};
|
@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "@lowdefy/operators-change-case",
|
||||
"version": "4.0.0-alpha.4",
|
||||
"licence": "Apache-2.0",
|
||||
"description": "",
|
||||
"homepage": "https://lowdefy.com",
|
||||
"keywords": [
|
||||
"lowdefy",
|
||||
"lowdefy operator"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/lowdefy/lowdefy/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Sam Tolmay",
|
||||
"url": "https://github.com/SamTolmay"
|
||||
},
|
||||
{
|
||||
"name": "Gerrie van Wyk",
|
||||
"url": "https://github.com/Gervwyk"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lowdefy/lowdefy.git"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./operators/client": "./dist/operatorsClient.js",
|
||||
"./operators/server": "./dist/operatorsServer.js",
|
||||
"./types": "./dist/types.js"
|
||||
},
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "yarn swc",
|
||||
"clean": "rm -rf dist",
|
||||
"prepare": "yarn build",
|
||||
"swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
|
||||
"test": "jest --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lowdefy/helpers": "4.0.0-alpha.4",
|
||||
"@lowdefy/operators": "4.0.0-alpha.4",
|
||||
"change-case": "4.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/cli": "0.1.51",
|
||||
"@swc/core": "1.2.107",
|
||||
"@swc/jest": "0.2.5",
|
||||
"jest": "27.3.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
export { default as _change_case } from './operators/shared/change_case.js';
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
export { default as _change_case } from './operators/shared/change_case.js';
|
@ -28,7 +28,7 @@ import {
|
||||
snakeCase,
|
||||
} from 'change-case';
|
||||
import { get, type } from '@lowdefy/helpers';
|
||||
import runClass from '../runClass.js';
|
||||
import { runClass } from '@lowdefy/operators';
|
||||
|
||||
const changeCase = {
|
||||
camelCase,
|
@ -14,7 +14,7 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import change_case from '../../src/common/change_case.js';
|
||||
import change_case from './change_case.js';
|
||||
|
||||
const testString = 'test string';
|
||||
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import * as client from './operatorsClient.js';
|
||||
import * as server from './operatorsServer.js';
|
||||
|
||||
export default {
|
||||
operators: {
|
||||
client: Object.keys(client),
|
||||
server: Object.keys(server),
|
||||
},
|
||||
};
|
3
packages/plugins/operators/operators-diff/README.md
Normal file
3
packages/plugins/operators/operators-diff/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Lowdefy Operators Diff
|
||||
|
||||
Diff Lowdefy operators
|
14
packages/plugins/operators/operators-diff/jest.config.cjs
Normal file
14
packages/plugins/operators/operators-diff/jest.config.cjs
Normal file
@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['src/**/*.js'],
|
||||
coverageDirectory: 'coverage',
|
||||
coveragePathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test', '<rootDir>/src/index.js'],
|
||||
coverageReporters: [['lcov', { projectRoot: '../../../..' }], 'text', 'clover'],
|
||||
errorOnDeprecated: true,
|
||||
testEnvironment: 'jsdom',
|
||||
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test'],
|
||||
transform: {
|
||||
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '../../../../.swcrc.test' }],
|
||||
},
|
||||
};
|
58
packages/plugins/operators/operators-diff/package.json
Normal file
58
packages/plugins/operators/operators-diff/package.json
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "@lowdefy/operators-diff",
|
||||
"version": "4.0.0-alpha.4",
|
||||
"licence": "Apache-2.0",
|
||||
"description": "",
|
||||
"homepage": "https://lowdefy.com",
|
||||
"keywords": [
|
||||
"lowdefy",
|
||||
"lowdefy operator"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/lowdefy/lowdefy/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Sam Tolmay",
|
||||
"url": "https://github.com/SamTolmay"
|
||||
},
|
||||
{
|
||||
"name": "Gerrie van Wyk",
|
||||
"url": "https://github.com/Gervwyk"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lowdefy/lowdefy.git"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./operators/client": "./dist/operatorsClient.js",
|
||||
"./operators/server": "./dist/operatorsServer.js",
|
||||
"./types": "./dist/types.js"
|
||||
},
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "yarn swc",
|
||||
"clean": "rm -rf dist",
|
||||
"prepare": "yarn build",
|
||||
"swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
|
||||
"test": "jest --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lowdefy/helpers": "4.0.0-alpha.4",
|
||||
"@lowdefy/operators": "4.0.0-alpha.4",
|
||||
"deep-diff": "1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/cli": "0.1.51",
|
||||
"@swc/core": "1.2.107",
|
||||
"@swc/jest": "0.2.5",
|
||||
"jest": "27.3.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
export { default as _diff } from './operators/shared/diff.js';
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
export { default as _diff } from './operators/shared/diff.js';
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { diff } from 'deep-diff';
|
||||
import runClass from '../runClass.js';
|
||||
import { runClass } from '@lowdefy/operators';
|
||||
|
||||
function deep(lhs, rhs) {
|
||||
const result = diff(lhs, rhs);
|
@ -14,7 +14,7 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import diff from '../../src/node/diff.js';
|
||||
import diff from './diff.js';
|
||||
|
||||
const location = 'locationId';
|
||||
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import * as client from './operatorsClient.js';
|
||||
import * as server from './operatorsServer.js';
|
||||
|
||||
export default {
|
||||
operators: {
|
||||
client: Object.keys(client),
|
||||
server: Object.keys(server),
|
||||
},
|
||||
};
|
3
packages/plugins/operators/operators-mql/README.md
Normal file
3
packages/plugins/operators/operators-mql/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Lowdefy Operators Mql
|
||||
|
||||
Mql Lowdefy operators
|
14
packages/plugins/operators/operators-mql/jest.config.cjs
Normal file
14
packages/plugins/operators/operators-mql/jest.config.cjs
Normal file
@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['src/**/*.js'],
|
||||
coverageDirectory: 'coverage',
|
||||
coveragePathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test', '<rootDir>/src/index.js'],
|
||||
coverageReporters: [['lcov', { projectRoot: '../../../..' }], 'text', 'clover'],
|
||||
errorOnDeprecated: true,
|
||||
testEnvironment: 'jsdom',
|
||||
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test'],
|
||||
transform: {
|
||||
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '../../../../.swcrc.test' }],
|
||||
},
|
||||
};
|
58
packages/plugins/operators/operators-mql/package.json
Normal file
58
packages/plugins/operators/operators-mql/package.json
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "@lowdefy/operators-mql",
|
||||
"version": "4.0.0-alpha.4",
|
||||
"licence": "Apache-2.0",
|
||||
"description": "",
|
||||
"homepage": "https://lowdefy.com",
|
||||
"keywords": [
|
||||
"lowdefy",
|
||||
"lowdefy operator"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/lowdefy/lowdefy/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Sam Tolmay",
|
||||
"url": "https://github.com/SamTolmay"
|
||||
},
|
||||
{
|
||||
"name": "Gerrie van Wyk",
|
||||
"url": "https://github.com/Gervwyk"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lowdefy/lowdefy.git"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./operators/client": "./dist/operatorsClient.js",
|
||||
"./operators/server": "./dist/operatorsServer.js",
|
||||
"./types": "./dist/types.js"
|
||||
},
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "yarn swc",
|
||||
"clean": "rm -rf dist",
|
||||
"prepare": "yarn build",
|
||||
"swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
|
||||
"test": "jest --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lowdefy/helpers": "4.0.0-alpha.4",
|
||||
"@lowdefy/operators": "4.0.0-alpha.4",
|
||||
"mingo": "4.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/cli": "0.1.51",
|
||||
"@swc/core": "1.2.107",
|
||||
"@swc/jest": "0.2.5",
|
||||
"jest": "27.3.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
export { default as _mql } from './operators/shared/mql.js';
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
export { default as _mql } from './operators/shared/mql.js.js';
|
@ -16,7 +16,7 @@
|
||||
|
||||
import mingo from 'mingo';
|
||||
import { get, type } from '@lowdefy/helpers';
|
||||
import runClass from '../runClass.js';
|
||||
import { runClass } from '@lowdefy/operators';
|
||||
|
||||
import 'mingo/init/system';
|
||||
|
@ -14,7 +14,7 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import mql from '../../src/common/mql.js';
|
||||
import mql from './mql.js';
|
||||
|
||||
test('_mql.aggregate on: null', () => {
|
||||
expect(
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import * as client from './operatorsClient.js';
|
||||
import * as server from './operatorsServer.js';
|
||||
|
||||
export default {
|
||||
operators: {
|
||||
client: Object.keys(client),
|
||||
server: Object.keys(server),
|
||||
},
|
||||
};
|
3
packages/plugins/operators/operators-uuid/README.md
Normal file
3
packages/plugins/operators/operators-uuid/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Lowdefy Operators UUID
|
||||
|
||||
UUID Lowdefy operators
|
14
packages/plugins/operators/operators-uuid/jest.config.cjs
Normal file
14
packages/plugins/operators/operators-uuid/jest.config.cjs
Normal file
@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['src/**/*.js'],
|
||||
coverageDirectory: 'coverage',
|
||||
coveragePathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test', '<rootDir>/src/index.js'],
|
||||
coverageReporters: [['lcov', { projectRoot: '../../../..' }], 'text', 'clover'],
|
||||
errorOnDeprecated: true,
|
||||
testEnvironment: 'jsdom',
|
||||
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test'],
|
||||
transform: {
|
||||
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '../../../../.swcrc.test' }],
|
||||
},
|
||||
};
|
58
packages/plugins/operators/operators-uuid/package.json
Normal file
58
packages/plugins/operators/operators-uuid/package.json
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "@lowdefy/operators-uuid",
|
||||
"version": "4.0.0-alpha.4",
|
||||
"licence": "Apache-2.0",
|
||||
"description": "",
|
||||
"homepage": "https://lowdefy.com",
|
||||
"keywords": [
|
||||
"lowdefy",
|
||||
"lowdefy operator"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/lowdefy/lowdefy/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Sam Tolmay",
|
||||
"url": "https://github.com/SamTolmay"
|
||||
},
|
||||
{
|
||||
"name": "Gerrie van Wyk",
|
||||
"url": "https://github.com/Gervwyk"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lowdefy/lowdefy.git"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./operators/client": "./dist/operatorsClient.js",
|
||||
"./operators/server": "./dist/operatorsServer.js",
|
||||
"./types": "./dist/types.js"
|
||||
},
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "yarn swc",
|
||||
"clean": "rm -rf dist",
|
||||
"prepare": "yarn build",
|
||||
"swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
|
||||
"test": "jest --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lowdefy/helpers": "4.0.0-alpha.4",
|
||||
"@lowdefy/operators": "4.0.0-alpha.4",
|
||||
"uuid": "8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/cli": "0.1.51",
|
||||
"@swc/core": "1.2.107",
|
||||
"@swc/jest": "0.2.5",
|
||||
"jest": "27.3.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
export { default as _uuid } from './operators/shared/uuid.js';
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
export { default as _uuid } from './operators/shared/uuid.js';
|
@ -17,7 +17,7 @@
|
||||
import { v1, v3, v4, v5 } from 'uuid';
|
||||
import { type } from '@lowdefy/helpers';
|
||||
|
||||
import runClass from '../runClass.js';
|
||||
import { runClass } from '@lowdefy/operators';
|
||||
|
||||
const meta = {
|
||||
v1: { noArgs: true },
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import * as uuid from 'uuid';
|
||||
import _uuid from '../../src/common/uuid.js';
|
||||
import _uuid from './uuid.js';
|
||||
|
||||
jest.mock('uuid', () => {
|
||||
return {
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import * as client from './operatorsClient.js';
|
||||
import * as server from './operatorsServer.js';
|
||||
|
||||
export default {
|
||||
operators: {
|
||||
client: Object.keys(client),
|
||||
server: Object.keys(server),
|
||||
},
|
||||
};
|
3
packages/plugins/operators/operators-yaml/README.md
Normal file
3
packages/plugins/operators/operators-yaml/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Lowdefy Operators YAML
|
||||
|
||||
YAML Lowdefy operators
|
14
packages/plugins/operators/operators-yaml/jest.config.cjs
Normal file
14
packages/plugins/operators/operators-yaml/jest.config.cjs
Normal file
@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['src/**/*.js'],
|
||||
coverageDirectory: 'coverage',
|
||||
coveragePathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test', '<rootDir>/src/index.js'],
|
||||
coverageReporters: [['lcov', { projectRoot: '../../../..' }], 'text', 'clover'],
|
||||
errorOnDeprecated: true,
|
||||
testEnvironment: 'jsdom',
|
||||
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test'],
|
||||
transform: {
|
||||
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '../../../../.swcrc.test' }],
|
||||
},
|
||||
};
|
58
packages/plugins/operators/operators-yaml/package.json
Normal file
58
packages/plugins/operators/operators-yaml/package.json
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "@lowdefy/operators-yaml",
|
||||
"version": "4.0.0-alpha.4",
|
||||
"licence": "Apache-2.0",
|
||||
"description": "",
|
||||
"homepage": "https://lowdefy.com",
|
||||
"keywords": [
|
||||
"lowdefy",
|
||||
"lowdefy operator"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/lowdefy/lowdefy/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Sam Tolmay",
|
||||
"url": "https://github.com/SamTolmay"
|
||||
},
|
||||
{
|
||||
"name": "Gerrie van Wyk",
|
||||
"url": "https://github.com/Gervwyk"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lowdefy/lowdefy.git"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./operators/client": "./dist/operatorsClient.js",
|
||||
"./operators/server": "./dist/operatorsServer.js",
|
||||
"./types": "./dist/types.js"
|
||||
},
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "yarn swc",
|
||||
"clean": "rm -rf dist",
|
||||
"prepare": "yarn build",
|
||||
"swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
|
||||
"test": "jest --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lowdefy/helpers": "4.0.0-alpha.4",
|
||||
"@lowdefy/operators": "4.0.0-alpha.4",
|
||||
"js-yaml": "4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/cli": "0.1.51",
|
||||
"@swc/core": "1.2.107",
|
||||
"@swc/jest": "0.2.5",
|
||||
"jest": "27.3.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
export { default as _yaml } from './operators/shared/yaml.js';
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
export { default as _yaml } from './operators/shared/yaml.js';
|
@ -17,7 +17,7 @@
|
||||
import YAML from 'js-yaml';
|
||||
import { serializer } from '@lowdefy/helpers';
|
||||
|
||||
import runClass from '../runClass.js';
|
||||
import { runClass } from '@lowdefy/operators';
|
||||
|
||||
function parse(input) {
|
||||
if (input === 'undefined') return undefined;
|
@ -14,7 +14,7 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import yaml from '../../src/common/yaml.js';
|
||||
import yaml from './yaml.js';
|
||||
|
||||
test('_yaml.parse string unquoted', () => {
|
||||
expect(yaml({ params: 'firstName', location: 'locationId', methodName: 'parse' })).toEqual(
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import * as client from './operatorsClient.js';
|
||||
import * as server from './operatorsServer.js';
|
||||
|
||||
export default {
|
||||
operators: {
|
||||
client: Object.keys(client),
|
||||
server: Object.keys(server),
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue
Block a user