@seeka-labs/cli-apps 1.1.8 → 1.1.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.
@@ -7,5 +7,13 @@ module.exports = {
7
7
  rules: {
8
8
  "@typescript-eslint/no-unused-vars": "warn",
9
9
  "@typescript-eslint/no-explicit-any": "off"
10
- }
10
+ },
11
+ overrides: [
12
+ {
13
+ files: ["**/*/*.test.ts"],
14
+ env: {
15
+ jest: true
16
+ }
17
+ }
18
+ ]
11
19
  };
@@ -0,0 +1,5 @@
1
+ /** @type {import('ts-jest').JestConfigWithTsJest} */
2
+ module.exports = {
3
+ preset: 'ts-jest',
4
+ testEnvironment: 'node',
5
+ };
@@ -13,6 +13,7 @@
13
13
  "lint": "eslint",
14
14
  "build": "esbuild src/index.ts --bundle --minify --sourcemap --platform=node --target=node18 --outfile=dist/index.js",
15
15
  "watch": "tsc -w",
16
+ "test": "yarn jest",
16
17
  "clean": "<packageManagerRunPrefix> rimraf dist && <packageManagerRunPrefix> rimraf deploy.zip",
17
18
  "start": "node --require dotenv/config dist/index.js",
18
19
  "dev": "<packageManagerRunPrefix> clean && <packageManagerRunPrefix> build && node --require dotenv/config dist/index.js",
@@ -33,6 +34,7 @@
33
34
  "winston": "^3.11.0"
34
35
  },
35
36
  "devDependencies": {
37
+ "@jest/globals": "^29.7.0",
36
38
  "@types/aws-lambda": "^8.10.133",
37
39
  "@types/express": "^4.17.21",
38
40
  "@types/lodash-es": "^4.17.12",
@@ -42,6 +44,8 @@
42
44
  "dotenv": "^16.4.4",
43
45
  "esbuild": "^0.20.0",
44
46
  "eslint": "^8",
47
+ "jest": "^29.7.0",
48
+ "ts-jest": "^29.1.5",
45
49
  "ngrok": "^5.0.0-beta.2",
46
50
  "nodemon": "^3.0.3",
47
51
  "rimraf": "^5.0.0",
@@ -0,0 +1,7 @@
1
+ import { describe, expect, test } from '@jest/globals';
2
+
3
+ describe('test example module', () => {
4
+ test('should be false', () => {
5
+ expect(false).toBeFalsy();
6
+ });
7
+ });
@@ -7,5 +7,13 @@ module.exports = {
7
7
  rules: {
8
8
  "@typescript-eslint/no-unused-vars": "warn",
9
9
  "@typescript-eslint/no-explicit-any": "off"
10
- }
10
+ },
11
+ overrides: [
12
+ {
13
+ files: ["**/*/*.test.ts"],
14
+ env: {
15
+ jest: true
16
+ }
17
+ }
18
+ ]
11
19
  };
@@ -27,6 +27,11 @@ deploy:
27
27
  script:
28
28
  - echo "deploying azure func $AZURE_FUNC_RESOURCE_NAME to slot $AZURE_FUNC_SLOT from branch $CI_COMMIT_BRANCH"
29
29
  - yarn install --production=false
30
+ # START: component:browser
31
+ - cd src/browser
32
+ - yarn install --production=false
33
+ - cd ../../
34
+ # END: component:browser
30
35
  - yarn run clean && yarn run build && yarn func azure functionapp publish $AZURE_FUNC_RESOURCE_NAME --no-build --javascript
31
36
  only:
32
37
  - main
@@ -0,0 +1,5 @@
1
+ /** @type {import('ts-jest').JestConfigWithTsJest} */
2
+ module.exports = {
3
+ preset: 'ts-jest',
4
+ testEnvironment: 'node',
5
+ };
@@ -13,6 +13,7 @@
13
13
  "lint": "eslint",
14
14
  "build": "tsc",
15
15
  "watch": "tsc -w",
16
+ "test": "yarn jest",
16
17
  "clean": "<packageManagerRunPrefix> rimraf dist",
17
18
  "prestart": "<packageManagerRunPrefix> clean && <packageManagerRunPrefix> build",
