@omriashke/dynamico-validator 0.1.1 → 0.1.3
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/dist/render.d.ts +7 -1
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +11 -12
- package/dist/render.js.map +1 -1
- package/dist/runTest.d.ts +3 -1
- package/dist/runTest.d.ts.map +1 -1
- package/dist/runTest.js +2 -1
- package/dist/runTest.js.map +1 -1
- package/package.json +8 -8
- package/src/render.ts +11 -12
- package/src/runTest.ts +8 -2
- package/LICENSE +0 -184
package/dist/render.d.ts
CHANGED
|
@@ -27,7 +27,13 @@ export interface RenderResult {
|
|
|
27
27
|
toJSON: () => unknown;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Mount a component using react-test-renderer
|
|
30
|
+
* Mount a component using react-test-renderer.
|
|
31
|
+
*
|
|
32
|
+
* `.root` is a lazy getter so it is never accessed during construction —
|
|
33
|
+
* React 19 production builds don't export `act`, and eagerly reading `.root`
|
|
34
|
+
* before React has committed the tree throws "Can't access .root on unmounted
|
|
35
|
+
* test renderer". Deferring the access to call-time (when the test actually
|
|
36
|
+
* needs it) avoids the race.
|
|
31
37
|
*
|
|
32
38
|
* `RenderOptions.scope` is currently a hint surface only — the actual scope
|
|
33
39
|
* is wired up by the runner before render() is called (see runTest.ts), so
|
package/dist/render.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEhF,MAAM,WAAW,aAAa;IAC5B;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,gCAAgC;IAChC,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,KAAK,IAAI,CAAC;IAC3C,4EAA4E;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;OAIG;IACH,MAAM,EAAE,MAAM,OAAO,CAAC;CACvB;AAED
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEhF,MAAM,WAAW,aAAa;IAC5B;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,gCAAgC;IAChC,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,KAAK,IAAI,CAAC;IAC3C,4EAA4E;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;OAIG;IACH,MAAM,EAAE,MAAM,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,GAAE,aAAkB,GAAG,YAAY,CAe3F"}
|
package/dist/render.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import TestRenderer from "react-test-renderer";
|
|
2
2
|
/**
|
|
3
|
-
* Mount a component using react-test-renderer
|
|
3
|
+
* Mount a component using react-test-renderer.
|
|
4
|
+
*
|
|
5
|
+
* `.root` is a lazy getter so it is never accessed during construction —
|
|
6
|
+
* React 19 production builds don't export `act`, and eagerly reading `.root`
|
|
7
|
+
* before React has committed the tree throws "Can't access .root on unmounted
|
|
8
|
+
* test renderer". Deferring the access to call-time (when the test actually
|
|
9
|
+
* needs it) avoids the race.
|
|
4
10
|
*
|
|
5
11
|
* `RenderOptions.scope` is currently a hint surface only — the actual scope
|
|
6
12
|
* is wired up by the runner before render() is called (see runTest.ts), so
|
|
@@ -9,22 +15,15 @@ import TestRenderer from "react-test-renderer";
|
|
|
9
15
|
* second arg, so use it to control what hooks / modules the component sees.
|
|
10
16
|
*/
|
|
11
17
|
export function render(element, _opts = {}) {
|
|
12
|
-
|
|
13
|
-
TestRenderer.act(() => {
|
|
14
|
-
renderer = TestRenderer.create(element);
|
|
15
|
-
});
|
|
18
|
+
const renderer = TestRenderer.create(element);
|
|
16
19
|
return {
|
|
17
|
-
root
|
|
20
|
+
get root() { return renderer.root; },
|
|
18
21
|
renderer,
|
|
19
22
|
update(next) {
|
|
20
|
-
|
|
21
|
-
renderer.update(next);
|
|
22
|
-
});
|
|
23
|
+
renderer.update(next);
|
|
23
24
|
},
|
|
24
25
|
unmount() {
|
|
25
|
-
|
|
26
|
-
renderer.unmount();
|
|
27
|
-
});
|
|
26
|
+
renderer.unmount();
|
|
28
27
|
},
|
|
29
28
|
toJSON() {
|
|
30
29
|
return renderer.toJSON();
|
package/dist/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,qBAAqB,CAAC;AA+B/C
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,qBAAqB,CAAC;AA+B/C;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,MAAM,CAAC,OAA2B,EAAE,QAAuB,EAAE;IAC3E,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9C,OAAO;QACL,IAAI,IAAI,KAAwB,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACvD,QAAQ;QACR,MAAM,CAAC,IAAwB;YAC7B,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;QACD,OAAO;YACL,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC;QACD,MAAM;YACJ,OAAO,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC3B,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/runTest.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Scope } from "@omriashke/dynamico-core";
|
|
1
|
+
import { type Scope, type PropsSchema } from "@omriashke/dynamico-core";
|
|
2
2
|
export interface RunTestInput {
|
|
3
3
|
/** Component name (e.g. "HomeScreen"). Only used in error messages. */
|
|
4
4
|
name: string;
|
|
@@ -34,6 +34,8 @@ export interface RunTestInput {
|
|
|
34
34
|
export interface RunTestResult {
|
|
35
35
|
ok: boolean;
|
|
36
36
|
durationMs: number;
|
|
37
|
+
/** Exported propsSchema from the component module, when present. */
|
|
38
|
+
propsSchema?: PropsSchema;
|
|
37
39
|
/** When ok=false, the message thrown by the test (or load failure). */
|
|
38
40
|
error?: {
|
|
39
41
|
message: string;
|
package/dist/runTest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runTest.d.ts","sourceRoot":"","sources":["../src/runTest.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,KAAK,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"runTest.d.ts","sourceRoot":"","sources":["../src/runTest.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIpF,MAAM,WAAW,YAAY;IAC3B,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,uEAAuE;IACvE,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,yFAAyF;QACzF,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,mBAAmB,GAAG,gBAAgB,CAAC;KAC3E,CAAC;CACH;AAgBD,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAE/C;AACD,wBAAgB,YAAY,IAAI,KAAK,CAEpC;AAmOD,wBAAsB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CA6GzE"}
|
package/dist/runTest.js
CHANGED
|
@@ -279,6 +279,7 @@ export async function runTest(input) {
|
|
|
279
279
|
},
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
|
+
const propsSchema = componentExports?.propsSchema;
|
|
282
283
|
// Phase 2: load the test module. The test imports the component via the
|
|
283
284
|
// synthetic specifier '__component__' which we inject into scope.
|
|
284
285
|
const testScope = makeAutoStubScope(componentExports, {
|
|
@@ -334,6 +335,6 @@ export async function runTest(input) {
|
|
|
334
335
|
},
|
|
335
336
|
};
|
|
336
337
|
}
|
|
337
|
-
return { ok: true, durationMs: performance.now() - start };
|
|
338
|
+
return { ok: true, durationMs: performance.now() - start, propsSchema };
|
|
338
339
|
}
|
|
339
340
|
//# sourceMappingURL=runTest.js.map
|
package/dist/runTest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runTest.js","sourceRoot":"","sources":["../src/runTest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"runTest.js","sourceRoot":"","sources":["../src/runTest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAgC,MAAM,0BAA0B,CAAC;AACpF,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,8BAA8B,CAAC;AAiD7D,MAAM,cAAc,GAAU;IAC5B,KAAK,EAAE,KAAK;IACZ,cAAc,EAAE,MAAM;IACtB,gCAAgC,EAAE,YAAY;CAC/C,CAAC;AAEF;;;;;;GAMG;AACH,IAAI,gBAAgB,GAAU,EAAE,CAAC;AACjC,MAAM,UAAU,YAAY,CAAC,KAAY;IACvC,gBAAgB,GAAG,EAAE,GAAG,gBAAgB,EAAE,GAAG,KAAK,EAAE,CAAC;AACvD,CAAC;AACD,MAAM,UAAU,YAAY;IAC1B,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH;;;;;;;;;;;GAWG;AACH,SAAS,iBAAiB,CACxB,iBAA0B,EAC1B,SAAgB,EAChB,YAAgC;IAEhC,MAAM,OAAO,GAAG,cAAc,CAAC;IAC/B,MAAM,QAAQ,GAAG,SAAS,CAAC;IAC3B,4EAA4E;IAC5E,+EAA+E;IAC/E,2EAA2E;IAC3E,0EAA0E;IAC1E,wBAAwB;IACxB,MAAM,UAAU,GAAG,YAAY;QAC7B,CAAC,CAAC,IAAI,GAAG,CAAS;YACd,GAAG,YAAY;YACf,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;YACvB,GAAG,MAAM,CAAC,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C,OAAO;YACL,EAAE,EAAE,KAAK;YACT,UAAU,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK;YACrC,KAAK,EAAE;gBACL,KAAK,EAAE,gBAAgB;gBACvB,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,wDAAwD,OAAO,MAAM,GAAG;aAC/F;SACF,CAAC;IACJ,CAAC;IAED,4BAA4B;IAC5B,IAAI,CAAC;QACH,MAAO,MAA2C,EAAE,CAAC;IACvD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,EAAE,EAAE,KAAK;YACT,UAAU,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK;YACrC,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;gBACzD,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;aACpD;SACF,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,EAAE,WAAW,EAAE,CAAC;AAC1E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omriashke/dynamico-validator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Server-side validator for dynamico components. Provides render(), press(), findByText() with auto-stubbed react-native + host scope so the registry can execute each component's co-located *.test.tsx in a worker thread and reject pushes that throw, miss a scope binding, or render incorrectly.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc -p tsconfig.json",
|
|
41
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
42
|
+
},
|
|
39
43
|
"dependencies": {
|
|
44
|
+
"@omriashke/dynamico-core": "workspace:*",
|
|
40
45
|
"react": "^19.0.0",
|
|
41
|
-
"react-test-renderer": "^19.0.0"
|
|
42
|
-
"@omriashke/dynamico-core": "0.1.1"
|
|
46
|
+
"react-test-renderer": "^19.0.0"
|
|
43
47
|
},
|
|
44
48
|
"devDependencies": {
|
|
45
49
|
"@types/react": "^18.3.0",
|
|
46
50
|
"@types/react-test-renderer": "^18.3.0",
|
|
47
51
|
"typescript": "^5.6.3"
|
|
48
|
-
},
|
|
49
|
-
"scripts": {
|
|
50
|
-
"build": "tsc -p tsconfig.json",
|
|
51
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
52
52
|
}
|
|
53
|
-
}
|
|
53
|
+
}
|
package/src/render.ts
CHANGED
|
@@ -31,7 +31,13 @@ export interface RenderResult {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* Mount a component using react-test-renderer
|
|
34
|
+
* Mount a component using react-test-renderer.
|
|
35
|
+
*
|
|
36
|
+
* `.root` is a lazy getter so it is never accessed during construction —
|
|
37
|
+
* React 19 production builds don't export `act`, and eagerly reading `.root`
|
|
38
|
+
* before React has committed the tree throws "Can't access .root on unmounted
|
|
39
|
+
* test renderer". Deferring the access to call-time (when the test actually
|
|
40
|
+
* needs it) avoids the race.
|
|
35
41
|
*
|
|
36
42
|
* `RenderOptions.scope` is currently a hint surface only — the actual scope
|
|
37
43
|
* is wired up by the runner before render() is called (see runTest.ts), so
|
|
@@ -40,22 +46,15 @@ export interface RenderResult {
|
|
|
40
46
|
* second arg, so use it to control what hooks / modules the component sees.
|
|
41
47
|
*/
|
|
42
48
|
export function render(element: React.ReactElement, _opts: RenderOptions = {}): RenderResult {
|
|
43
|
-
|
|
44
|
-
TestRenderer.act(() => {
|
|
45
|
-
renderer = TestRenderer.create(element);
|
|
46
|
-
});
|
|
49
|
+
const renderer = TestRenderer.create(element);
|
|
47
50
|
return {
|
|
48
|
-
root: renderer.root,
|
|
51
|
+
get root(): ReactTestInstance { return renderer.root; },
|
|
49
52
|
renderer,
|
|
50
53
|
update(next: React.ReactElement) {
|
|
51
|
-
|
|
52
|
-
renderer.update(next);
|
|
53
|
-
});
|
|
54
|
+
renderer.update(next);
|
|
54
55
|
},
|
|
55
56
|
unmount() {
|
|
56
|
-
|
|
57
|
-
renderer.unmount();
|
|
58
|
-
});
|
|
57
|
+
renderer.unmount();
|
|
59
58
|
},
|
|
60
59
|
toJSON() {
|
|
61
60
|
return renderer.toJSON();
|
package/src/runTest.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { loadModule, type Scope } from "@omriashke/dynamico-core";
|
|
2
|
+
import { loadModule, type Scope, type PropsSchema } from "@omriashke/dynamico-core";
|
|
3
3
|
import * as RNMock from "./mocks/react-native.js";
|
|
4
4
|
import * as SafeAreaMock from "./mocks/safe-area-context.js";
|
|
5
5
|
|
|
@@ -39,6 +39,8 @@ export interface RunTestInput {
|
|
|
39
39
|
export interface RunTestResult {
|
|
40
40
|
ok: boolean;
|
|
41
41
|
durationMs: number;
|
|
42
|
+
/** Exported propsSchema from the component module, when present. */
|
|
43
|
+
propsSchema?: PropsSchema;
|
|
42
44
|
/** When ok=false, the message thrown by the test (or load failure). */
|
|
43
45
|
error?: {
|
|
44
46
|
message: string;
|
|
@@ -341,6 +343,10 @@ export async function runTest(input: RunTestInput): Promise<RunTestResult> {
|
|
|
341
343
|
};
|
|
342
344
|
}
|
|
343
345
|
|
|
346
|
+
const propsSchema = (componentExports as Record<string, unknown>)?.propsSchema as
|
|
347
|
+
| PropsSchema
|
|
348
|
+
| undefined;
|
|
349
|
+
|
|
344
350
|
// Phase 2: load the test module. The test imports the component via the
|
|
345
351
|
// synthetic specifier '__component__' which we inject into scope.
|
|
346
352
|
const testScope = makeAutoStubScope(componentExports, {
|
|
@@ -398,5 +404,5 @@ export async function runTest(input: RunTestInput): Promise<RunTestResult> {
|
|
|
398
404
|
};
|
|
399
405
|
}
|
|
400
406
|
|
|
401
|
-
return { ok: true, durationMs: performance.now() - start };
|
|
407
|
+
return { ok: true, durationMs: performance.now() - start, propsSchema };
|
|
402
408
|
}
|
package/LICENSE
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship made available under
|
|
36
|
-
the License, as indicated by a copyright notice that is included in
|
|
37
|
-
or attached to the work (an example is provided in the Appendix below).
|
|
38
|
-
|
|
39
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
-
form, that is based on (or derived from) the Work and for which the
|
|
41
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
-
of this License, Derivative Works shall not include works that remain
|
|
44
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
-
the Work and Derivative Works thereof.
|
|
46
|
-
|
|
47
|
-
"Contribution" shall mean, as submitted to the Licensor for inclusion
|
|
48
|
-
in the Work by the copyright owner or by an individual or Legal Entity
|
|
49
|
-
authorized to submit on behalf of the copyright owner. For the purposes
|
|
50
|
-
of this definition, "submitted" means any form of electronic, verbal,
|
|
51
|
-
or written communication sent to the Licensor or its representatives,
|
|
52
|
-
including but not limited to communication on electronic mailing lists,
|
|
53
|
-
source code control systems, and issue tracking systems that are managed
|
|
54
|
-
by, or on behalf of, the Licensor for the purpose of developing and
|
|
55
|
-
improving the Work, but excluding communication that is conspicuously
|
|
56
|
-
marked or designated in writing by the copyright owner as "Not a
|
|
57
|
-
Contribution."
|
|
58
|
-
|
|
59
|
-
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
60
|
-
whom a Contribution has been received by the Licensor and incorporated
|
|
61
|
-
within the Work.
|
|
62
|
-
|
|
63
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
64
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
65
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
66
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
67
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
68
|
-
Work and such Derivative Works in Source or Object form.
|
|
69
|
-
|
|
70
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
71
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
72
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
73
|
-
(except as stated in this section) patent license to make, have made,
|
|
74
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
75
|
-
where such license applies only to those patent claims licensable
|
|
76
|
-
by such Contributor that are necessarily infringed by their
|
|
77
|
-
Contribution(s) alone or by the combination of their Contribution(s)
|
|
78
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
79
|
-
institute patent litigation against any entity (including a cross-claim
|
|
80
|
-
or counterclaim in a lawsuit) alleging that the Work or any
|
|
81
|
-
Contribution embodied within the Work constitutes direct or
|
|
82
|
-
contributory patent infringement, then any patent licenses granted
|
|
83
|
-
to You under this License for that Work shall terminate as of the
|
|
84
|
-
date such litigation is filed.
|
|
85
|
-
|
|
86
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
87
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
88
|
-
modifications, and in Source or Object form, provided that You
|
|
89
|
-
meet the following conditions:
|
|
90
|
-
|
|
91
|
-
(a) You must give any other recipients of the Work or Derivative
|
|
92
|
-
Works a copy of this License; and
|
|
93
|
-
|
|
94
|
-
(b) You must cause any modified files to carry prominent notices
|
|
95
|
-
stating that You changed the files; and
|
|
96
|
-
|
|
97
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
98
|
-
that You distribute, all copyright, patent, trademark, and
|
|
99
|
-
attribution notices from the Source form of the Work,
|
|
100
|
-
excluding those notices that do not pertain to any part of
|
|
101
|
-
the Derivative Works; and
|
|
102
|
-
|
|
103
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
104
|
-
distribution, You must include a readable copy of the
|
|
105
|
-
attribution notices contained within such NOTICE file, in
|
|
106
|
-
at least one of the following places: within a NOTICE text
|
|
107
|
-
file distributed as part of the Derivative Works; within
|
|
108
|
-
the Source form or documentation, if provided along with the
|
|
109
|
-
Derivative Works; or, within a display generated by the
|
|
110
|
-
Derivative Works, if and wherever such third-party notices
|
|
111
|
-
normally appear. The contents of the NOTICE file are for
|
|
112
|
-
informational purposes only and do not modify the License.
|
|
113
|
-
You may add Your own attribution notices within Derivative
|
|
114
|
-
Works that You distribute, alongside or in addition to the
|
|
115
|
-
NOTICE text from the Work, provided that such additional
|
|
116
|
-
attribution notices cannot be construed as modifying the License.
|
|
117
|
-
|
|
118
|
-
You may add Your own license statement for Your modifications and
|
|
119
|
-
may provide additional grant of rights to use, reproduce, modify,
|
|
120
|
-
prepare Derivative Works of, convert to Object form, display,
|
|
121
|
-
perform, sublicense, and distribute the Work and such Derivative
|
|
122
|
-
Works in Source or Object form.
|
|
123
|
-
|
|
124
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
125
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
126
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
127
|
-
this License, without any additional terms or conditions.
|
|
128
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
129
|
-
the terms of any separate license agreement you may have executed
|
|
130
|
-
with Licensor regarding such Contributions.
|
|
131
|
-
|
|
132
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
133
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
134
|
-
except as required for reasonable and customary use in describing the
|
|
135
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
136
|
-
|
|
137
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
138
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
139
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
140
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
141
|
-
implied, including, without limitation, any warranties or conditions
|
|
142
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
143
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
144
|
-
appropriateness of using or redistributing the Work and assume any
|
|
145
|
-
risks associated with Your exercise of permissions under this License.
|
|
146
|
-
|
|
147
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
148
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
149
|
-
unless required by applicable law (such as deliberate and grossly
|
|
150
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
151
|
-
liable to You for damages, including any direct, indirect, special,
|
|
152
|
-
incidental, or exemplary damages of any character arising as a
|
|
153
|
-
result of this License or out of the use or inability to use the
|
|
154
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
155
|
-
work stoppage, computer failure or malfunction, or all other
|
|
156
|
-
commercial damages or losses), even if such Contributor has been
|
|
157
|
-
advised of the possibility of such damages.
|
|
158
|
-
|
|
159
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
160
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
161
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
162
|
-
or other liability obligations and/or rights consistent with this
|
|
163
|
-
License. However, in accepting such obligations, You may offer such
|
|
164
|
-
obligations only on Your own behalf and on Your sole responsibility,
|
|
165
|
-
not on behalf of any other Contributor, and only if You agree to
|
|
166
|
-
indemnify, defend, and hold each Contributor harmless for any
|
|
167
|
-
liability incurred by, or claims asserted against, such Contributor
|
|
168
|
-
by reason of your accepting any such warranty or additional liability.
|
|
169
|
-
|
|
170
|
-
END OF TERMS AND CONDITIONS
|
|
171
|
-
|
|
172
|
-
Copyright 2024 Omri Askenazi
|
|
173
|
-
|
|
174
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
175
|
-
you may not use this file except in compliance with the License.
|
|
176
|
-
You may obtain a copy of the License at
|
|
177
|
-
|
|
178
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
179
|
-
|
|
180
|
-
Unless required by applicable law or agreed to in writing, software
|
|
181
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
182
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
183
|
-
See the License for the specific language governing permissions and
|
|
184
|
-
limitations under the License.
|