@lowdefy/operators-moment 4.0.0-alpha.28 → 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-moment",
3
- "version": "4.0.0-alpha.28",
3
+ "version": "4.0.0-alpha.29",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -40,14 +40,13 @@
40
40
  "dist/*"
41
41
  ],
42
42
  "scripts": {
43
- "build": "yarn swc",
43
+ "build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
44
44
  "clean": "rm -rf dist",
45
- "prepare": "yarn build",
46
- "swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
45
+ "prepublishOnly": "pnpm build",
47
46
  "test": "TZ=UTC jest --coverage"
48
47
  },
49
48
  "dependencies": {
50
- "@lowdefy/operators": "4.0.0-alpha.28",
49
+ "@lowdefy/operators": "4.0.0-alpha.29",
51
50
  "moment": "2.29.4"
52
51
  },
53
52
  "devDependencies": {
@@ -60,5 +59,5 @@
60
59
  "publishConfig": {
61
60
  "access": "public"
62
61
  },
63
- "gitHead": "d0bad6be18362c0ceea1c18239c61bba0ba59300"
62
+ "gitHead": "621a191ebc0a1569ee6669dc74c12f8be5a8c7f3"
64
63
  }
@@ -1,62 +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 moment from 'moment';
16
- import { runClass } from '@lowdefy/operators';
17
- function format(on, locale = 'en', format1) {
18
- return moment(on).locale(locale).format(format1);
19
- }
20
- function humanizeDuration(on, locale = 'en', withSuffix = false, thresholds) {
21
- return moment.duration(on).locale(locale).humanize(withSuffix, thresholds);
22
- }
23
- const meta = {
24
- format: {
25
- namedArgs: [
26
- 'on',
27
- 'locale',
28
- 'format'
29
- ],
30
- validTypes: [
31
- 'array',
32
- 'object'
33
- ]
34
- },
35
- humanizeDuration: {
36
- namedArgs: [
37
- 'on',
38
- 'locale',
39
- 'withSuffix',
40
- 'thresholds'
41
- ],
42
- validTypes: [
43
- 'array',
44
- 'object'
45
- ]
46
- }
47
- };
48
- const functions = {
49
- format,
50
- humanizeDuration
51
- };
52
- function _moment({ params , location , methodName }) {
53
- return runClass({
54
- functions,
55
- location,
56
- meta,
57
- methodName,
58
- operator: '_moment',
59
- params
60
- });
61
- }
62
- export default _moment;
@@ -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 _moment } from './operators/shared/moment.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 _moment } from './operators/shared/moment.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
- };