@lowdefy/node-utils 4.0.0-rc.0 → 4.0.0-rc.10

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ import fsExtra from 'fs-extra';
16
- async function copyDirectory(dirPathFrom, dirPathTo, options) {
16
+ async function copyFileOrDirectory(dirPathFrom, dirPathTo, options) {
17
17
  await fsExtra.copy(dirPathFrom, dirPathTo, options);
18
18
  }
19
- export default copyDirectory;
19
+ export default copyFileOrDirectory;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -13,11 +13,10 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ import cleanDirectory from './cleanDirectory.js';
16
- import copyDirectory from './copyDirectory.js';
17
- import getConfigFromEnv from './getConfigFromEnv.js';
16
+ import copyFileOrDirectory from './copyFileOrDirectory.js';
18
17
  import getFileExtension, { getFileSubExtension } from './getFileExtension.js';
19
18
  import getSecretsFromEnv from './getSecretsFromEnv.js';
20
19
  import spawnProcess from './spawnProcess.js';
21
20
  import readFile from './readFile.js';
22
21
  import writeFile from './writeFile.js';
23
- export { cleanDirectory, copyDirectory, getConfigFromEnv, getFileExtension, getFileSubExtension, getSecretsFromEnv, spawnProcess, readFile, writeFile };
22
+ export { cleanDirectory, copyFileOrDirectory, getFileExtension, getFileSubExtension, getSecretsFromEnv, spawnProcess, readFile, writeFile };
package/dist/readFile.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ import { spawn } from 'child_process';
16
- function createStdIOHandler({ lineHandler }) {
16
+ function createStdIOHandler({ lineHandler }) {
17
17
  function handler(data) {
18
18
  data.toString('utf8').split('\n').forEach((line)=>{
19
19
  if (line) {
@@ -23,7 +23,7 @@ function createStdIOHandler({ lineHandler }) {
23
23
  }
24
24
  return handler;
25
25
  }
26
- function spawnProcess({ args , command , processOptions , returnProcess , stdErrLineHandler , stdOutLineHandler =()=>{} , }) {
26
+ function spawnProcess({ args, command, processOptions, returnProcess, stdErrLineHandler, stdOutLineHandler = ()=>{} }) {
27
27
  if (!stdErrLineHandler) {
28
28
  stdErrLineHandler = stdOutLineHandler;
29
29
  }
package/dist/writeFile.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/node-utils",
3
- "version": "4.0.0-rc.0",
3
+ "version": "4.0.0-rc.10",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -37,20 +37,20 @@
37
37
  "build": "swc src --out-dir dist --config-file ../../../.swcrc --delete-dir-on-start",
38
38
  "clean": "rm -rf dist",
39
39
  "prepublishOnly": "pnpm build",
40
- "test": "jest --coverage"
40
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
41
41
  },
42
42
  "dependencies": {
43
- "@lowdefy/helpers": "4.0.0-rc.0",
44
- "fs-extra": "10.1.0"
43
+ "@lowdefy/helpers": "4.0.0-rc.10",
44
+ "fs-extra": "11.1.1"
45
45
  },
46
46
  "devDependencies": {
47
- "@swc/cli": "0.1.57",
48
- "@swc/core": "1.2.194",
49
- "@swc/jest": "0.2.21",
50
- "jest": "28.1.0"
47
+ "@swc/cli": "0.1.62",
48
+ "@swc/core": "1.3.70",
49
+ "@swc/jest": "0.2.27",
50
+ "jest": "28.1.3"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "f6872d7ff6da421710096536fce7b2016ef8f35c"
55
+ "gitHead": "537af074f27770e32da9da8d48490f2eda94b406"
56
56
  }
@@ -1,24 +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
- */ function getConfigFromEnv() {
16
- return {
17
- buildDirectory: process.env.LOWDEFY_SERVER_BUILD_DIRECTORY,
18
- logLevel: process.env.LOWDEFY_SERVER_LOG_LEVEL,
19
- publicDirectory: process.env.LOWDEFY_SERVER_PUBLIC_DIRECTORY,
20
- port: process.env.LOWDEFY_SERVER_PORT && parseInt(process.env.LOWDEFY_SERVER_PORT),
21
- basePath: process.env.LOWDEFY_BASE_PATH
22
- };
23
- }
24
- export default getConfigFromEnv;