@cloudcommerce/app-custom-shipping 2.8.8 → 2.10.0

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,9 +1,15 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-custom-shipping",
3
3
  "type": "module",
4
- "version": "2.8.8",
4
+ "version": "2.10.0",
5
5
  "description": "E-Com Plus Cloud Commerce app for custom shipping methods",
6
6
  "main": "lib/custom-shipping.js",
7
+ "files": [
8
+ "/lib",
9
+ "/lib-mjs",
10
+ "/types",
11
+ "/*.{js,mjs,ts}"
12
+ ],
7
13
  "repository": {
8
14
  "type": "git",
9
15
  "url": "git+https://github.com/ecomplus/cloud-commerce.git",
@@ -16,11 +22,11 @@
16
22
  },
17
23
  "homepage": "https://github.com/ecomplus/cloud-commerce/tree/main/packages/apps/custom-shipping#readme",
18
24
  "dependencies": {
19
- "@cloudcommerce/api": "2.8.8"
25
+ "@cloudcommerce/api": "2.10.0"
20
26
  },
21
27
  "devDependencies": {
22
- "@cloudcommerce/test-base": "2.8.8",
23
- "@cloudcommerce/types": "2.8.8"
28
+ "@cloudcommerce/test-base": "2.10.0",
29
+ "@cloudcommerce/types": "2.10.0"
24
30
  },
25
31
  "scripts": {
26
32
  "build": "bash ../../../scripts/build-lib.sh",
@@ -1,5 +0,0 @@
1
-
2
-
3
- > @cloudcommerce/app-custom-shipping@2.8.7 build /home/leo/code/ecomplus/cloud-commerce/packages/apps/custom-shipping
4
- > bash ../../../scripts/build-lib.sh
5
-
@@ -1,5 +0,0 @@
1
-
2
- > @cloudcommerce/app-custom-shipping@0.26.4 test /home/leo/code/ecomplus/cloud-commerce/packages/apps/custom-shipping
3
- > node --test tests/
4
-
5
-  ELIFECYCLE  Test failed. See above for more details.
package/CHANGELOG.md DELETED
@@ -1 +0,0 @@
1
- Please refer to GitHub [repository releases](https://github.com/ecomplus/cloud-commerce/releases) or monorepo unified [CHANGELOG.md](https://github.com/ecomplus/cloud-commerce/blob/main/CHANGELOG.md).
@@ -1,7 +0,0 @@
1
- /* eslint-disable import/prefer-default-export */
2
- import type { AppModuleBody } from '@cloudcommerce/types';
3
- import handleCalculateShipping from '../lib-mjs/calculate-custom-shipping.mjs';
4
-
5
- export const calculateShipping = async (modBody: AppModuleBody) => {
6
- return handleCalculateShipping(modBody);
7
- };
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './custom-shipping';
@@ -1,37 +0,0 @@
1
- /* eslint-disable import/no-extraneous-dependencies */
2
- import assert from 'node:assert';
3
- import test, { before, describe } from 'node:test';
4
- import {
5
- modulesUrl,
6
- bodyCalculateShipping,
7
- } from '@cloudcommerce/test-base';
8
-
9
- describe('Test Shipping Calculation in the Custom Shipping App', async () => {
10
- let req;
11
- let data;
12
- const appId = 1253;
13
-
14
- before(async () => {
15
- req = await fetch(`${modulesUrl}/calculate_shipping?app_id=${appId}`, {
16
- method: 'POST',
17
- body: JSON.stringify(bodyCalculateShipping),
18
- headers: {
19
- 'Content-Type': 'application/json',
20
- },
21
- });
22
-
23
- data = (await req.json()).result;
24
- });
25
-
26
- test('Check Status 200', async () => {
27
- assert.strictEqual(req?.status, 200);
28
- });
29
-
30
- test('Check validated is true', async () => {
31
- assert.equal(data[0].validated, true);
32
- });
33
-
34
- test('Have shipping services', async () => {
35
- assert.equal(data[0].response.shipping_services.length > 0, true);
36
- });
37
- });
package/tsconfig.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.json",
3
- "compilerOptions": {
4
- "declaration": true
5
- }
6
- }