apify-schema-tools 3.2.0 → 3.2.2
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 +6 -0
- package/dist/apify.js +1 -1
- package/dist/apify.js.map +1 -1
- package/package.json +1 -1
- package/samples/all-defaults/.actor/input_schema.json +1 -0
- package/samples/all-defaults/src-schemas/input.json +1 -0
- package/samples/deep-merged-schemas/.actor/input_schema.json +1 -0
- package/samples/deep-merged-schemas/src-schemas/input.json +1 -0
- package/samples/merged-schemas/.actor/input_schema.json +1 -0
- package/samples/merged-schemas/src-schemas/input.json +1 -0
- package/src/apify.ts +1 -1
- package/test/apify.test.ts +2 -0
package/CHANGELOG.md
CHANGED
package/dist/apify.js
CHANGED
|
@@ -6,7 +6,7 @@ export const ACTOR_CONFIG_PATH = ".actor/actor.json";
|
|
|
6
6
|
export function getPathRelativeToActorConfig(path) {
|
|
7
7
|
return `./${relative(dirname(ACTOR_CONFIG_PATH), path)}`;
|
|
8
8
|
}
|
|
9
|
-
const VALID_INPUT_ROOT_KEYS = ["title", "description", "type", "schemaVersion", "properties", "required"];
|
|
9
|
+
const VALID_INPUT_ROOT_KEYS = ["$schema", "title", "description", "type", "schemaVersion", "properties", "required"];
|
|
10
10
|
const VALID_INPUT_PROPERTY_KEYS = [
|
|
11
11
|
"type",
|
|
12
12
|
"title",
|
package/dist/apify.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apify.js","sourceRoot":"","sources":["../src/apify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,OAAO,EAAE,2BAA2B,EAA0C,MAAM,yBAAyB,CAAC;AAE9G,MAAM,CAAC,MAAM,iBAAiB,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,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;QACpE,IAAI,GAAG,IAAI,aAAa,EAAE,CAAC;YAC1B,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG;gBAClC,GAAG,MAAM;gBACT,UAAU,EAAE,IAAI;aAChB,CAAC;QACH,CAAC;aAAM,IAAI,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,IAAI,aAAa,CAAC,EAAE,CAAC;YACzD,6BAA6B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACzC,CAAC;IACF,CAAC;IAED,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IAE7E,OAAO;;;;EAKP,gBAAgB;QACf,CAAC,CAAC;0BACsB,iCAAiC,CAAC,gBAAgB,CAAC;;;;qDAIxB,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG;QAC/F,CAAC,CAAC;;;iEAIJ;;uDAEuD,IAAI,CAAC,SAAS,CAAC,6BAA6B,EAAE,IAAI,EAAE,IAAI,CAAC;;;;;;IAO9G,6BAA6B,CAAC,MAAM,GAAG,CAAC;QACvC,CAAC,CAAC;;;;;GAKF;QACA,CAAC,CAAC,EACJ;EAEA,gBAAgB;QACf,CAAC,CAAC;;;;IAIA;QACF,CAAC,CAAC;8BAEJ;;CAEC,CAAC;AACF,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAqB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/apify.ts
CHANGED
|
@@ -10,7 +10,7 @@ export function getPathRelativeToActorConfig(path: string): string {
|
|
|
10
10
|
return `./${relative(dirname(ACTOR_CONFIG_PATH), path)}`;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const VALID_INPUT_ROOT_KEYS = ["title", "description", "type", "schemaVersion", "properties", "required"];
|
|
13
|
+
const VALID_INPUT_ROOT_KEYS = ["$schema", "title", "description", "type", "schemaVersion", "properties", "required"];
|
|
14
14
|
|
|
15
15
|
const VALID_INPUT_PROPERTY_KEYS = [
|
|
16
16
|
"type",
|
package/test/apify.test.ts
CHANGED
|
@@ -7,6 +7,7 @@ describe("Apify utilities", () => {
|
|
|
7
7
|
describe("filterValidInputSchemaProperties", () => {
|
|
8
8
|
it("should filter out invalid root-level keys", () => {
|
|
9
9
|
const inputSchema: ObjectSchema = {
|
|
10
|
+
$schema: "https://apify-projects.github.io/actor-json-schemas/input.ide.json?v=0.7",
|
|
10
11
|
type: "object",
|
|
11
12
|
title: "Test Schema",
|
|
12
13
|
description: "A test schema",
|
|
@@ -22,6 +23,7 @@ describe("Apify utilities", () => {
|
|
|
22
23
|
const result = filterValidInputSchemaProperties(inputSchema);
|
|
23
24
|
|
|
24
25
|
expect(result).toEqual({
|
|
26
|
+
$schema: "https://apify-projects.github.io/actor-json-schemas/input.ide.json?v=0.7",
|
|
25
27
|
type: "object",
|
|
26
28
|
title: "Test Schema",
|
|
27
29
|
description: "A test schema",
|