@lambdaorm/client 0.10.13 → 1.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 08ed59d: **License:** from this version, the Business Source License 1.1 instead of MIT (LICENSE): free for non-production
8
+ use and for non-commercial open-source, non-profit, educational and research projects; a commercial production use
9
+ needs a commercial license. Each version changes to the Apache License 2.0 on 2030-11-29 or four years after it is
10
+ published, whichever comes first.
11
+
12
+ Views with roles (docs/VIEWS.md, docs/VIEWS_AUTHORIZATION.md). A view lists the entities it **includes** (names,
13
+ patterns with `*`, `childs: true` for its children) and, when it lists `properties`, the ones it includes (`"*"` for all
14
+ of them). A view can have `roles`, each with the entities it reads and writes (`read`, `write`), the filters of the rows
15
+ (`readExp`, `writeExp`, with the context), its properties and `extends`; a query names `options.view: 'view.role'`. The
16
+ filters of the role are added when the sentence is built (they are in `orm.plan`); `Authorization` checks the action
17
+ and the properties (`AuthorizationError`, a `ViewError`); an insert out of the `writeExp` is checked in memory, an
18
+ update in memory or in its sentence, and an update by key that the role leaves without rows is an `AuthorizationError`.
19
+ With a filter of the rows it writes (of the role or of the view), `upsert`, `merge`, `bulkMerge`, `bulkDelete` and
20
+ `insertConditional` are an `AuthorizationError` (their sentence can't apply it).
21
+ Every view and role is resolved when the schema is loaded. A listener runs with `default.owner` (with the stage, context
22
+ and transaction of the sentence that fires it): what it writes is the schema's, not the role's. The view `default` has the entities `"*"` and the role
23
+ `owner` with everything: a schema is generated with it, it is assumed (or completed) when the schema doesn't have it,
24
+ and a query without a view (or with `default`) uses `default.owner`. `lambdaorm build --view view.role` generates the
25
+ `model.ts` and the repositories of the role (what it doesn't write, `readonly`; an entity it only reads, a
26
+ `ReadRepository`; one it only writes, a `WriteRepository`), and `--all-roles` one folder per role. `bulkMerge`
27
+ (`Repository.bulkMerge`) was compiled as a select and no connection implemented it: it is the upsert of each row.
28
+ Fixed on the way: on SQL Server, a filter with the context (`context.x`, of a view or a role) sent its parameter as
29
+ NULL (no rows); on MySQL, MariaDB, SQL Server and Oracle, a string without length (created as `VARCHAR(80)`) was a
30
+ difference for `fetch` and an `ALTER` for every `push`. **Changes of behaviour:** an entity not listed in a view
31
+ isn't in it (`exclude: true` on an entity is a `SchemaError`), and `properties` of a view is the list of the ones it
32
+ includes (add `{ name: "*" }` to keep the others); `Entity.viewFilter` is `readFilter` / `writeFilter`;
33
+ `getSchemaViews()` lists the names a query can use (`default.owner`, `crm.admin`...).
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [41be21f]
38
+ - Updated dependencies [08ed59d]
39
+ - @lambdaorm/base@4.0.0
40
+
3
41
  ## 0.10.13
4
42
 
5
43
  ### Patch Changes
package/LICENSE CHANGED
@@ -1,9 +1,58 @@
1
- MIT License
1
+ Business Source License 1.1
2
2
 
3
- Copyright (c) Flavio Lionel Rita <flaviolrita@proton.me>
3
+ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
4
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
4
5
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+ Parameters
6
7
 
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+ Licensor: Flavio Lionel Rita <flaviolrita@proton.me>
9
+ Licensed Work: λORM (lambdaorm-core: @lambdaorm/base, @lambdaorm/lib,
10
+ @lambdaorm/client, @lambdaorm/cli)
11
+ Additional Use Grant: You may also make production use of the Licensed Work solely
12
+ within non-commercial open-source projects or non-profit
13
+ educational/research initiatives that do not generate revenue,
14
+ directly or indirectly, and are not operated by or on behalf
15
+ of a commercial enterprise. Any commercial or enterprise
16
+ production use requires a separate commercial license from
17
+ Licensor at flaviolrita@proton.me.
18
+ Change Date: 2030-11-29
19
+ Change License: Apache License, Version 2.0
8
20
 
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+ Terms
22
+
23
+ The Licensor hereby grants you the right to copy, modify, create derivative works,
24
+ redistribute, and make non-production use of the Licensed Work. The Licensor may make
25
+ an Additional Use Grant, above, permitting limited production use.
26
+
27
+ Effective on the Change Date, or the fourth anniversary of the first publicly available
28
+ distribution of a specific version of the Licensed Work under this License, whichever
29
+ comes first, the Licensor hereby grants you rights under the Change License, and the
30
+ rights granted in the paragraph above terminate.
31
+
32
+ If your use of the Licensed Work does not comply with the requirements currently in
33
+ effect as described in this License, you must purchase a commercial license from the
34
+ Licensor, its affiliated entities, or authorized resellers, or you must refrain from
35
+ using the Licensed Work.
36
+
37
+ All copies of the original and modified Licensed Work, and derivative works of the
38
+ Licensed Work, are subject to this License. This License applies separately for each
39
+ version of the Licensed Work and the Change Date may vary for each version of the
40
+ Licensed Work.
41
+
42
+ You must conspicuously display this License on each original or modified copy of the
43
+ Licensed Work. If you receive the Licensed Work in original or modified form from a
44
+ third party, the terms and conditions set forth in this License apply to your use of
45
+ that work.
46
+
47
+ Any use of the Licensed Work in violation of this License will automatically terminate
48
+ your rights under this License for the current and all other versions of the Licensed
49
+ Work.
50
+
51
+ This License does not grant you any right in any trademark or logo of Licensor or its
52
+ affiliates (provided that you may use a trademark or logo of Licensor as expressly
53
+ required by this License).
54
+
55
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS"
56
+ BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED,
57
+ INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
58
+ PURPOSE, NON-INFRINGEMENT, AND TITLE.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @lambdaorm/client
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@lambdaorm/client.svg)](https://www.npmjs.com/package/@lambdaorm/client)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![License: BUSL-1.1](https://img.shields.io/badge/License-BUSL--1.1-blue.svg)](LICENSE)
5
5
 
6
6
  **Documentation:** [lambda-orm.github.io/wiki](https://lambda-orm.github.io/wiki) (English, Deutsch, Español, Português)
7
7
 
@@ -114,4 +114,4 @@ await orm.end() // closes the connection
114
114
 
115
115
  ## License
116
116
 
117
- MIT
117
+ [Business Source License 1.1](LICENSE): free for non-production use and for non-commercial open-source, non-profit, educational and research projects; a commercial production use needs a commercial license (flaviolrita@proton.me). Each version changes to the Apache License 2.0 on 2030-11-29 or four years after it is published, whichever comes first.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@lambdaorm/client",
3
- "version": "0.10.13",
3
+ "version": "1.0.0",
4
4
  "description": "Client for lambda ORM service",
5
5
  "author": "Flavio Lionel Rita <flaviolrita@proton.me>",
6
- "license": "MIT",
6
+ "license": "BUSL-1.1",
7
7
  "engines": {
8
8
  "node": ">=20"
9
9
  },
@@ -27,7 +27,7 @@
27
27
  "test": "npx jest --config ./jest-config.json"
28
28
  },
29
29
  "dependencies": {
30
- "@lambdaorm/base": "^3.11.1",
30
+ "@lambdaorm/base": "^4.0.0",
31
31
  "3xpr": "^5.3.1",
32
32
  "h3lp": "^5.0.0",
33
33
  "axios": "^1.6.3",