czapp-shared 1.0.19 → 1.0.21

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/README.md CHANGED
@@ -14,22 +14,30 @@ import { MyType } from 'czapp-shared';
14
14
  ```
15
15
 
16
16
  ## Development
17
- To link the local copy of the package to another project, first in the root of the czapp-shared project run:
17
+ Note `npm link` does not work. Use Yalc instead.
18
+
19
+ First install Yalc globally:
20
+ ```bash
21
+ npm install -g yalc
22
+ ```
23
+
24
+ Then run the following command in the root of this project:
18
25
  ```bash
19
- npm link
26
+ yalc publish
20
27
  ```
21
- ... then in the root of the project you want to link to run:
28
+
29
+ Then in the project that you want to use this package, run the following command:
22
30
  ```bash
23
- npm link czapp-shared
31
+ yalc add czapp-shared
24
32
  ```
25
- This will create a symlink in the node_modules folder of the project you want to link to that points to the local copy
26
- of the package.
27
33
 
28
34
  To run the project in watch mode:
29
35
  ```bash
30
36
  npm run watch
31
37
  ```
32
38
 
39
+ TODO - make yalc republish after every change. At the moment it is manual. Run `yalc publish` after every change.
40
+
33
41
  To build the project (generate the artifacts):
34
42
  ```bash
35
43
  To build:
package/dist/index.d.mts CHANGED
@@ -356,6 +356,9 @@ interface ControllerResponse<T> {
356
356
  }
357
357
  type TranslationResponseData = {
358
358
  detectedSourceLanguage: Language;
359
+ sourceLangCode: string;
360
+ targetLangCode: string;
361
+ sourceText: string;
359
362
  translations: Array<{
360
363
  translatedText: string;
361
364
  }>;
package/dist/index.d.ts CHANGED
@@ -356,6 +356,9 @@ interface ControllerResponse<T> {
356
356
  }
357
357
  type TranslationResponseData = {
358
358
  detectedSourceLanguage: Language;
359
+ sourceLangCode: string;
360
+ targetLangCode: string;
361
+ sourceText: string;
359
362
  translations: Array<{
360
363
  translatedText: string;
361
364
  }>;
package/dist/index.js CHANGED
@@ -17,8 +17,8 @@ var __copyProps = (to, from, except, desc) => {
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
19
  // src/index.ts
20
- var src_exports = {};
21
- __export(src_exports, {
20
+ var index_exports = {};
21
+ __export(index_exports, {
22
22
  ApiMethod: () => ApiMethod,
23
23
  ApiPath: () => ApiPath,
24
24
  AppError: () => AppError,
@@ -45,7 +45,7 @@ __export(src_exports, {
45
45
  isValidMysqlDateString: () => isValidMysqlDateString,
46
46
  parameterReplace: () => parameterReplace
47
47
  });
48
- module.exports = __toCommonJS(src_exports);
48
+ module.exports = __toCommonJS(index_exports);
49
49
 
50
50
  // src/concrete/date.ts
51
51
  var getMysqlDateIgnoreTZ = (date) => {
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "czapp-shared",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "This is a shared library for Czapp projects. It contains common code that is used across multiple projects.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "typings": "dist/index.d.ts",
8
8
  "scripts": {
9
- "test:unit": "mocha --require ts-node/register/transpile-only test/**/*.ts",
10
9
  "build": "tsup src/index.ts --clean --format=cjs,esm --dts",
11
- "release:bump": "bumpp",
12
- "watch": "tsup src/index.ts --format=cjs,esm --dts --watch"
10
+ "watch": "npm run build -- --watch",
11
+ "test:unit": "mocha --require ts-node/register/transpile-only test/**/*.ts",
12
+ "release:bump": "bumpp"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
package/src/design/api.ts CHANGED
@@ -158,6 +158,9 @@ export interface ControllerResponse<T> {
158
158
  // Response Data
159
159
  export type TranslationResponseData = {
160
160
  detectedSourceLanguage: Language,
161
+ sourceLangCode: string,
162
+ targetLangCode: string,
163
+ sourceText: string,
161
164
  translations: Array<{
162
165
  translatedText: string
163
166
  }>
package/tsconfig.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "declaration": true,
9
9
  "lib": ["es2017"],
10
10
  "noImplicitAny": true,
11
- "removeComments": false,
11
+ "removeComments": false
12
12
  },
13
13
  "include": [
14
14
  "src/**/*"