18
19
  "dev": "func start --port 7072",
@@ -32,12 +33,15 @@
32
33
  "winston": "^3.11.0"
33
34
  },
34
35
  "devDependencies": {
36
+ "@jest/globals": "^29.7.0",
35
37
  "@types/lodash-es": "^4.17.12",
36
38
  "@types/node": "^18",
37
39
  "@typescript-eslint/eslint-plugin": "^6.19.1",
38
40
  "@typescript-eslint/parser": "^6.19.1",
39
41
  "azure-functions-core-tools": "^4.x",
40
42
  "eslint": "^8",
43
+ "jest": "^29.7.0",
44
+ "ts-jest": "^29.1.5",
41
45
  "ngrok": "^5.0.0-beta.2",
42
46
  "rimraf": "^5.0.0",
43
47
  "typescript": "^4.1.6"
@@ -0,0 +1,7 @@
1
+ import { describe, expect, test } from '@jest/globals';
2
+
3
+ describe('test example module', () => {
4
+ test('should be false', () => {
5
+ expect(false).toBeFalsy();
6
+ });
7
+ });
@@ -25,7 +25,7 @@ export async function getSeekaBrowserPlugin(installation: SeekaAppInstallState,
25
25
  content = await readFileAsync(browserPluginPath, 'utf8');
26
26
 
27
27
  // Configuration for the plugin. This can be different per installation.
28
- // Configuration is sent to the browser so no sensitive config settings should be specified here.
28
+ // Configuration is sent to the browser so NO SENSITIVE CONFIG / SERVER SECRETS SHOULD BE SPECIFIED HERE.
29
29
  const pluginConfig = {
30
30
  myAppInstallSetting1: installation.installationSettings.myAppInstallSetting1,
31
31
  myAppInstallSetting2: installation.installationSettings.myAppInstallSetting2,
@@ -7,5 +7,13 @@ module.exports = {
7
7
  rules: {
8
8
  "@typescript-eslint/no-unused-vars": "warn",
9
9
  "@typescript-eslint/no-explicit-any": "off"
10
- }
10
+ },
11
+ overrides: [
12
+ {
13
+ files: ["**/*/*.test.ts"],
14
+ env: {
15
+ jest: true
16
+ }
17
+ }
18
+ ]
11
19
  };
@@ -0,0 +1,5 @@
1
+ /** @type {import('ts-jest').JestConfigWithTsJest} */
2
+ module.exports = {
3
+ preset: 'ts-jest',
4
+ testEnvironment: 'node',
5
+ };
@@ -12,6 +12,7 @@
12
12
  "scripts": {
13
13
  "dev:invoke:example-scheduled-job": "netlify functions:invoke --name polling-example-job-scheduled --port 8888 --identity",
14
14
  "lint": "eslint",
15
+ "test": "yarn jest",
15
16
  "dev": "netlify dev --live=localdev --port 8888 --no-open",
16
17
  "build": "netlify functions:build --functions=dist --src=src/api",
17
18
  "deploy": "netlify deploy --build --skip-functions-cache --prod"
@@ -27,11 +28,14 @@
27
28
  "winston": "^3.11.0"
28
29
  },
29
30
  "devDependencies": {
31
+ "@jest/globals": "^29.7.0",
30
32
  "@types/lodash-es": "^4.17.12",
31
33
  "@types/node": "^18",
32
34
  "@typescript-eslint/eslint-plugin": "^6.19.1",
33
35
  "@typescript-eslint/parser": "^6.19.1",
34
36
  "eslint": "^8",
37
+ "jest": "^29.7.0",
38
+ "ts-jest": "^29.1.5",
35
39
  "netlify-cli": "^17.15.3",
36
40
  "typescript": "^5.3.3"
37
41
  }
@@ -0,0 +1,7 @@
1
+ import { describe, expect, test } from '@jest/globals';
2
+
3
+ describe('test example module', () => {
4
+ test('should be false', () => {
5
+ expect(false).toBeFalsy();
6
+ });
7
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seeka-labs/cli-apps",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "Seeka - Apps CLI",
5
5
  "author": "SEEKA <platform@seeka.co>",
6
6
  "license": "MIT",