lemon-core 5.0.8 → 5.0.9
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 +8 -5
- package/dist/esm/model.mjs +61 -0
- package/dist/model.d.ts +18 -0
- package/dist/model.js +36 -0
- package/dist/model.js.map +1 -0
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Bootloader for serverless micro-services on AWS Lambda: one function, several event sources, an engine with modules, a protocol service.
|
|
8
8
|
This README is the entry point for people and AI agents; every path and command below is in this repo. `§` refers to `HOW_TO_UPGRADE_V5.md`.
|
|
9
|
-
v5 status: npm `latest` is `5.0.
|
|
9
|
+
v5 status: npm `latest` is `5.0.8` (2026-10-30; B15 + lemon-model 5.0.2). The `v5` branch holds all 5.x work; `develop` is the default branch.
|
|
10
10
|
`CONTRIBUTING.md` describes the `develop` flow; 5.x changes are merged into `v5` until it lands on `develop`.
|
|
11
11
|
|
|
12
12
|
## At a glance
|
|
@@ -16,7 +16,7 @@ v5 status: npm `latest` is `5.0.7` (2026-10-30; same source as 5.0.6). The `v5`
|
|
|
16
16
|
| Runtime | Node `>=24.0.0` (`engines.node`), `.nvmrc` `24.15.0` |
|
|
17
17
|
| Build | TypeScript `^5.9.3`. `npm run build` = `build-ts` (`tsc`) + `scripts/gen-esm-wrapper.cjs` |
|
|
18
18
|
| Tests | vitest `^4.1.4`: `src/**/*.spec.ts`, `bin/**/*.spec.mjs` (`vitest.config.ts`) |
|
|
19
|
-
| Formats | CJS `dist/` + ESM `dist/esm/*.mjs`. `exports`: `.`, `./testing`, `./dist/environ`, `./dist/cores/lambda/lambda-web-handler`, `./dist/extended/cores`, `./dist/*` (until v6), `./package.json` |
|
|
19
|
+
| Formats | CJS `dist/` + ESM `dist/esm/*.mjs`. `exports`: `.`, `./testing`, `./model` (unreleased, B16), `./dist/environ`, `./dist/cores/lambda/lambda-web-handler`, `./dist/extended/cores`, `./dist/*` (until v6), `./package.json` |
|
|
20
20
|
| Dependencies | `@aws-sdk/client-dynamodb, @aws-sdk/lib-dynamodb, @opensearch-project/opensearch, @smithy/signature-v4, @types/aws-lambda, @types/jsonwebtoken, async, crypto-js, js-yaml, jsonwebtoken, lemon-model, mime-types, node-cache, qs, source-map-support` |
|
|
21
21
|
| Optional peers | 8 AWS SDK packages `^3.1159.0`, loaded on first use. `typescript` `>=4.7` (CLI) |
|
|
22
22
|
| Published | `files`: `dist/**/*`, `bin/lemon-fields-types.mjs`, `bin/lib/fields-types.mjs`. CLI `lemon-fields-types` (since 5.0.5; see § 13.5) |
|
|
@@ -33,7 +33,7 @@ v5 status: npm `latest` is `5.0.7` (2026-10-30; same source as 5.0.6). The `v5`
|
|
|
33
33
|
| `src/extended/` | `CoreService`, `ManagerProxy`; `cores/`: template layer (`MyCoreService`, `checkFieldsAdmin()`) | Developer |
|
|
34
34
|
| `src/controllers/`, `tools/`, `helpers/` | Controllers, `express`, `$T`, `$protocol()` | Developer |
|
|
35
35
|
| `src/lib/` | Internal: `safe-json`, `log-mask`, `qs-compat`, `http-fetch`, `lazy`, `perf`. `lib` barrel: `dynamodb-value` only | Developer. Internal; never re-exported from a barrel |
|
|
36
|
-
| `src/common/test-helper.ts`, `src/environ.ts` | Sub-paths `lemon-core/testing`, `lemon-core/dist/environ` | Rarely;
|
|
36
|
+
| `src/common/test-helper.ts`, `src/environ.ts`, `src/model.ts` | Sub-paths `lemon-core/testing`, `lemon-core/dist/environ`, `lemon-core/model` (B16) | Rarely; all are published sub-paths |
|
|
37
37
|
| `bin/` | `lemon-fields-types` CLI, `lib/` logic, spec, fixtures | Developer |
|
|
38
38
|
| `scripts/` | Build and API gates, lazy-load probes | Developer |
|
|
39
39
|
| `etc/api-names.v4.txt`, `etc/api-names.allow.txt` | v4 public-name baseline; allowed `+Name`/`-Name` | The baseline stays; add lines to the allow list only |
|
|
@@ -85,6 +85,7 @@ await $lemon.engine.initialize(); // resolves once every module's initModule() s
|
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
ESM `import` gives the same instances (§ 2). Specs use `lemon-core/testing` (§ 4).
|
|
88
|
+
Since 5.0.9, lemon-model names that are not on the root come from `import { field, fieldsOf } from 'lemon-core/model';` — do not declare `lemon-model` yourself (§ 16).
|
|
88
89
|
|
|
89
90
|
### 3. Engine module registration — the "3-piece set"
|
|
90
91
|
|
|
@@ -171,7 +172,7 @@ npm audit --omit=dev # found 0 vulnerabilities
|
|
|
171
172
|
|
|
172
173
|
| Document | Content |
|
|
173
174
|
|---|---|
|
|
174
|
-
| [HOW_TO_UPGRADE_V5.md](HOW_TO_UPGRADE_V5.md) | § 1 Node 24 · § 2 ESM · § 3 `exports` · § 4 testing · § 5 modules · § 6 deps · § 7 OpenSearch · § 8 AWS SDK · § 9 L1/L2 · § 10 `@field()` · § 11 trust · § 12 `src/cores/` · § 13 B10 · § 14 audit · § 15 channel/relay (B14) |
|
|
175
|
+
| [HOW_TO_UPGRADE_V5.md](HOW_TO_UPGRADE_V5.md) | § 1 Node 24 · § 2 ESM · § 3 `exports` · § 4 testing · § 5 modules · § 6 deps · § 7 OpenSearch · § 8 AWS SDK · § 9 L1/L2 · § 10 `@field()` · § 11 trust · § 12 `src/cores/` · § 13 B10 · § 14 audit · § 15 channel/relay (B14) · § 16 `lemon-core/model` (B16) |
|
|
175
176
|
| [HOW_TO_UPGRADE_V4.md](HOW_TO_UPGRADE_V4.md) | v3 → v4 (historical) |
|
|
176
177
|
| [baseline.md](docs/v5/baseline.md) | B0-a baseline: link state, boot, run modes, test counts, public names |
|
|
177
178
|
| [B0-local-harness.md](docs/v5/B0-local-harness.md) | B0 local harness: the local run path as the verification gate |
|
|
@@ -202,10 +203,11 @@ npm audit --omit=dev # found 0 vulnerabilities
|
|
|
202
203
|
| [B14-relay-context.md](docs/v5/B14-relay-context.md) | B14 plan: `context.channel`, the signed relay `x-lemon-relay`, trace, `x-protocol-context` deprecation (Korean) |
|
|
203
204
|
| [B14-relay-context-impl.md](docs/v5/B14-relay-context-impl.md) | B14 implementation record (WP1–WP3): lemon-model `channel`/`trace`, `protocol-relay.ts`, entry changes (Korean) |
|
|
204
205
|
| [B15-security.md](docs/v5/B15-security.md) | B15: cross-cloud `cid`, list `view`, internal admin, policy keys `internal`/`cross` |
|
|
206
|
+
| [B16-model-subpath.md](docs/v5/B16-model-subpath.md) | B16: sub-path `lemon-core/model` (all of lemon-model), exact lemon-model pin, consumer rule |
|
|
205
207
|
| [docs/specs/](docs/specs/) | `$T`, `$U` characterization specs |
|
|
206
208
|
| [docs/header-identity-token.md](docs/header-identity-token.md) | Identity token header |
|
|
207
209
|
| [CONTRIBUTING](CONTRIBUTING.md), [SECURITY](SECURITY.md), [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) | PR process; supported versions; conduct |
|
|
208
|
-
| [CHANGELOG.md](CHANGELOG.md) | 5.0.5–5.0.
|
|
210
|
+
| [CHANGELOG.md](CHANGELOG.md) | 5.0.5–5.0.8 entries (B10, B13, B14, B15), then stops at 1.2.0 (2019); see VERSION INFO |
|
|
209
211
|
|
|
210
212
|
## Contribution
|
|
211
213
|
|
|
@@ -223,6 +225,7 @@ See [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md)
|
|
|
223
225
|
|
|
224
226
|
| Version | Description
|
|
225
227
|
|-- |--
|
|
228
|
+
| 5.0.8 | B15 security follow-up (§ 11.7, § 15.2); lemon-model `^5.0.2`.
|
|
226
229
|
| 5.0.7 | Re-publish of 5.0.6 (same source).
|
|
227
230
|
| 5.0.6 | B13 default data-access policy of `AbstractCRUDController` (§ 11.7); B14 `context.channel`, signed relay `x-lemon-relay`, `TRACE` line, `x-protocol-context` deprecated (§ 15); README rewritten as the v5 entry point; lemon-model `^5.0.1`.
|
|
228
231
|
| 5.0.5 | B10: `getHelloArn()` account (§ 13.1), circular-safe reports (§ 13.2), masked header logs (§ 13.3), enforce runbook + masked config log (§ 13.4), `lemon-fields-types` (§ 13.5); `LOCAL_TRANSPORT=mock` opt-in (§ 11.3.1).
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// generated by scripts/gen-esm-wrapper.cjs from dist/model.d.ts. do not edit.
|
|
2
|
+
import cjs from '../model.js';
|
|
3
|
+
export const $gemini = cjs.$gemini;
|
|
4
|
+
export const AbstractTransformer = cjs.AbstractTransformer;
|
|
5
|
+
export const BrowserWebSocketNetwork = cjs.BrowserWebSocketNetwork;
|
|
6
|
+
export const CORE_FIELDS = cjs.CORE_FIELDS;
|
|
7
|
+
export const CoreModel = cjs.CoreModel;
|
|
8
|
+
export const DEFAULT_MAX_PACKET_BYTES = cjs.DEFAULT_MAX_PACKET_BYTES;
|
|
9
|
+
export const FIELDS_KEY = cjs.FIELDS_KEY;
|
|
10
|
+
export const GenAIStreamBuffer = cjs.GenAIStreamBuffer;
|
|
11
|
+
export const HttpAbstractGenAI = cjs.HttpAbstractGenAI;
|
|
12
|
+
export const JSONProxyTransportReceiver = cjs.JSONProxyTransportReceiver;
|
|
13
|
+
export const JSONTransport = cjs.JSONTransport;
|
|
14
|
+
export const JSONTransportReliableError = cjs.JSONTransportReliableError;
|
|
15
|
+
export const JSON_RELIABLE_SCOPE = cjs.JSON_RELIABLE_SCOPE;
|
|
16
|
+
export const MULTI_NETWORK_SCOPE = cjs.MULTI_NETWORK_SCOPE;
|
|
17
|
+
export const OwnedWebSocketNetwork = cjs.OwnedWebSocketNetwork;
|
|
18
|
+
export const TokenBuffer = cjs.TokenBuffer;
|
|
19
|
+
export const WEBSOCKET_NETWORK_SCOPE = cjs.WEBSOCKET_NETWORK_SCOPE;
|
|
20
|
+
export const asGenAIStreamNetworkTransportOptions = cjs.asGenAIStreamNetworkTransportOptions;
|
|
21
|
+
export const asLegacyTokenConsumer = cjs.asLegacyTokenConsumer;
|
|
22
|
+
export const asStreamConsumer = cjs.asStreamConsumer;
|
|
23
|
+
export const assembleJSON = cjs.assembleJSON;
|
|
24
|
+
export const browserWebSocketDumpTest = cjs.browserWebSocketDumpTest;
|
|
25
|
+
export const calculateJSONTransportChunkBytes = cjs.calculateJSONTransportChunkBytes;
|
|
26
|
+
export const compactStreamEvent = cjs.compactStreamEvent;
|
|
27
|
+
export const createBufferProgressGauge = cjs.createBufferProgressGauge;
|
|
28
|
+
export const createFilteredNetwork = cjs.createFilteredNetwork;
|
|
29
|
+
export const createGenAIStreamNetworkConsumer = cjs.createGenAIStreamNetworkConsumer;
|
|
30
|
+
export const createGenAIStreamNetworkReceiver = cjs.createGenAIStreamNetworkReceiver;
|
|
31
|
+
export const createJSONTransport = cjs.createJSONTransport;
|
|
32
|
+
export const createLogTraceConsumer = cjs.createLogTraceConsumer;
|
|
33
|
+
export const createLogTraceReporter = cjs.createLogTraceReporter;
|
|
34
|
+
export const createMultiSocketNetwork = cjs.createMultiSocketNetwork;
|
|
35
|
+
export const createOwnedWebSocketNetwork = cjs.createOwnedWebSocketNetwork;
|
|
36
|
+
export const createProgressConsumer = cjs.createProgressConsumer;
|
|
37
|
+
export const createProgressReporter = cjs.createProgressReporter;
|
|
38
|
+
export const createProxyTransportReceiver = cjs.createProxyTransportReceiver;
|
|
39
|
+
export const createReconnectingNetwork = cjs.createReconnectingNetwork;
|
|
40
|
+
export const createSocketClient = cjs.createSocketClient;
|
|
41
|
+
export const createSocketClientIdentityProvider = cjs.createSocketClientIdentityProvider;
|
|
42
|
+
export const createSyncMachine = cjs.createSyncMachine;
|
|
43
|
+
export const createSyncTicker = cjs.createSyncTicker;
|
|
44
|
+
export const createTimeProgressGauge = cjs.createTimeProgressGauge;
|
|
45
|
+
export const createTranslatedNetwork = cjs.createTranslatedNetwork;
|
|
46
|
+
export const defaultJSONTransportIdentityProvider = cjs.defaultJSONTransportIdentityProvider;
|
|
47
|
+
export const defaultReliableJSONTransportIdentityProvider = cjs.defaultReliableJSONTransportIdentityProvider;
|
|
48
|
+
export const estimateGenAIStreamSize = cjs.estimateGenAIStreamSize;
|
|
49
|
+
export const extractWebSocketConnectionId = cjs.extractWebSocketConnectionId;
|
|
50
|
+
export const field = cjs.field;
|
|
51
|
+
export const fieldsOf = cjs.fieldsOf;
|
|
52
|
+
export const isJSONReliableScope = cjs.isJSONReliableScope;
|
|
53
|
+
export const mockGenAIStream = cjs.mockGenAIStream;
|
|
54
|
+
export const onGenAIStreamNetworkError = cjs.onGenAIStreamNetworkError;
|
|
55
|
+
export const onReliableError = cjs.onReliableError;
|
|
56
|
+
export const restoreStreamEvent = cjs.restoreStreamEvent;
|
|
57
|
+
export const runMockGenAIStream = cjs.runMockGenAIStream;
|
|
58
|
+
export const specsOf = cjs.specsOf;
|
|
59
|
+
export const splitJSON = cjs.splitJSON;
|
|
60
|
+
export const summarizeJSONTransportSize = cjs.summarizeJSONTransportSize;
|
|
61
|
+
export const waitWebSocketConnectionId = cjs.waitWebSocketConnectionId;
|
package/dist/model.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `model.ts`
|
|
3
|
+
* - sub-path `lemon-core/model`: the whole lemon-model surface, through lemon-core (v5 B16, D73).
|
|
4
|
+
* - consumers do not declare `lemon-model` themselves: the lemon-core version fixes the lemon-model version.
|
|
5
|
+
* - the root (`lemon-core`) keeps only the 32 v4 lemon-model names (S-06); every other name is here.
|
|
6
|
+
*
|
|
7
|
+
* usage:
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { CoreModel } from 'lemon-core'; // root: the 32 v4 names
|
|
10
|
+
* import { field, fieldsOf } from 'lemon-core/model'; // everything else of lemon-model
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @author Steve Jung <steve@lemoncloud.io>
|
|
14
|
+
* @date 2026-10-30 v5 B16: initial version (`export *` from lemon-model, no default export there).
|
|
15
|
+
*
|
|
16
|
+
* @copyright (C) lemoncloud.io 2026 - All Rights Reserved.
|
|
17
|
+
*/
|
|
18
|
+
export * from 'lemon-model';
|
package/dist/model.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* `model.ts`
|
|
19
|
+
* - sub-path `lemon-core/model`: the whole lemon-model surface, through lemon-core (v5 B16, D73).
|
|
20
|
+
* - consumers do not declare `lemon-model` themselves: the lemon-core version fixes the lemon-model version.
|
|
21
|
+
* - the root (`lemon-core`) keeps only the 32 v4 lemon-model names (S-06); every other name is here.
|
|
22
|
+
*
|
|
23
|
+
* usage:
|
|
24
|
+
* ```ts
|
|
25
|
+
* import { CoreModel } from 'lemon-core'; // root: the 32 v4 names
|
|
26
|
+
* import { field, fieldsOf } from 'lemon-core/model'; // everything else of lemon-model
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @author Steve Jung <steve@lemoncloud.io>
|
|
30
|
+
* @date 2026-10-30 v5 B16: initial version (`export *` from lemon-model, no default export there).
|
|
31
|
+
*
|
|
32
|
+
* @copyright (C) lemoncloud.io 2026 - All Rights Reserved.
|
|
33
|
+
*/
|
|
34
|
+
//* v5 B16: re-export every named value and type of lemon-model (lemon-model has no default export).
|
|
35
|
+
__exportStar(require("lemon-model"), exports);
|
|
36
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,oGAAoG;AACpG,8CAA4B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lemon-core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.9",
|
|
4
4
|
"description": "Lemon Serverless Micro-Service Platform",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
"require": "./dist/common/test-helper.js",
|
|
21
21
|
"default": "./dist/common/test-helper.js"
|
|
22
22
|
},
|
|
23
|
+
"./model": {
|
|
24
|
+
"types": "./dist/model.d.ts",
|
|
25
|
+
"import": "./dist/esm/model.mjs",
|
|
26
|
+
"require": "./dist/model.js",
|
|
27
|
+
"default": "./dist/model.js"
|
|
28
|
+
},
|
|
23
29
|
"./dist/environ": {
|
|
24
30
|
"types": "./dist/environ.d.ts",
|
|
25
31
|
"import": "./dist/environ.js",
|
|
@@ -105,7 +111,7 @@
|
|
|
105
111
|
"crypto-js": "^4.2.0",
|
|
106
112
|
"js-yaml": "^4.1.1",
|
|
107
113
|
"jsonwebtoken": "^9.0.3",
|
|
108
|
-
"lemon-model": "
|
|
114
|
+
"lemon-model": "5.0.2",
|
|
109
115
|
"mime-types": "^3.0.2",
|
|
110
116
|
"node-cache": "^5.1.2",
|
|
111
117
|
"qs": "^6.16.2",
|